473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

horizontal line

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
Jul 20 '05 #1
3 6360
"Bernd Kuegle" <of****@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
Jul 20 '05 #2
"Dave" <da**************@gmail.com> schrieb im Newsbeitrag
news:49**************************@posting.google.c om...
"Bernd Kuegle" <of****@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


Great! That works!
Thanks
Bernd
Jul 20 '05 #3
da**************@gmail.com (Dave) wrote:
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
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Mount | last post by:
Hi When I zoom into my site (http://www.petermount.au.com) with Opera 7.54 the horizontal scrollbar doesn't show when the site image is bigger than my screen. Yet the horizontal scrollbar shows...
2
by: Dan V. | last post by:
Why is there a large space before the background image (horizontal orange line under top NAV horizontal CSS list buttons) in Internet Expolorer 6 only? http://www.officeactivate.com/fish ...
2
by: Steve Teeples | last post by:
I have created a context menu within a treeview with several items. I want to separate them with a horizontal bar but can't find a way to do this. I've only seen a vertical bar with a break...
1
by: Marco Liedekerken | last post by:
Hi, I want a Horizontal scrollbar to appear in my Panel control when I add new controls to it (when the width is getting too big). The Vertical scrollbar is easy (adding overflow: auto to the...
2
by: Tina | last post by:
Am I missing something or does the listbox web control not have a horizontal scroll capability? Thanks, T
4
by: Sakharam Phapale | last post by:
Hi All, I have installed VS .NET 2002 on my machine. I have checked both Vertical scrollbar and Horizontal Scrollbar options, in Tools -> Options-> Text Editor-> General-> Vertical Scrollbar...
2
by: Csaba Gabor | last post by:
I have a table that sizes to take up most of the page's width. The (mostly empty) rightmost cell of a particular row starts off as wide as it can, but it might be that it gets something that...
2
by: pbd22 | last post by:
Hi. I am trying to make a horizontal list that counts (downward) and a horizontal list that illustrates the time. Both list should be formatted the same (except for the nomenclature). I seem to...
2
by: laredotornado | last post by:
Hi, Maybe I should break down and use tables, but I wanted to query the experts first. Below, I would like the words "First name" and "Last Name" to appear on the same horizontal and I would...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.