SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Spreading images equally

    I am dabbling with CSS for the first time to see how it feels

    I keep relating my tests to "how would I do this without a table?"

    Lets say I had content box on my page, and in it I have 5 images all 50px wide, my content box is 500px wide, how would I place the 5 images in that content box and spread them with equal spacing between each? Without a table of course.

    Thanks for any input in advance.

    Lee

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Float the images to the left and give them padding values of 25px.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah! thanks for that.

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem. One thing I should have mentioned was to add overflow: hidden; to the DIV containing the images so that the floated images stay contained (visually) inside it.


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
  •