The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
Homework - Can't get UL <list-type> to display properly
Discuss Can't get UL <list-type> to display properly in the CSS Help forum on Dev Shed. Can't get UL <list-type> to display properly Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 19th, 2012, 12:35 PM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 2
Time spent in forums: 50 m 52 sec
Reputation Power: 0
|
|
|
Homework - 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!! 
|

December 19th, 2012, 12:58 PM
|
|
|
|
impossible to answer
You don't say what is wrong about the display.
|

December 19th, 2012, 03:20 PM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 2
Time spent in forums: 50 m 52 sec
Reputation 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.
|

December 19th, 2012, 10:28 PM
|
|
|
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: - 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.
- Validate - run your CSS through the validator . That will likely yield several problems which when cleaned up might fix your problem.
|

December 19th, 2012, 11:40 PM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
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.
Quote: | 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.
|

December 20th, 2012, 01:43 AM
|
|
|
Quote: | 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.
|

December 20th, 2012, 10:48 AM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
Quote: | 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;".
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|