Jenny Dithe
04-05-2011, 05:35 PM
I have buttons which are populated with the names of members. The width of the button is preset - if I don't the website looks messy.
But members names could be:
John Doe or
Wellington Napoleon Archibald
So John Doe will display fine, but the second name would display Wellington N, getting cut off when it reached the preset width of the button.
How can I alter the text width to automatically fit the size of the button?
Here is the css code I am using for the button:
.button3:hover {background-color:#778899; font-size:70%; text-decoration:none; color:white; border:2px solid #f00000; width:10em}
As you can see I tried to make the font-size a percentage but this seems to work for height not width.
But members names could be:
John Doe or
Wellington Napoleon Archibald
So John Doe will display fine, but the second name would display Wellington N, getting cut off when it reached the preset width of the button.
How can I alter the text width to automatically fit the size of the button?
Here is the css code I am using for the button:
.button3:hover {background-color:#778899; font-size:70%; text-decoration:none; color:white; border:2px solid #f00000; width:10em}
As you can see I tried to make the font-size a percentage but this seems to work for height not width.