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

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

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
11 5146
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
"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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Michael | last post by:
This is a two-part question to which I haven't been able to find an answer anywhere else. 1. Is it possible to format the bullet/number character of the <li>? In my styles sheet, I have the <li>...
4
by: Matt | last post by:
Hi, Got an unordered list with 100% width, with 5 list items of 20% width styled to fill the width of the container element. Renders fine in Mozilla, but when you change the size of the window...
16
by: michael | last post by:
Is it possible to get all href URLs contained in a unordered list and place them in an array? Or in fact two different arrays, differently named one for each <ul> group? <ul> <li><a...
2
by: Andrew Donaldson | last post by:
I'd welcome some help in understanding what's going on with graphical browsers in the navigation list at: http://www.bounceandtickle.org.uk/index.html (This site is not about what it might...
4
by: Japhy | last post by:
Hello, I'm am pulling data from a mysql db and want to use the data to populate a <ul. Here are relavent parts of my code : $wohdate = mysql_result($wohRS,$wohndx,woh_date); $woh_display...
4
by: Viken Karaguesian | last post by:
Hello all, I'm have an annoyance I can't seem to solve. I'm working on a website that has a sidebar floating to the right. In the sidebar is an unordered list. In IE and in Opera, the list shows...
1
by: jasonchan | last post by:
How do you align <ol> and <ul> elements when they are contained in a floated box? Here is my website: http://geocities.com/jasonchan483/ Here's my problem. The markers of the lists are...
5
by: Syl | last post by:
Hello experts!! The top menu navigation bar displays perfectly in IE, but does not display properly in Mozilla or Netscape : http://checkeredshirt.com/textonly.html For some reason the non-IE...
2
by: Shahid | last post by:
Hi, I am parsing an .HTML file that contains following example code: <div> <p class="html_preformatted" awml:style="HTML Preformatted" dir="ltr" style="text-align:left"><span...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.