1 reply [Last post]
seb
Offline
Enthusiast
Last seen: 15 years 16 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

Have tested this in IE5, IE5.5 and Firefox and it works fine, just not in IE6.

label
{	display:			block;
	text-align:			right;
	width:				150px;
	padding-right:		20px;}

input, label
{	float:				left;
	margin-bottom:		10px;}

.section
{	background:			#eee;
	border:				1px solid #090;
	padding:			20px;
	margin:				20px;}
	

br
{	clear:				both;}

		<div id="personal" class="section">
			<h3>Personal information</h3>
			
			<label>Name</label>
			<input type="text" />
			<br />
			
			<label>Current Role</label>
			<input type="text" />
			<br />
			
			<label>Area</label>
			<input type="text" />
			<br />
			&nbsp;
		</div>

The text in the <h3> doesn't initially show, but if I select the invisible text then it fixes the page and it'll show until I hit F5 when it disappears again.

Can't really give a link since my CTO doesn't like us passing our demo URLs out apart from to customers.

Anyone know of a fix?

The &nbsp; at the end fixes another problem I found - without it it was impossible to get any padding or margin between this div and the next.

seb
Offline
Enthusiast
Last seen: 15 years 16 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

Text not displaying when floating elements in IE6

Found a fix:

h3, p
{	position:			relative;} 

Cheers to the guys at evolt! Smile

http://www.evolt.org/article/MSIE6_bug_with_floating_divs_and_spacers/17/23899/