Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
trying to have rows of 4 pictures, all div layout, not working
Old 05-30-2008, 05:17 PM trying to have rows of 4 pictures, all div layout, not working
Extreme Talker

Posts: 177
Trades: 0
heres what it looks like:
but it shouldn't have that gap on the second row.

the way I have it set-up is this

HTML Code:
<div id="navigation"> (top navigation part...not concerned about)
</div>
<div id="photos_search_container"> (main container with the background image)
<div id="photos_container"> (left container for the photos, the issue :] )
<div class="images"> just used to put a border around the images
<div id="thumnbail_container"> (images are inside here, width set to 130px)
</div> (end div thumbnail container)
....(repeat thumbnail container)
....
</div> (end images div)
</div> (end photos_container div)
<div id="search_container"> (right side of photos_search_container)
</div> (end search_container div)
</div> (end photos_search_container div)
The css is as follows:

HTML Code:
#photos_container
{
margin:0px auto;
width:650px;
border-right:1px double #02425B;
float:left;
margin-top:10px;
margin-left:10px;
text-align:center;
}
#photos_search_container
{
margin:0px auto;
padding:0px;
width:950px;
border:0px;
background-repeat: no-repeat;
background-image:url('http://fc08.deviantart.com/fs27/f/2008/128/4/7/BG_by_IkeGFX.jpg');
}
/* self clearing rules */
#photos_search_container:after
{
    content: "."; 
    display: block; 
    height: 0; 
    clear: both; 
    visibility: hidden;
}
#photos_search_container
{
    display:inline-block;
    _height:1%;
}
/* Hides from IE-mac \*/
#photos_search_container
{
    display:block;
}
.images img
{
border:0;
border:5px solid white;
border-style: double;
float:left;
position:relative;
}
#thumbnail_container
{
    position:relative;
    float:left;
    width:140px;
    margin-left:3px;
    margin-right:3px;
    margin-bottom:3px;
}
#search_container
{
float:right;
width:289px;
height:400px;
margin:auto;
display:block;
margin-top:10px;
}
I've been playing around with it a bunch, but have had no luck in finding the solution. Thanks for any help.

Last edited by kbfirebreather; 06-01-2008 at 02:05 PM..
kbfirebreather is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-30-2008, 06:05 PM Re: trying to have rows of 4 pictures, all div layout, not working
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
The fifth image is floating against the third image, which is slightly taller than it's immediate siblings. Unless you enforce a certain height on all images (which doesn't look practical) you will have to clear every fifth image, like this:

HTML Code:
<style>
img.clear {
clear: both;
}
</style>
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-01-2008, 08:27 PM Re: trying to have rows of 4 pictures, all div layout, not working
vn5ltr's Avatar
Skilled Talker

Posts: 93
Location: Melbourne, Australia
Trades: 0
The problem is that your class name doesn't match your div ID.
The div ID should be "thumbnail_container", not "thumnbail_container".
There isn't an issue with the clearing as they are self-cleared because of the specified width.
Cheers.
vn5ltr is offline
Reply With Quote
View Public Profile
 
Old 06-02-2008, 11:00 PM Re: trying to have rows of 4 pictures, all div layout, not working
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
Ah, the evil typo.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Reply     « Reply to trying to have rows of 4 pictures, all div layout, not working
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21061 seconds with 12 queries