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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS IE/Firefox span difference 1

Status
Not open for further replies.

FAM

Technical User
Jan 13, 2003
345
GB
At the botom of a paragraph, i have a span with copyright text on, im trying to make the top border to extend the width of the paragraph which it works exactly as expected in IE but only borders the actual text in FF,

HTML
Code:
<span class="bottomHorizontalLineText">© 2007 Alpha Personal Management</span>
CSS
Code:
.bottomHorizontalLineText{
	color:			#666666;
	font-size:		xx-small;
	text-align: 		center;
	border-top: 		solid 1px #CCCCCC;
	margin-top: 		10px;
	margin-left: 		auto;
	margin-right: 		auto;
	padding:		3px;
	width: 			100%;	

}
Any suggestions?
Thanks in Advance
 
Span is an inline element and as such does not accept (it ignores it) the width. In IE, this rule is a bit loose, so the width is actually accepted, even if it is invalid.

You should use some other element than span to produce this. If it is really part of a paragraph (an actual <p> element) and you are not able to use a block-level element (such as another p or a div), then giving your span [tt]display: block;[/tt] would solve your issue. But make sure you incorporate this solution only if using a real block level element is not possible.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Thanks Vragabond, another p or div was not an option so i used display: block; which worked as you said. Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top