homepage Welcome to WebmasterWorld Guest from 54.167.41.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
how to "fix" elements
Sandro87




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

Hello,
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.

 

g1smd




msg:4094420
 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?

Sandro87




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

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

CSS_Kidd




msg:4095389
 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.

Sandro87




msg:4095457
 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