Forum Moderators: not2easy

Message Too Old, No Replies

Controling Margins around <hr> Element

Can you controll it in HR? and in common text?

         

silverbytes

1:40 am on Oct 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wonder how to reduce the vertical space caused by the tag HR. Is there any way to set the distance of next object placed in to the horizontal rule?

Also what excactly sets the vertical space between text lines in .css?

TGecho

2:19 am on Oct 14, 2003 (gmt 0)

10+ Year Member



experiment with line-height, margin-top, and margin-bottom.

silverbytes

2:40 pm on Oct 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I did unsuccessfullyl
line height does not control space... just height.

Anyone?

silverbytes

5:47 pm on Oct 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



padding or margin doesnt't help.
Can you eliminate the vertical space between you horizontal rule and next element (let's assume is text).

any workaround?

birdbrain

6:54 pm on Oct 14, 2003 (gmt 0)



hi there silverbytes,

Here are two work-a-rounds...


(normal)This is the text<hr />This is more text<br /><br />

(1)........ This is the text<div style="border-top: solid 2px #bbbbbb;margin:0;"></div>This is more text<br /><br />

(2)........ <div style="line-height:0.1">This is the text<hr >This is more text</div>

The second is the tightest that you can go.

birdbrain

silverbytes

8:31 pm on Oct 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you! I'll try it