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

Horizontal rule and CSS problem 2

Status
Not open for further replies.

PeDa

Technical User
Oct 10, 2002
227
0
0
NL
The following code is intended to show left- and right-aligned text with <hr> just above and below. This works fine if the two texts fit on one line. If their combined width is greater that the screen width, the right-aligned text appears below the left-aligned one (which is what I want), but the bottom <hr> is between the two texts, and not below the bottom one. Any suggestions?

Code:
<hr style='padding:0px;margin:0px;'>
LEFT_TEXT<span style="float:right">RIGHT_TEXT</span>
<hr style='padding:0px;margin:0px;'>

 
Hi

You have to [tt]clear[/tt] the floating where you want to stop putting the pieces side by side :
HTML:
<hr style='padding:0px;margin:0px;'>
LEFT_TEXT<span style="float:right">RIGHT_TEXT</span>
<hr style='padding:0px;margin:0px;[highlight]clear:right[/highlight]'>

Feherke.
feherke.github.io
 
Hello Feherke,
Yes indeed; many thanks (once again!)
Peter Da
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top