Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS <ul> styling trouble

CSS <ul> styling trouble
Thread Tools
Junior Member
Join Date: Sep 2003
Location: Pacific
Status: Offline
Reply With Quote
Sep 28, 2004, 06:35 PM
 
hello again,

i've used list items and styled it with CSS for my dropdown menus.
now, regular <ul>'s are styled as the dropdown menu, which you can see:
http://www.mauiwedding.net/packages/whiteorchid.php does not have an appealing effect.

i put an id="normal" on the lists across the site that's not part of the dropdown menu, and trying to style it to be 'normal' in the style sheet. that may be the solution, if it is, i'm not having any sucess with it.

any suggesstions, and again, thanks in advance!
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Sep 28, 2004, 06:44 PM
 
put a class on the menu <ul>s instead and style the class, not the tag. e.g. <ul class="nav"> then style .nav

That's more efficient than unstyling the other lists. Especially since you can't unstyle things like float.
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Sep 28, 2004, 06:48 PM
 
Originally posted by registered_user:
Especially since you can't unstyle things like float.
float: none ?
     
Grizzled Veteran
Join Date: Apr 2004
Location: Nagoya, Japan • 日本 名古屋市
Status: Offline
Reply With Quote
Sep 28, 2004, 07:40 PM
 
Heh, I had that problem just yesterday, trying to un-style a list to use it in body text. I found that float:none wouldn't eliminate the float for some reason. As a quick fix, I set the list elements to clear:both.

Much better to leave the default UL and LI alone, though, and create a class or IDs for the menu ULs, and use the drop-down styles for those classes or IDs only.
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Sep 28, 2004, 08:19 PM
 
Originally posted by Synotic:
float: none ?
nope. You just can't unfloat something.

At least not in the real world, I don't know what the spec says.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Sep 28, 2004, 10:59 PM
 
I'm inclined to agree with the others here. Semantically, it's cleaner to put a class or ID on the navigation lists (class="nav" is what I usually use) and style the lists. The reason, semantically, is that these lists are special; they're not regular lists, and so they should be noted as such by using the classes.

Once you've done that, you can put your list-style-image on the regular UL tag (that's a very nice-looking bullet, by the way). That should fix your problems.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Sep 28, 2004, 11:17 PM
 
Originally posted by registered_user:
nope. You just can't unfloat something.

At least not in the real world, I don't know what the spec says.
Yes you can! I'm in the middle of a job where the layout DIV is a float on the entire set except on one page, and on that page I simply have the following in the HEAD of the page:-

Code:
<style type="text/css"> #layout { float: none; padding: 0; } </style>
Works as expected.
Computer thez nohhh...
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Sep 29, 2004, 12:25 PM
 
I just tried it, and sure enough it works.

I could have sworn that you can't unfloat something. Maybe it was an older browser bug that I'm thinking of, or maybe I'm insane. One or the other.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:12 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2