473,386 Members | 1,652 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,386 software developers and data experts.

blank space after P, UL, Hx and so on

Hello,

Is there a means, with CSS or else, to remove or resize the blank line
after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
found nothing !

Thanks for your answers !

Antoun
Jul 21 '05 #1
4 17129
Els
Antoun wrote:
Hello,

Is there a means, with CSS or else, to remove or resize the blank line
after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
found nothing !


Then you must have made a mistake somewhere, as it is the
margin-bottom of the <p> element.

Unless of course you were looking at the margin-top of the next
element ;-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #2
Antoun wrote:
Hello,

Is there a means, with CSS or else, to remove or resize the blank line
after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
found nothing !

Thanks for your answers !

Antoun


What Els is hinting at is:
In HTML, extra leading is provided before and after every block element
by means of margin-top and margin-bottom values.
The extra leading of the preceding block's margin-bottom value and the
following block's margin-top value is collapsed down to only one (or
to the largest, if they are of different value).
In order to remove the extra line leading between two block elements,
you must use CSS to remove margin-bottom of the preceding element and
margin-top of the following element, by setting them to zero.
If you wish to create your own leading value between two block elements,
give one of them the value of zero and the other the value that you want.

--
Gus
Jul 21 '05 #3
"Antoun" wrote in comp.infosystems.www.authoring.stylesheets:
Hello,

Is there a means, with CSS or else, to remove or resize the blank line
after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
found nothing !


If you have

<style type="text/css"> p {margin-bottom:0} </style>
....
<p>para 1</p>
<p>para 2</p>

then the you will still see a blank line between paragraphs (in
most browsers) because the default styling in most browsers is
p {margin-top:1em; margin-bottom:1em}
or similar. You see one blank line between, not two, because in CSS
the bottom margin of one element merges with the top margin of teb
next element.

This means that you can't just think about bottom margins, you need
to think about top and bottom margins.

And before you just do
p {margin-top:0; margin-bottom:0}
think abut how readable your text will be if there's no space
between paragraphs. At least you'd want to create a first-line
indent.

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Jul 21 '05 #4
OK !

I had found a heuristic solution, which was margin-bottom: -1em, but now
I understand the whole thing !

Thanks to you all !

Antoun
Jul 21 '05 #5

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

Similar topics

7
by: JDS | last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to JavaScript: I have a long, dynamically-generated form questionnaire. Not all of the form fields are dynamically...
8
by: dmcconkey | last post by:
Hi folks, I have a client with four websites. Each site has a contact form that is identical. They all have "required" fields validated through a JavaScript onSubmit() function. Upon validation,...
2
by: barb28 | last post by:
Hello, sometimes I have noticed that in web addresses, the number: 20% will show up in the address. I think this is somehow related to a 'blank space', but am unsure, does anyone know about...
0
by: Penguin | last post by:
Using Access 97, I've created a grading sheet. To save space, the subjects are in vertical columns on a sub-report, like so: Math Spelling Reading N C T A A E U A I ...
2
by: Amir | last post by:
I really hope someone can explain this behavior. I have spend quite a bit of time and tried a bunch of things, so far nothing has worked. I have a page on which I have a datagrid with template...
12
by: Seller | last post by:
I am using Wordpress 2.0.6 on Fedora Core 5. An RSS feed is not working for http://survivalofthesickestthebook.com/blog/?feed=rss2 When I use feed validator...
42
by: =?Utf-8?B?UGxheWE=?= | last post by:
I have an if statement that isn't working correctly and I was wondering how I check for a blank string. My Code Example if me.fieldname(arrayIndex) = "" then ----- end if When I do this and...
4
by: power2005 | last post by:
Hi Experts I run into a problem I can't seem to be able to resolve or find the solution to. Basically I have a list of sample data as follow - Country Company ------- -------- US ...
4
by: BibhuAshish | last post by:
Hi, I wanted to delete a line from xml file which i did it. But after deletion of that line there is a blank space. Again if i am adding another line by using java that blank line remains as...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.