Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Horizontal rule and CSS problem

Horizontal rule and CSS problem

Horizontal rule and CSS problem

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?


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

RE: Horizontal rule and CSS problem


You have to clear the floating where you want to stop putting the pieces side by side :


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


RE: Horizontal rule and CSS problem

Hello Feherke,
Yes indeed; many thanks (once again!)
Peter Da

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close