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

bottom padding or margin in ul?

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
19 15674
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
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
"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
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
"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
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
"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
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
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
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
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

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

Similar topics

12
by: Andrew Thompson | last post by:
I am developing a Periodic Table of the Elements as<DIV>s ..(chuckle - just kidding!) a <TABLE> at http://www.physci.org/test/chem/, or rather, the table itself is.....
2
by: Lukasz Grabun | last post by:
There's a page http://www.dwarfscorner.com It looks as nice as I could design it; I like it, I think. There's just one thing I can't get along with: the vertical allignment of h2 in grey and...
3
by: PeteCresswell | last post by:
Whenever I write a Form_Resize() routine, I define a constant "botMargin" and set it to something that works. Problem is, I don't have a clue as to what values are involved and it's usually a...
1
by: Edward | last post by:
I created a simple CSS layout (code and example below) for bloggin/writing but ran into five issues that I need help with: 1. How do I get rid of the right-margin red line on the last three...
11
by: sllrphoto | last post by:
A veteran of early html, I've modified my blog template and made it look rather clean (albeit rather plain) when viewed with IE. Ironically, I'm a big Firefox fan, but when viewed in FF, my blog...
3
by: Daz | last post by:
Hi everyone. I have just been making a JavaScript chat applet, which should open in a new child window. It does all of this fine, and works within Firefox beatifully. However, IE thinks it's...
0
by: as702ecs | last post by:
hi guys, bit of a strange one. when using the holly hack to address the well-documented "expanding box" problem in ie6, i encounter an undesired side-affect - all my unordered list items exhibit a...
2
dlite922
by: dlite922 | last post by:
Live code: http://mfs.dmconsultingonline.com/ The red border is to see what I'm talking about. As you can see in FF and IE6 the bottom border (red) are at the same level, but the image itself is...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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,...
0
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...

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.