Thomas Hopkins
Thomas Hopkins

Reputation: 691

CSS and HTML centred nav bar

I am trying to get my nav bar centered properly and with a 1px border on the left and right of each nav item (as opposed to 2px where two borders join together).

The site is www.berryconcept.co.uk/vouchfor

Any help would be appreciated.

Many thanks,

Tom

Upvotes: 0

Views: 145

Answers (2)

Klikster
Klikster

Reputation: 1164

In cases like this I generally proceed as follows:

I add the border for the first link as a border-left: 1px solid #ccc; on either the <ul> or the <div> encasing the ul and then set it so each <li> element has border-right: 1px solid #ccc; set.

Hopefully this helps.

If you post your code on a jsfiddle I'll update it for you. :)

Upvotes: 1

ANeves
ANeves

Reputation: 6395

To not have double border in the junction, you can give the items no border left and give the :first-child item border left: http://www.w3.org/TR/css3-selectors/#selectors

Upvotes: 2

Related Questions