Results 1 to 3 of 3

Thread: how to creat spaces between images?

  1. #1
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how to creat spaces between images?

    I have 4 thumb nail images and I want to align them horizontally with spaces in between them.

    right now I just have:

    <div class="thumbs">
    <img src="1.jpg"><img src="2.jpg"><img src="3.jpg"><img src="4.jpg">
    </div>

    What is the associated CSS code to do that?

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I believe the following should work.

    Code:
    .thumbs img {
     padding: 5px;
    }
    Change the number in red to increase or decrease the space.
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    padding didn't do anything.. Margin does though.


    div.thumbs img {
    margin: 15px;
    }

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
  •