homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

how to "fix" elements

 11:54 pm on Mar 9, 2010 (gmt 0)

I have a <ul> with <li> and <a> in those <li>

When I -hover- on -li a- I want to transform the text of -a- to uppercase, this causes the elements on the right of the li to slide forward because of the bigger size.
Is there a way to fix the element when I hover on it so the elements nearby won't be affected? The only thing I thought is to use absolute rule for every li but this would be impossible because this menu is generated dynamically and changes every time.



 1:03 am on Mar 10, 2010 (gmt 0)

As you make the text bigger, also change the padding and/or margin to a smaller value to compensate?


 4:03 pm on Mar 10, 2010 (gmt 0)

the problem with that is that the margin is not the same for every element


 1:59 pm on Mar 11, 2010 (gmt 0)

Well you could always set all the li's to have the same fixed width. Wide enough to where the longest a text, when hovered, doesn't effect the rest of the content.


 3:30 pm on Mar 11, 2010 (gmt 0)

that could do it, i'll let you know

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved