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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
IE6 adds space inside DIV because of line break?!?
Old 07-01-2005, 01:12 PM IE6 adds space inside DIV because of line break?!?
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<title>Test</title>
	</head>

	<body>
		<div style="background-color:red;margin:0;padding:0">
			<img src="nothing.gif" alt="" height="90" width="760" border="1"/>
		</div>
	</body>

</html>
so in IE6, there's a space between the image and the bottom of the div, when there shouldn't be. If I change:

HTML Code:
<img src="nothing.gif" alt="" height="90" width="760" border="1"/>
		</div>
to:

HTML Code:
<img src="nothing.gif" alt="" height="90" width="760" border="1"/></div>
...removing the line break, there is no more space. Is there a way to fix this bug? Sometimes when I open my hand written code in GoLive it will change the div formatting and add the carriage return again, and will just be pain in the butt later. PLus I like to keep the carriage returns so it's easy to look through the code. Any CSS or other tricks? Thanks.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
 
Register now for full access!
Old 07-01-2005, 01:46 PM
onlyplace4's Avatar
Extreme Talker

Posts: 159
Location: Skegness, Lincolnshire, England
Trades: 0
It's not so much the line break as that old enemy "white space". IE has always seemed to have had a problem with handling white space.

Unfortunately I can't think of any quick fix off the top of my head, but I will have a play with the code this evening and let you know what I come up with. You could try constraining the dimensions of the div. Anyway, I will let you know what I come up with.
__________________

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


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


Please login or register to view this content. Registration is FREE
onlyplace4 is offline
Reply With Quote
View Public Profile Visit onlyplace4's homepage!
 
Reply     « Reply to IE6 adds space inside DIV because of line break?!?
 

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