473,769 Members | 6,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6376
"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.goo gle.com...
"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
3221
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 in print preview and when I turn css off in Opera. Could it be a problem with my css? The code is: html{ padding-top: 0; padding-bottom: 0;
2
3318
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 Thanks,
2
3333
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 feature. Does anyone have any suggestions on how to get a horizontal bar within a ContextMenu? Thanks.
1
6695
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 style attribute of the panel element). Now when I dynamicly add controls to the Panel control the controls are getting places at the next line (I did not add a <br>) instead of at the same line (the horizontal scrollbar should appear now). I...
2
4533
by: Tina | last post by:
Am I missing something or does the listbox web control not have a horizontal scroll capability? Thanks, T
4
2963
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 Horizontal Scrollbar
2
5248
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 exceeds its initial width, such as a long web address. In this case, I would like the horizontal overflow to be active. However, it seems that if I affix the style overflow-x:auto, then IE6 will cover the bottom line (of the text) with the...
2
2423
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 be successful with the y axis but, in my horizontal list (time), I can't seem to get it to scroll successfully. Below is the link, thanks:
2
1782
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 like the text fields to appear on the same horizontal. But I would like the words to appear above the text fields. The below creates four different lines: <div>
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.