PDA

View Full Version : Quick simple question



bAteseh
19 Aug 2010, 03:04 PM
Was wondering how you guys would go about doing this; basically I want a list of links to indent underneath one another.

For example this is my HTML code:



<ul id="nav">
<li id="link1"><a href="index.htm">Link 1</a></li>
<li id="link2"><a href="index.htm">Link 2</a></li>
<li id="link3"><a href="index.htm">Link 3</a></li>
<li id="link4"><a href="index.htm">Link 4</a></li>
<li id="link5"><a href="index.htm">Link 5</a></li>
<li id="link6"><a href="index.htm">Link 6</a></li>
</ul>


But I want each link to look like this:



Link 1
Link 2
Link 3
Link 4
Link 5
Link 6


Obviously not to that extreme but you get the idea.

Is it the margin code or the padding code I will need to mess about with?

Any help would be appreciated, thanks!

EDIT: I am editing the format of the page in CSS.

bAteseh
19 Aug 2010, 03:10 PM
Never mind lol. Sorted it myself

CSS


#link2 a
{
margin: 5%;
}

#link3 a
{
margin: 10%;
}

#link4 a
{
margin: 15%;
}

#link5 a
{
margin: 20%;
}

#link6 a
{
margin: 25%;
}



Can be used for research purposes or can be deleted. Thanks.