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

bottom padding or margin in ul?

P: n/a
I have an unordered list as menu and want some space at the bottom,
underneath the last <li>.
I have tried:
setting bottom-margin to ul
setting bottom-margin to containing <div>
setting padding to ul and <div>
and all combinations of the above I could think of.

None seems to work.

Can someone tell me what I should do to get the desired effect?

I would be very grateful.
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #1
Share this Question
Share on Google+
19 Replies


P: n/a
On Thu, 29 Jan 2004 17:26:36 +0100, A.Translator
<ad******************@yaBISHhoo.com> wrote:
I have an unordered list as menu and want some space at the bottom,
underneath the last <li>.
I have tried:
setting bottom-margin to ul
setting bottom-margin to containing <div>
setting padding to ul and <div>
and all combinations of the above I could think of.

None seems to work.

Can someone tell me what I should do to get the desired effect?

I would be very grateful.


Post a URL to the problem?
Jul 20 '05 #2

P: n/a
On Thu, 29 Jan 2004 11:31:34 -0500, Neal wrote:
Post a URL to the problem?


http://www.xs4all.nl/~hogen/TaalVlinder/ :
second menu from left 'vaktaal' illustrates the problem: I want white
space at the bottom so that the text of the menu does not get hard to read
because of getting mixed into the content text.

Thank you for replying so promptly!
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #3

P: n/a
"A.Translator" <ad******************@yaBISHhoo.com> wrote:
I have an unordered list as menu and want some space at the bottom,
underneath the last <li>.
I have tried:
setting bottom-margin to ul


No such property. Did you try margin-bottom as well?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4

P: n/a
On Thu, 29 Jan 2004 17:02:06 +0000, Steve Pugh wrote:
Did you try margin-bottom as well


Oops! Yes, I did.
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #5

P: n/a
"A.Translator" <ad******************@yaBISHhoo.com> wrote:
On Thu, 29 Jan 2004 17:02:06 +0000, Steve Pugh wrote:
Did you try margin-bottom as well


Oops! Yes, I did.


And?

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #6

P: n/a
On Thu, 29 Jan 2004 17:24:09 +0000, Steve Pugh wrote:
And?


Oops again: no joy.
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #7

P: n/a
"A.Translator" <ad******************@yaBISHhoo.com> wrote:
http://www.xs4all.nl/~hogen/TaalVlinder/ :
second menu from left 'vaktaal' illustrates the problem: I want white
space at the bottom so that the text of the menu does not get hard to read
because of getting mixed into the content text.


Oh, I see the problem. You need to set a background-color for the
class .menu

Otherwise all the space you create (with margin-bottom on the ul or
padding-bottom on the .menu div) is transparent and the rest of the
page shows through.

You will need to adjust the margin-left and padding-left on the ul and
li as there's a lot of white space to the left of the list at the
moment. Remember to check across several browsers as there are major
differences in the default values.

Alternatively,
..menu ul {border-bottom: 1em solid white;}
will also do what you want.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #8

P: n/a
On Thu, 29 Jan 2004 17:26:36 +0100, A.Translator wrote:
I have tried:
setting bottom-margin to ul
setting bottom-margin to containing <div>
setting padding to ul and <div>


Somehow setting the bg-color of the containing <div> to white has the
effect of creating a white padding at the bottom - which I want - but also
to the left and right of the ul - which I do not want.

This happens even if no padding at all has been anywhere.

--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #9

P: n/a
A.Translator wrote:
On Thu, 29 Jan 2004 17:26:36 +0100, A.Translator wrote:

Somehow setting the bg-color of the containing <div> to white has the
effect of creating a white padding at the bottom - which I want - but also
to the left and right of the ul - which I do not want.

This happens even if no padding at all has been anywhere.


Try to give all elements involved (the <div>, the <ul> and the <li>) a
thin border (green or red or something) and see where it is in the page.
From there you can play around more effectively with all the padding
and margins involved (set all to zero for example and see what happens.
Add some left-right padding to the <ul> and see what happens and so on).

BTW: test it in other browsers than Internet Explorer, as IE has quite a
different behaviour with the boxmodel (padding and margins and borders
on a block element) than the standards require (which other mainstream
graphical browsers seem to follow just fine).

--

Barbara

http://home.wanadoo.nl/b.de.zoete/html/weblog.html
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html

Jul 20 '05 #10

P: n/a
On Thu, 29 Jan 2004 17:47:28 +0000, Steve Pugh wrote:
Oh, I see the problem. You need to set a background-color for the
class .menu


Yes, I found that just before your posting,but your explaining the how and
why helps a lot.

I will play around with the various suggestions.

This is only my second posting in this group and I remain impressed with
the quick, friendly and helpful replies.

Thanks you all!
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #11

P: n/a
On Thu, 29 Jan 2004 19:01:09 +0100, Barbara de Zoete wrote:
BTW: test it in other browsers than Internet Explorer, as IE has quite a
different behaviour with the boxmodel (padding and margins and borders
on a block element) than the standards require (which other mainstream
graphical browsers seem to follow just fine).


Thanks for warning me about that: my standard browser is Mozilla 1.5, which
does what I want, but obviously I test in at least IE as well.

Still struggling.

[interlude in Dutch]
(heb even op je site gekeken: leuk! en kom zeker terug om van je css tips
te leren).
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #12

P: n/a

"A.Translator" <ad******************@yaBISHhoo.com> wrote in message
news:st***************@www.translatoria.com...
On Thu, 29 Jan 2004 19:01:09 +0100, Barbara de Zoete wrote:
BTW: test it in other browsers than Internet Explorer, as IE has quite a
different behaviour with the boxmodel (padding and margins and borders
on a block element) than the standards require (which other mainstream
graphical browsers seem to follow just fine).
Thanks for warning me about that: my standard browser is Mozilla 1.5,

which does what I want, but obviously I test in at least IE as well.

Still struggling.

[interlude in Dutch]
(heb even op je site gekeken: leuk! en kom zeker terug om van je css tips
te leren).


<p lang="nl">Zo veel Nederlanders in een plaats. (Nij, 'k ben niet een
ervan.)</p>

Jul 20 '05 #13

P: n/a
A.Translator wrote:
On Thu, 29 Jan 2004 19:01:09 +0100, Barbara de Zoete wrote:
BTW: test it in other browsers than Internet Explorer, as IE has quite a
different behaviour with the boxmodel (padding and margins and borders
on a block element) than the standards require (which other mainstream
graphical browsers seem to follow just fine).
Thanks for warning me about that: my standard browser is Mozilla 1.5, which
does what I want, but obviously I test in at least IE as well.


Sorry about that. I assumed the obvious, but with you things are
different. Okay for using various browsers.
Still struggling.
It will be like that like for ever :-D or so it seems. Every time you
think of something you start all over with new features for new elements.
[interlude in Dutch]
(heb even op je site gekeken: leuk!
Dank.
en kom zeker terug om van je css tips
te leren).


Volgens mij ben je daar al voorbij, maar als er iets van je gading bij
zit, graag gedaan.

--

Barbara

http://home.wanadoo.nl/b.de.zoete/html/weblog.html
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html

Jul 20 '05 #14

P: n/a
Harlan Messinger wrote:
"A.Translator" <ad******************@yaBISHhoo.com> wrote in message
news:st***************@www.translatoria.com...

[interlude in Dutch]
(heb even op je site gekeken: leuk! en kom zeker terug om van je css tips
te leren).


<p lang="nl">Zo veel Nederlanders in een plaats. (Nij, 'k ben niet een
ervan.)</p>


Hehheh. Hele kudde. Is wel leuk. Nederlanders tegen de Finnen :-)

Als jij niet een Nederlander bent, wat dan wel? En hoe kom je aan je
Nederlands?

--

Barbara

http://home.wanadoo.nl/b.de.zoete/html/weblog.html
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html

Jul 20 '05 #15

P: n/a
On Thu, 29 Jan 2004 23:46:31 +0100, Barbara de Zoete wrote:
Thanks for warning me about that: my standard browser is Mozilla 1.5, which
does what I want, but obviously I test in at least IE as well.


Sorry about that. I assumed the obvious, but with you things are
different. Okay for using various browsers.


It was a genuine thank you! You weren't to know I tested in various
browsers. It is IE though that causes me most headaches...
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #16

P: n/a
A.Translator wrote:
It is IE though that causes me most headaches...


I know. I made the choice to try and present an optimum in IE for Win,
because most people in the Netherlands _do_ use IE on Win machines and
my pages are in Dutch, targetting the Dutch audience. I know it is hard
to _know_ what browsers your audience _do_ use. A best guess is all I did.

But, I also want my site to be at least working, preferrably with some
nice presentation (be it different from what I prefer), in mainstream
graphical browsers. And Lynx of course. They have to be perfect with
Lynx, because that for me is _the_ test for the markup of my content.

So, I choose not to struggle with IE. I don't really write for that
browser, but my styles are targetting the visitors that use IE, recent
versions.

--

Barbara

http://home.wanadoo.nl/b.de.zoete/html/weblog.html
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html

Jul 20 '05 #17

P: n/a
Barbara de Zoete <b_********@hotmail.com> wrote:
Harlan Messinger wrote:
"A.Translator" <ad******************@yaBISHhoo.com> wrote in message
news:st***************@www.translatoria.com...

[interlude in Dutch]
(heb even op je site gekeken: leuk! en kom zeker terug om van je css tips
te leren).


<p lang="nl">Zo veel Nederlanders in een plaats. (Nij, 'k ben niet een
ervan.)</p>


Hehheh. Hele kudde. Is wel leuk. Nederlanders tegen de Finnen :-)

Als jij niet een Nederlander bent, wat dan wel? En hoe kom je aan je
Nederlands?


Amerikaner. Ik woonte drie jaren in Brussel, 30 jaar geleden, en ik
heb het meestendeels van de ondertitels van de engelstalige
televisieprogramma's geleert.. Ik weet niet zo veel woorden--ik moest
"kudde" in 't woordenboek zoeken--maar ik heb de taal graag.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #18

P: n/a
On Fri, 30 Jan 2004 00:04:05 +0100, Barbara de Zoete wrote:
So, I choose not to struggle with IE. I don't really write for that
browser, but my styles are targetting the visitors that use IE, recent
versions.


I make only non-commercial sites targeted at visitors that probably
wouldn't even notice what went wrong, but I do want a site to look good in
IE, simply because it is the most popular browser, whether I like it or
not.

I have been working in html for a while, but only recently started to use
css (shying away from css-P, though! At least for now) and run into
problems with IE, whereas before it was the other way around: IE seems to
swallow a lot of wobbly html-code, but does not render 'proper' css as well
as Mozilla for instance (mind you, I do not yet write proper css, so often
I have only myself to blame).

Still, css is like magic to me: fiddle a bit with a stylesheet and presto!
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]
Jul 20 '05 #19

P: n/a
On Thu, 29 Jan 2004 23:35:16 -0500, Harlan Messinger
<hm*******************@comcast.net> wrote:
Barbara de Zoete <b_********@hotmail.com> wrote:
Harlan Messinger wrote:
"A.Translator" <ad******************@yaBISHhoo.com> wrote in message
news:st***************@www.translatoria.com...

[interlude in Dutch]
(heb even op je site gekeken: leuk! en kom zeker terug om van je css tips
te leren).

<p lang="nl">Zo veel Nederlanders in een plaats. (Nij, 'k ben niet een
ervan.)</p>


Hehheh. Hele kudde. Is wel leuk. Nederlanders tegen de Finnen :-)

Als jij niet een Nederlander bent, wat dan wel? En hoe kom je aan je
Nederlands?


Amerikaner. Ik woonte drie jaren in Brussel, 30 jaar geleden, en ik
heb het meestendeels van de ondertitels van de engelstalige
televisieprogramma's geleert.. Ik weet niet zo veel woorden--ik moest
"kudde" in 't woordenboek zoeken--maar ik heb de taal graag.


En hier heb je er nog een. Ik verhuisde van Engeland naar Nederland 20
jaar geleden, met het idee dat het leuk zou zijn om een ander land te
proberen voor een jaar of twee ...

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #20

This discussion thread is closed

Replies have been disabled for this discussion.