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
Unwanted white space between divs in IE
Old 02-10-2009, 06:08 PM Unwanted white space between divs in IE
Novice Talker

Posts: 6
Trades: 0
Hi

I'm learning to create pure CSS layouts plus marking up .psd files. Could someone please advise me with an issue that's cropped up in a test file I'm working on.

It's the same old thing...it's fine in Firefox but there's a problem in IE 7. I'm getting unwanted white space between divs that hold images. If someone could take a look I'd be grateful.

Please note my CSS is in the head of the document rather than in an external file (just for this test) so rather than post the code here I thought people might just look at the source code.....

the url is ....
www.juanchandler.com/project1/
Once again the problem is that unwanted white space appears beneath the images on the far left.

Many thanks

Juan
juanc is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-11-2009, 03:50 AM Re: Unwanted white space between divs in IE
SolidEagle's Avatar
Experienced Talker

Posts: 30
Name: Arjan Nijmeijer
Location: Stadskanaal
Trades: 0
first of all, why are you slicing that image? I quess you still think in tabledesign :P I would recommend to use 1 div and place that image (the whole image not 3 slices) into that div. Make it float left and position it with margin OR with position:relative; whatever you like best.

If you still want to use the slices, try to place at the top of you're css:

*{
margin:0;
padding:0;
}

this means every element in you document will have their margins and paddings set to 0.
__________________
The Eagle Soars Above You!

Please login or register to view this content. Registration is FREE

Last edited by SolidEagle; 02-11-2009 at 03:51 AM..
SolidEagle is offline
Reply With Quote
View Public Profile
 
Old 02-11-2009, 10:02 AM Re: Unwanted white space between divs in IE
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
*{
margin:0;
padding:0;
}
As 'neat' as that seems, it's not advisable to do that, it does cause problems with other things. It's a good practice to zero out margins and padding on all of your major elements. You might want to try this instead: http://meyerweb.com/eric/tools/css/reset/

Something else you need to do. I see you have a lot of floats with no widths defined. When you float an element (other than an image), you MUST define a width, otherwise you're leaving it up to the browser to GUESS, and you don't want that!

Your #container isn't 'containing' anything because you have not properly CLEARED your floats.

SolidEagle is right, you've got way too many divs for that, and it appears you're still thinking in tables and not a css-based layout.

You might want to read thru this: www.cssslicingguide.com
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Last edited by LadynRed; 02-11-2009 at 10:06 AM..
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-11-2009, 11:49 AM Re: Unwanted white space between divs in IE
Novice Talker

Posts: 6
Trades: 0
Hello and thanks alot for your reply....
I think it's so embarassingly obvious that I'm a newbie to CSS layouts. I was wondering if you or anyone else might take a look at this screenshot of the full .psd since what I've done is only part of the wider picture.....
http://www.juanchandler.com/project1/screenshot.html

So could you or anyone else say verbally what would be the best approach to mark it up with CSS
I don't mean give me the code but just some starting points on where the slices should be and the div layout.

Many thanks

Juan
juanc is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Unwanted white space between divs in IE
 

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.19499 seconds with 12 queries