using unordered lists to recreate navigation links

H

Hardeep Rakhra

Hi,

I currently have a set of navigation links across the bottom of a page
in this manner;

Site Links: Link1 | Link2 | Link2 | .... etc.

like this "<p>Site Links: <a href="index.html">Home</a> | <a
href="join.html">Join</a> | <a href="howtobuy.html">How to Buy</a>
| <a href="terms.html">Terms and Conditions</a> | <a
href="privacy.html">Privacy Policy</a> | <a
href="contactus.html">Contact Us</a> </p>"

now i wanna recreate that as a unordered list and have done so like this;

<ul id="sitelinks">
<li>Site Links:</li>
<li><a href="index.html">Home</a></li>
<li><a href="join.html">Join</a></li>
<li><a href="howtobuy.html">How to Buy</a></li>
<li><a href="terms.html">Terms and Conditions</a></li>
<li><a href="privacy.html">Privacy Policy</a></li>
<li><a href="contactus.html">Contact Us</a></li>
</ul>

and the CSS like this...

#sitelinks {
font: 66%/1.8 arial, sans-serif;
color: #bbb;
list-style: none;
padding: 0;
margin: 0;
}

#sitelinks li {
display: inline;
margin: 0 0.6em 0 0;
}

My question how can i (if possible) recreate the dividing pipes &#124
(|) between each link. I could put it in as part of the list but want
to try and accomplish this using CSS. I know it's gonna be something to
so with manipulating the bullet points but can't work out how.


Thank you in advance.

Hardeep.
 
C

Chris Harris

My question how can i (if possible) recreate the dividing pipes &#124
(|) between each link. I could put it in as part of the list but want
to try and accomplish this using CSS. I know it's gonna be something to
so with manipulating the bullet points but can't work out how.


you could just define a right border and define a class of last item
with no right border.

Chris
 
T

Toby A Inkster

Hardeep said:
My question how can i (if possible) recreate the dividing pipes &#124
(|) between each link. I could put it in as part of the list but want
to try and accomplish this using CSS.

#sidelinks li {
padding-left: 0.5em;
border-left: 1px solid black;
margin-left: 0.5em;
}
 
T

Toby A Inkster

Hardeep said:
I know it's gonna be something to
so with manipulating the bullet points but can't work out how.

Oh, you still have bullet points? Then add to my previous answer:

#sitelinks li { list-style: none; }
 
H

Hardeep Rakhra

Chris said:
you could just define a right border and define a class of last item
with no right border.

Doh! I didn't think of that :0) Doing exactly that with my main menu.
Oh well pipe dreams i guess.

Thanks!

Hardep.
 

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