SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard boxhead's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,040
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    buttons in a row

    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

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,803
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Try floating the buttons left.

    Code:
    img {float:left}
    Paul

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,803
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    example:
    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>
    Hope that helps.

    Paul

  4. #4
    SitePoint Wizard boxhead's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,040
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •