Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3 columns with css

    hey everyone.

    I am trying to put 3 images centered in a row using css positioning, like:

    IMAGE -- IMAGE -- IMAGE

    ...body content....

    I found a tutorial for 3 expanding columns but all I want is these three images.

    -Doug
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When you say you want them centered do you mean you want the images evenly spaced with even spacing between each image and the borders of the window or with fixed (or no) spacing between the images with even spacing between the outside images and the edge of the window?

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <html>
    <head>
    <title>Untitled</title>
    <style type="text/css">
    <!--
    #aa {width:33%;}
    #ab {width:34%;}
    #aa, #ab {float:left;}
    #aa, #ab, #ac {text-align:center;}
    -->
    </style>
    </head>
    <body>
    <div id="images">
    <div id="aa"><img src="" width="" height="" alt="" /></div>
    <div id="ab"><img src="" width="" height="" alt="" /></div>
    <div id="ac"><img src="" width="" height="" alt="" /></div>
    </div>
    </body>
    </html>

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question ah!

    hey roy, i meant the second one, sorry i wasn't clear.

    that seemed to work pretty well... one thing that I noticed though is that when your table compresses the images overlap and shoot over the right side of my outer table... is there any where for me to set a minimum width to the table while still letting it expand?

    umm... actually I just remembered how to do that (the spacer.gif trick that i've used to about 6 years, duh!) I'm getting so into this CSS stuff I forget the good old tricks


    hey here's a question though, do browsers like lynx that don't support graphics still have image placeholders if you specify the height and width? hmm..

    thanks for the help!

    -Doug
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There is "min-width" and "max-width" in the CSS2 specs but it's not supported yet.

    I use WannaBe as text browser. In WannaBe every image is a link. Clicking on it downloads the image for offline viewing.
    You could try http://wannabrowser.com if you know how Lynx identifies itself.
    Or download Lynx...


  •  

    Posting Permissions

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