homepage Welcome to WebmasterWorld Guest from 107.21.163.227
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

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

CSS Forum

    
Make my display:inline-block fit each link individually
Scotty13




msg:4507946
 1:31 pm on Oct 14, 2012 (gmt 0)

My header links are different sizes. What Ďam I missing so each button will fit each individual link thatís a different size perfectly?

<style type="text/css">
a.button{
display:inline-block;
width:90px;
height:40px;
padding:5px;
border:1px #000000 solid;
text-align:center;
text-decoration:none;
color:#666666;
background:url(button_bg.png);
}
a.button:hover{
background:url(button_bg_hover.png);
text-decoration:none;
}
</style>

Thanks in advance,
S

 

lucy24




msg:4508022
 10:18 pm on Oct 14, 2012 (gmt 0)

What am I missing so each button will fit each individual link thatís a different size perfectly?

width:90px;
height:40px;

? ? ?

Like the man said: Your mouth says "fit, fit" but your code says "same size, same size".

alt131




msg:4508118
 11:04 am on Oct 15, 2012 (gmt 0)

Hi Scotty, the point Lucy is making is that the browsers are obeying the width you have set for each <a>. If you want the links to expand when the link text is longer, consider min-width instead.

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved