By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,359 Members | 1,481 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,359 IT Pros & Developers. It's quick & easy.

Make white space between <p> and <ul> equal to font size

P: n/a
My design goal is to make the white space above and below <p> and <ul> equal
to the height of my font. The first step to achieving this I believe is to
have an equal amount of white space above or below <p> and <ul>. Can someone
suggest a method using css to accomplish this? I have succeeded in doing
this in IE6 but I'd also like to know if there's a method to achive this
goal that will have a similar visual look in other modern browsers. TIA
Dec 8 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
namenotgivenhere wrote:
My design goal is to make the white space above and below <p> and <ul> equal
to the height of my font.


p, ul { margin: 1em 0 }

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Dec 8 '05 #2

P: n/a
"kchayka" <us****@c-net.us> wrote in message
news:3v*************@individual.net...
namenotgivenhere wrote:
My design goal is to make the white space above and below <p> and <ul> equal to the height of my font.


p, ul { margin: 1em 0 }

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.


Thank you for your answer. I think you're saying that the margin for both
will be 1em top and bottom and 0 left and right. Two questions. Will this
have a similar look in IE6 and other browsers? Why bother to specify 0 for
left and right margins, why not omit this? TIA
Dec 8 '05 #3

P: n/a
namenotgivenhere wrote:
"kchayka" <us****@c-net.us> wrote in message

p, ul { margin: 1em 0 }


Will this
have a similar look in IE6 and other browsers? Why bother to specify 0 for
left and right margins, why not omit this? TIA


Why don't you just try it and see how it works in your particular case?

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Dec 9 '05 #4

P: n/a
There is circumstantial evidence that on Thu, 08 Dec 2005 19:15:21
-0600, kchayka <us****@c-net.us> wrote
__________________________________________________ _____
namenotgivenhere wrote:
> "kchayka" <us****@c-net.us> wrote in message
>>
>> p, ul { margin: 1em 0 }
>
> Will this
> have a similar look in IE6 and other browsers? Why bother to specify 0 for
> left and right margins, why not omit this? TIA

Why don't you just try it and see how it works in your particular case?


One reason is that if someone has given the answer, I would now know
it instead of wondering what the answer was ;-)

--

Free washing machine help and advice. Free washing machine reviews. Buy washing machine parts.

www.washerhelp.co.uk

www.xyzed.co.uk/newsgroups/top-posting.html
Dec 28 '05 #5

P: n/a
saz
In article <sm********************************@4ax.com>,
xy***@xyzed.co.uk says...
There is circumstantial evidence that on Thu, 08 Dec 2005 19:15:21
-0600, kchayka <us****@c-net.us> wrote
__________________________________________________ _____
namenotgivenhere wrote:
> "kchayka" <us****@c-net.us> wrote in message
>>
>> p, ul { margin: 1em 0 }
>
> Will this
> have a similar look in IE6 and other browsers? Why bother to specify 0 for
> left and right margins, why not omit this? TIA

Why don't you just try it and see how it works in your particular case?


One reason is that if someone has given the answer, I would now know
it instead of wondering what the answer was ;-)

You don't get it. Check it out for yourself in various browsers, or are
you trying to say you are lazy and want others to do it for you?
Dec 28 '05 #6

P: n/a
namenotgivenhere wrote:
"kchayka" <us****@c-net.us> wrote in message
news:3v*************@individual.net...
namenotgivenhere wrote:
My design goal is to make the white space above and below <p> and <ul>
equal
to the height of my font.


p, ul { margin: 1em 0 }

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.

Thank you for your answer. I think you're saying that the margin for both
will be 1em top and bottom and 0 left and right. Two questions. Will this
have a similar look in IE6 and other browsers? Why bother to specify 0 for
left and right margins, why not omit this? TIA

margin: 1em 0;
The left and right don't have to be specified, but the alternative is
margin-top:1em; margin-bottom:1em;
Its just easier to do:
margin: 1em 0;

If you just did:
margin: 1em;

That would make the left and right margins 1em too, and you probably
don't want that.

Dec 28 '05 #7

P: n/a
There is circumstantial evidence that on Wed, 28 Dec 2005 13:39:22
-0600, saz <sa*****@nospammersexcite.com> wrote
__________________________________________________ _____

> One reason is that if someone has given the answer, I would now know
> it instead of wondering what the answer was ;-)
>
You don't get it. Check it out for yourself in various browsers, or are
you trying to say you are lazy and want others to do it for you?


Newsgroups are much bigger than that. One person gets a question
answered, and thousands of future people can find the answer
instantly. None of us want to research a problem, find that someone's
asked the same question before - only to find the answer was something
like "check it out your lazy self."

--

Free washing machine help and advice.

www.washerhelp.co.uk

www.xyzed.co.uk/newsgroups/top-posting.html
Dec 29 '05 #8

P: n/a
saz
In article <hp********************************@4ax.com>,
xy***@xyzed.co.uk says...
There is circumstantial evidence that on Wed, 28 Dec 2005 13:39:22
-0600, saz <sa*****@nospammersexcite.com> wrote
__________________________________________________ _____

> One reason is that if someone has given the answer, I would now know
> it instead of wondering what the answer was ;-)
>
You don't get it. Check it out for yourself in various browsers, or are
you trying to say you are lazy and want others to do it for you?


Newsgroups are much bigger than that. One person gets a question
answered, and thousands of future people can find the answer
instantly. None of us want to research a problem, find that someone's
asked the same question before - only to find the answer was something
like "check it out your lazy self."

So you are comfortable with others figuring it out for you? Your
problem is very minor and can be easily researched in a matter of
minutes on your own.

I stand by my lazy comment.
Dec 29 '05 #9

P: n/a
There is circumstantial evidence that on Thu, 29 Dec 2005 12:13:35
-0600, saz <sa*****@nospammersexcite.com> wrote
__________________________________________________ _____
So you are comfortable with others figuring it out for you? Your
problem is very minor and can be easily researched in a matter of
minutes on your own.

I stand by my lazy comment.


I'm very comfortable with that. Isn't that what Newsgroups are all
about? People who don't know, ask people who do, and the answers are
there forever for others to find? Long live Newsgroups. If people had
to work it out for themselves there's no point in Newsgroups. I fully
understand your point about people needing to be prepared to help
themselves though too, and not be totally lazy. It's a fine line at
times :-)

--

Free washing machine help and advice.

www.washerhelp.co.uk

www.xyzed.co.uk/newsgroups/top-posting.html
Dec 30 '05 #10

P: n/a
On Fri, 30 Dec 2005 08:41:21 +0100, xyZed <xy***@xyzed.co.uk> wrote:
Isn't that what Newsgroups are all
about? People who don't know, ask people who do, and the answers are
there forever for others to find?
What you describe is a helpdesk with a good archiving and tracking and
tracing system, not a newsgroup in usenet.
Long live Newsgroups.
Newsgroups are much more than Q&A.
If people had
to work it out for themselves there's no point in Newsgroups.


<URL:http://www.amatecon.com/fish.html>

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Dec 30 '05 #11

P: n/a
In article <op.s2k6z7xlx5vgts@zoete_b>,
"Barbara de Zoete" <b_********@hotmail.com> wrote:
<URL:http://www.amatecon.com/fish.html>


And of course the old:
Give a man a match and you warm him for a day.
Set a man on fire and you warm him for the rest of his life.
Any others? Anybody?

leo

--
<http://web0.greatbasin.net/~leo/>
Dec 30 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.