|
|
| Bernd Kuegle 2004-08-26, 12:28 pm |
| 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
| |
|
| "Bernd Kuegle" <office@nowhere.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
| |
| Bernd Kuegle 2004-08-26, 12:28 pm |
| "Dave" <david.carrington@XXXXXXXXXX> schrieb im Newsbeitrag
news:49f3c93a.0408250337.172cecd3@posting.google.com...
> "Bernd Kuegle" <office@nowhere.com> wrote:
horizontal[color=darkred]
>
> 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
| |
| Spartanicus 2004-08-26, 12:28 pm |
| david.carrington@XXXXXXXXXX (Dave) wrote:
>
>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
| |
|
| "Bernd Kuegle" <office@nowhere.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
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |