Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS width not working in Firefox...

Status
Not open for further replies.

RISTMO

Programmer
Nov 16, 2001
1,259
US
Hey guys,

Here's a REALLY simple one, I'm sure ... but for some reason, this displays correctly in IE 6.0 but not Firefox. The width=200 isn't taking effect. Any ideas?

Code:
<style type="text/css">
<!--
.first{
	width:200px;
	text-align:left;
	color:#0022AA;
	font-size:14px;
	padding:10px;
	border:1px solid black;
}
.second{
	width:500px;
	text-align:left;
}
h2{
	color:#003366;
	font-size:24px;
	line-height:36px;
}
-->
</style>
<div style="text-align:left;">
<h2>Biographical Information</h2>
<span class="first">Title</span><span class="second"><input type="text" name="iTitle" value=""></span><br>
<span class="first">First Name</span><span class="second"><input type="text" name="iFirstName" value=""></span><br>
<span class="first">Last Name</span><span class="second"><input type="text" name="iLastName" value=""></span><br>
<span class="first">Middle</span><span class="second"><input type="text" name="iMiddle" value=""></span><br>
<span class="first">Suffix</span><span class="second"><input type="text" name="iSuffix" value=""></span><br>
<span class="first">Social Security Number</span><span class="second"><input type="text" name="iSSN" value=""></span><br>
<span class="first">Birthplace</span><span class="second"><input type="text" name="iBirthplace" value=""></span><br>

Thanks,
Rick

RISTMO Designs: Rockwall Web Design
Arab Church: Arabic Christian Resources
Genuine Autos: Kaufman Chevrolet & Pontiac Dealer
Rick Morgan's Official Website
 
Actually, it displays incorrectly in IE and it's FF that does a proper job. Span is an inline element as such cannot have a width specified to it. If you want to have something like that you will have to float two block elements next to each other.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top