#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Can't get UL <list-type> to display properly


    Like the name says, I can't get the list types to display correctly. It might be because of parent elements, but I'm not too sure. This has taken me almost an hour to figure out. I don't like CSS, and I need to get this final project over with already. This is the last thing I need!!!

    Here is the code:
    Code:
    <ul class="operatingSystems">
    	<li>A mobile operating system</li>
        	<ul>
            	<li>iOS</li>
                <li>Android</li>
                <li>BlackBerry OS, or BlackBerry 10</li>
                <li>Symbian, and</li>
                <li>Windows Phone</li>
            </ul>
         <li>GPS</li>
         <li>Basic functionality of a feature phone</li>
         <li>A dedicated application store to run mobile applications</li>
         <li>Digital/video camera(s), and a</li>
         <li>Web browser</li>
    </ul>
    Here is the CSS for this:
    Code:
    ul.operatingSystems {list-style:square; margin-left: 40;}
    ul.operatingSystems li {list-style:square; margin-left: 40;}
    
    body.light ul.operatingSystems {display:inline-block; list-style-type: square;}
    body.light ul.operatingSystems li {list-style-type: square;}
    Now, I know everything isn't perfect, and I don't even care anymore. I just need this ****ing list to display correctly. Here are other CSS properties that might be interfering:

    Code:
    body.freestyle01 ul.menu {list-style:none; margin:0 0 15px 0; border:0; padding:0; position:relative;}
    
    body.freestyle01 ul.menu li {list-style:none; text-align:left; font-size:1.2em; margin:0 0 1px; border:0; color:#888;}
    
    ul.menu {list-style:none; margin:0; padding:10px 0; border-top:1px solid #333;}
    ul.menu li {list-style:none; text-align:center; font-size:1.2em; margin:0 0 10px; padding:0 0 8px 0; color:#888; border-bottom:1px solid #333;}
    Any help will be greatly appreciated!!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    118
    Rep Power
    50

    impossible to answer


    You don't say what is wrong about the display.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0
    So sorry. Well, the bullets don't display. At all. The information just displays as regular text. I think it may have something to do with the body CSS elements.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    118
    Rep Power
    50
    I think the problem is something we can't see. The code that you provided most likely works on most browsers when isolated. I say "most likely" because you have no units on your margin-left. That might confuse some versions of some browsers, so I suppose could be an issue, but I don't think so.

    I suggest you do two things:
    1. Isolate - take just the part that appears to be causing a problem and move it to it's own file. When it works, gradually add the other stuff until the error happens. That usually helps you find the problem.
    2. Validate - run your CSS through the validator . That will likely yield several problems which when cleaned up might fix your problem.
  8. #5
  9. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,131
    Rep Power
    4304
    Welcome to DevShed Forums, smoovejayy.

    Are you aware that your page contains errors? The first step in debugging should always be making sure that your code is valid (in order to rule out any errors as the cause for the problem).
    http://validator.w3.org/
    http://jigsaw.w3.org/css-validator/

    If you don't understand some of the error messages, ask here and we'll try to explain them.

    Originally Posted by EEsterling
    I say "most likely" because you have no units on your margin-left. That might confuse some versions of some browsers, so I suppose could be an issue, but I don't think so.
    No, it doesn't "confuse" browsers. It's an error, so browsers will ignore that property declaration.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    118
    Rep Power
    50
    Originally Posted by Kravvitz
    No, it doesn't "confuse" browsers. It's an error, so browsers will ignore that property declaration.
    Yes, it is an error. But browsers don't simply ignore the declaration. They interpret it -- in potentially unpredictable ways. So, maybe it isn't the browsers that get confused but the unsuspecting page developer.
  12. #7
  13. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,131
    Rep Power
    4304
    Originally Posted by EEsterling
    Yes, it is an error. But browsers don't simply ignore the declaration. They interpret it -- in potentially unpredictable ways. So, maybe it isn't the browsers that get confused but the unsuspecting page developer.
    Have you read the Rules for handling parsing errors (especially the section on invalid values)? I'm not sure what is supposed to happen (or what actually happens) when the shorthand properties are used though. For example, "margin: 0 10 0 4px" might be ignored completely or it could be interpreted as "margin-top: 0; margin-bottom: 0; margin-left: 4px;".
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo