HighDots Forums  

horizontal line

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss horizontal line in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bernd Kuegle
 
Posts: n/a

Default horizontal line - 08-25-2004 , 01:43 AM






Hi!
How is it possible to reduce the space between a pargraph and a horizontal
line (top and bottom). It doesn´t look so good if there is the default
space.

Thanks
Bernd



Reply With Quote
  #2  
Old   
Dave
 
Posts: n/a

Default Re: horizontal line - 08-25-2004 , 06:37 AM






"Bernd Kuegle" <office (AT) nowhere (DOT) com> wrote:
Quote:
Hi!
How is it possible to reduce the space between a pargraph and a horizontal
line (top and bottom). It doesn´t look so good if there is the default
space.

Thanks
Bernd
A horizontal rule (<hr>) doesn't default to have any spacing, it's the
paragraphs themselves that create the spacing.

p { margin: 4px; }

The above CSS would set the margin on paragraphs to 4 pixels,
hopefully you can change this to suit your needs.

Dave


Reply With Quote
  #3  
Old   
Bernd Kuegle
 
Posts: n/a

Default Re: horizontal line - 08-25-2004 , 08:04 AM



"Dave" <david.carrington (AT) gmail (DOT) com> schrieb im Newsbeitrag
news:49f3c93a.0408250337.172cecd3 (AT) posting (DOT) google.com...
Quote:
"Bernd Kuegle" <office (AT) nowhere (DOT) com> wrote:
Hi!
How is it possible to reduce the space between a pargraph and a
horizontal
line (top and bottom). It doesn´t look so good if there is the default
space.

Thanks
Bernd

A horizontal rule (<hr>) doesn't default to have any spacing, it's the
paragraphs themselves that create the spacing.

p { margin: 4px; }

The above CSS would set the margin on paragraphs to 4 pixels,
hopefully you can change this to suit your needs.

Dave
Great! That works!
Thanks
Bernd




Reply With Quote
  #4  
Old   
Spartanicus
 
Posts: n/a

Default Re: horizontal line - 08-25-2004 , 08:16 AM



david.carrington (AT) gmail (DOT) com (Dave) wrote:

Quote:
How is it possible to reduce the space between a pargraph and a horizontal
line (top and bottom). It doesn´t look so good if there is the default
space.

A horizontal rule (<hr>) doesn't default to have any spacing
The correct phrase is margins. And a hr does have default margins in all
UAs I know.

For the OP: first consider not messing with the default margins, they
are there for a reason.

Note that once you start messing with default margins you can easily get
into a quagmire and you could end up with having to specify margins far
more often than you should.

If you absolutely must you may need to set margins on both the
paragraph and the hr, read up on the phenomena of collapsing margins
first. Note that a common problem is that IE does not allow the margins
on hr's to be set below a certain value.

--
Spartanicus


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.