iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-19-2006, 10:12 AM
WebProWorld New Member
 
Join Date: Aug 2006
Posts: 7
kenaron RepRank 0
Default Question on CSS Dropdown Menu

I've got a CSS dropdown menu on my website (http://www.averybiomedical.com) that is based off of the suckerfish model. I would like to increase the width of the dropdown menu to be greater than that of the heading. I've done that part with some additional CLASS statements. The problem is the result looks like this:

|_________|_____
|_______________|
|_______________|
|_______________|

I would like the dropdown to be centered under the heading, not left aligned, like this:

___|_________|___
|_______________|
|_______________|
|_______________|

I cannot find a suckerfish example that is not left aligned, and can't figure out what variables I need to set to get this result.

Any help would be greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 10-19-2006, 10:26 AM
sands's Avatar
WebProWorld Veteran
 
Join Date: Sep 2005
Location: Kerala, India
Posts: 395
sands RepRank 1
Default

The dropdown is centered in IE6 and the latest Firefox and Opera. Did you dabble with it after making this post? Which browser are you using?
__________________
My Nook | My Biz | My Photos
Reply With Quote
  #3 (permalink)  
Old 10-19-2006, 10:35 AM
WebProWorld New Member
 
Join Date: Aug 2006
Posts: 7
kenaron RepRank 0
Default

Sorry I wasn't clear...the online version still has the header and the dropdown as the same size. I was trying to get this to work on a local copy before taking it live.

I've uploaded a sample page here:
http://www.averybiomedical.com/temp.html

and the stylesheet here:
http://www.averybiomedical.com/styletemp.css

I've used IE6/7, Firefox, and Opera to check the site.

Thanks,
Ken
Reply With Quote
  #4 (permalink)  
Old 10-19-2006, 11:36 AM
sands's Avatar
WebProWorld Veteran
 
Join Date: Sep 2005
Location: Kerala, India
Posts: 395
sands RepRank 1
Default

Quote:
Originally Posted by kenaron
Sorry I wasn't clear...the online version still has the header and the dropdown as the same size. I was trying to get this to work on a local copy before taking it live.
But this version looks horrible with so wide a dropdown. The original one is just as presented by you in your first post. The dropdown is wider than the header in the original and looks good. I am not really sure what exactly you wish to achieve. I thought you wanted the dropdown to be centered and a little wider than the header and this is exactly how it is now.
__________________
My Nook | My Biz | My Photos
Reply With Quote
  #5 (permalink)  
Old 10-19-2006, 11:45 AM
WebProWorld New Member
 
Join Date: Aug 2006
Posts: 7
kenaron RepRank 0
Default

Quote:
Originally Posted by sands
But this version looks horrible with so wide a dropdown. The original one is just as presented by you in your first post. The dropdown is wider than the header in the original and looks good. I am not really sure what exactly you wish to achieve. I thought you wanted the dropdown to be centered and a little wider than the header and this is exactly how it is now.
Oh, I agree...I don't intend to make the final version that wide...the sample is just 2x the header.

The reason I'm doing this is I'm going to need to add one, maybe two, more headers and I can't keep making the dropdowns as narrow. If you click through to one of the links to the other pages, you'll see what I mean.

I don't want to make the font smaller, so wider dropdowns seemed the way to go.
Reply With Quote
  #6 (permalink)  
Old 10-19-2006, 03:46 PM
WebProWorld New Member
 
Join Date: Aug 2006
Posts: 7
kenaron RepRank 0
Default

If anyone cares, I figured it out. I don't think it's possible to automatically do this, but a quick calculation does the trick...

Subtract the header width from the dropdown width and divide the result by two.

Set the margin-left to the negative of that value, and the dropdown will center under the header.

For example, if the header is 100px and the dropdown is 130px, set margin-left:-15px;

Ken
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting 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



All times are GMT -4. The time now is 03:42 AM.



Search Engine Optimization by vBSEO 3.3.0