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 > designing dropdown menu with css?

designing dropdown menu with css?
Thread Tools
Junior Member
Join Date: Nov 2000
Location: Tallinn, Estonia
Status: Offline
Reply With Quote
Jan 29, 2003, 06:27 AM
 
is there possibility to design dropdown menus with css? yes, i know i can make them custom color and size etc. ( in IE). But is there ANY way to make every row look different?

maybe this helps to get what i keep in mind:

<select>
<option>kala</option>
<option><span class="asd"><strong>saba</strong></span></option>
</select>

html/css specs says that last tags rules over, put i tried and it doesn't work.

yes, it's stupid idea and it should not work, but maybe there's ....
     
Carp  (op)
Junior Member
Join Date: Nov 2000
Location: Tallinn, Estonia
Status: Offline
Reply With Quote
Jan 29, 2003, 06:35 AM
 
hehe, it maked dropdown menu from my code

here's simplified sample:

(select)
(input)KALA(/input)
(input)(span class="fafa")(strong)SABA(/stong)(/span)(/input)
(/select)
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Jan 29, 2003, 09:51 AM
 
If you gave each "row" its on ID then you could modify each one with CSS. This would give you the effect you want but it would seem tedious to me. If you just want to alternate between two colors then make two CSS classes and alternate the classes on the rows. This sounds like a better choice to me.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jan 29, 2003, 10:44 AM
 
Originally posted by redJag:
If you gave each "row" its on ID then you could modify each one with CSS. This would give you the effect you want but it would seem tedious to me. If you just want to alternate between two colors then make two CSS classes and alternate the classes on the rows. This sounds like a better choice to me.
What RedJag said. You don't need the "fafa" span either; you can put the "fafa" class directly on the option tag.

What I would do is this: determine what most of the options are going to look like. Style option tags like that. Then use classes or ID's to override that for specific options.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Carp  (op)
Junior Member
Join Date: Nov 2000
Location: Tallinn, Estonia
Status: Offline
Reply With Quote
Jan 29, 2003, 12:44 PM
 
Originally posted by Millennium:
What RedJag said. You don't need the "fafa" span either; you can put the "fafa" class directly on the option tag.

What I would do is this: determine what most of the options are going to look like. Style option tags like that. Then use classes or ID's to override that for specific options.
yes, i know how exact code must be, it it don't work like it have to (only browser to show this is IE for PC). Can you write those lines to me here what you ment?
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jan 29, 2003, 07:15 PM
 
is this any help?
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jan 30, 2003, 12:06 AM
 
Originally posted by philzilla:
is this any help?
I don't think that's what he's looking for. It sounds to me as though he's trying to style a form control.
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
Jan 30, 2003, 03:18 AM
 
Originally posted by philzilla:
is this any help?
THANKS A LOT, Philzilla...

Just out of curiosity I followed the link and then spent the next 3 hours learning stuff instead of doing work...

Some really tasty stuff actually. My next major site may have a whole radical new structure to it because of those links...

Cheers!
Computer thez nohhh...
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jan 30, 2003, 05:03 AM
 
w00t!

there's some amazingly cool stuff at that site. i found it a year or so ago. love it. 'kin nerds
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status: Offline
Reply With Quote
Feb 2, 2003, 11:58 AM
 
Originally posted by philzilla:
w00t!

there's some amazingly cool stuff at that site. i found it a year or so ago. love it. 'kin nerds
...i too am grateful for that link.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Feb 2, 2003, 11:17 PM
 
Originally posted by Simon Mundy:
THANKS A LOT, Philzilla...

Just out of curiosity I followed the link and then spent the next 3 hours learning stuff instead of doing work...

Some really tasty stuff actually. My next major site may have a whole radical new structure to it because of those links...
evolt is cool for learning stuff. If you really want to push the envelope, you might want to consider Eric Meyer's CSS-Edge, but be warned: it pushes the envelope so far that a lot of the stuff doesn't work in IE/Windows, and the current incarnation of Safari only gets about half of it right (though according to Hyatt, most of the remaining issues have already been fixed in WebCore).
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
Feb 3, 2003, 03:07 AM
 
Originally posted by Millennium:
evolt is cool for learning stuff. If you really want to push the envelope, you might want to consider Eric Meyer's CSS-Edge, but be warned: it pushes the envelope so far that a lot of the stuff doesn't work in IE/Windows, and the current incarnation of Safari only gets about half of it right (though according to Hyatt, most of the remaining issues have already been fixed in WebCore).
You're not wrong. The stuff there, and the other articles at BlueRobot about dynamic width, 3 column layouts in pure CSS WITHOUT javascript hacks are great (although a slight deduction for the crazy CSS hack you have to perform to make it all work).

One thing I'm really stuck on, though. You know how you can have a table cell on the left filled with, say, #505050 and one on the right with #999999. If the contents of either cell are deeper than the other, the grey backgrounds of both will continue to the same depth.

But with DIVs, I've never been able to achieve this - they just stop dead at the end of the content. I've tried setting the height to a % - doesn't work consistently. I've tried having a container DIV, with a float and a flexible-width DIV inside. That kind of works, but for a 3+ column layout you're S.O.L if you want to set differing backgrounds for them and still have them end at the same depth.

Unless there's a bright spark out there who can enlighten me? Please?
Computer thez nohhh...
     
Fresh-Faced Recruit
Join Date: Aug 2002
Status: Offline
Reply With Quote
Feb 3, 2003, 06:30 AM
 
Originally posted by Simon Mundy:
But with DIVs, I've never been able to achieve this - they just stop dead at the end of the content. I've tried setting the height to a % - doesn't work consistently. I've tried having a container DIV, with a float and a flexible-width DIV inside. That kind of works, but for a 3+ column layout you're S.O.L if you want to set differing backgrounds for them and still have them end at the same depth.
I can't enlighten you, but I've run (I think at least, if I understand you fully) into the same problem. After reading around the web and w3c all these admonitions to stop using tables for layout, I tried going css, but this is the biggest thing holding me back. The sorry way many browser treat DIVs and content-width. Even trying through setting everything from the outer box to zero (padding especially, and border) and everything from the inner box to full (or 100) or whatever. It doesn't work like the specification makes you think it should. Back to some hacking for now, if I find something, I'll let you know.

Does anybody know to what degree the BODY element is recognised as THE containing box of all other elements in a page? (I mean, does it have the same 'status', importance, ... as say, a TD cell, or something).
     
   
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 02:07 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