I have 6 buttons which I want in a row. Thge trouble is that I want each button on its on line in the html to make editing easier, but if I do this I get a space between each button. How do I get around this?
monkey
| SitePoint Sponsor |
I have 6 buttons which I want in a row. Thge trouble is that I want each button on its on line in the html to make editing easier, but if I do this I get a space between each button. How do I get around this?
monkey
monkey - the rest is history


Hi,
Try floating the buttons left.
PaulCode:img {float:left}


example:
Hope that helps.Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> #imgcontainer {width:750px}/*width of all images if you don't want them to wrap*/ #imgcontainer img {float:left;width:125px;} </style> </head> <body> <p id="imgcontainer"> <img src="images/normal.gif" alt="" /> <img src="images/normal.gif" alt="" /> <img src="images/normal.gif" alt="" /> <img src="images/normal.gif" alt="" /> <img src="images/normal.gif" alt="" /> <img src="images/normal.gif" alt="" /> </p> </body> </html>
Paul
float left worked a treat - I was trying to use this in a div surrounding all buttons but it only worked if attached to each image individually.
cheers
monkey
monkey - the rest is history
Bookmarks