Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    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!
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    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.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New Coder
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •