How to control gaps in elements of <ul>

N

Netx

For example I uploaded a list in html:
http://www.cavea.yoyo.pl/index3.html
Please tell if it is possible (and how) to control space (a gap)
between:
"aaa" and a disc (or circle) at the left. Here it looks OK, but
in joomla I am at the point that somehow this gaps seems to have
grown and I want to minimize them possibly in stylesheet of the
template but I have no idea how to achieve this.

Thanks,
Mark
 
D

dorayme

"Netx said:
For example I uploaded a list in html:
http://www.cavea.yoyo.pl/index3.html
Please tell if it is possible (and how) to control space (a gap)
between:
"aaa" and a disc (or circle) at the left. Here it looks OK, but
in joomla I am at the point that somehow this gaps seems to have
grown and I want to minimize them possibly in stylesheet of the
template but I have no idea how to achieve this.

Best to get the mark up correct first.

<ul>
<li>AAA</li>
<li>BBB
<ul>
<li>aaa</li>
<li>bbb</li>
</ul>
</li>
</ul>

is one way. (Look closely at yours!)

Some left padding on the list items is a control on this. But you may
need to ensure all paddings and margins are specified on all ULs and LIs
for best cross browser similarity.

ul, li {padding: 0; margin: 0;}

and put in just the ones that matter to you below this. For example:

li {padding-left: 10px;}.

and some margin, important to get the bullets in. Different browsers
have their own defaults for how they place bullets.
 
L

Lars Eighner

the lovely said:
For example I uploaded a list in html:
http://www.cavea.yoyo.pl/index3.html
Please tell if it is possible (and how) to control space (a gap)
between:
"aaa" and a disc (or circle) at the left. Here it looks OK, but
in joomla I am at the point that somehow this gaps seems to have
grown and I want to minimize them possibly in stylesheet of the
template but I have no idea how to achieve this.


First, nest ULs properly:

<ul>
<li>aaa
<ul>
<li>bbb</li>
....
</li></ul>


When it is as you have:

<ul>
<li>aaa</li>
<ul>
<li> ...

when the browser comes to the second UL, it believes you closed the first
one implicitly.

All that can go in UL is LI. Bare text or another UL cannot.

The first step in styling a document is to be sure you have valid markup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top