Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-21-2011, 12:17 AM   PM User | #1
Dornith
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Dornith is an unknown quantity at this point
CSS: Format Wdith Reletive to Pre-CSS

I have a menu with a bunch of buttons with various widths. When you mouse over them it changes the font to bold. But that makes the element slightly bigger wich causes the entire menu to move around.

My first thought was to make all the buttons slightly wider so that when the font changed the element would not need to grow to fit it.
The problem is, I do not want to go through each one and indivigualy size each one and if I make them all one size some buttons are way biggger then needed.

I am open to other ideas aswell, but does anyone know how to change the width of an element relative to what it was?
Dornith is offline   Reply With Quote
Old 05-21-2011, 09:17 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
I am open to other ideas aswell, but does anyone know how to change the width of an element relative to what it was?
No code .. no help!
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 05-21-2011, 12:40 PM   PM User | #3
Dornith
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Dornith is an unknown quantity at this point
Quote:
No code .. no help!
How can I post code if I do not have any idea of how I would acheive my goal? I am not asking for a debuging I am asking for ideas.

Last edited by Dornith; 05-21-2011 at 12:42 PM..
Dornith is offline   Reply With Quote
Old 05-21-2011, 01:41 PM   PM User | #4
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
I have a menu with a bunch of buttons with various widths. When you mouse over them it changes the font to bold. But that makes the element slightly bigger wich causes the entire menu to move around.
Quote:
Originally Posted by Dornith View Post
How can I post code if I do not have any idea of how I would acheive my goal? I am not asking for a debuging I am asking for ideas.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 05-21-2011, 03:34 PM   PM User | #5
Dornith
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Dornith is an unknown quantity at this point
My problem is not that I have code that does not work. My problem is I can not figure out how I would go about getting elements to be wider relitive to what it was before applying CSS.

There is no code to debug or even to look at yet. Just a critical thinking problem.
Dornith is offline   Reply With Quote
Old 05-21-2011, 09:59 PM   PM User | #6
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
There is no real way to work around this without explicit widths. You could either use images or just don't use bold. I doubt this'd be tasteful anyway.
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Reply

Bookmarks

Tags
css, menu, relative, width

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 07:42 PM.


Advertisement
Log in to turn off these ads.