Posted by Martin Jay on 11/18/07 01:42
On Sat, 17 Nov 2007 22:58:12 -0000, <news.freedom2surf.net> wrote:
>I'm trying to use the correct CSS to control a website as much as possible.
>
>I want to create a nav section like below
>
>--------------------------------------
>Home Page1 Page 2
>--------------------------------------
>
>I create the links as an unordered list <ul> and apply the style
>display:inline which makes the list horisontal.
>
>However, when I applyt a border to my <div> section, I also seem to get an
>unwanted gap between the top and bottom of my list items and the borders of
>their surrounding divs.
>
>I.e. it looks something like this
>--------------------------------------
>
>
>Home Page1 Page 2
>
>
>--------------------------------------
You probably need to set a top and bottom margin for <ul>, for
example:
ul{
margin-top: 0;
margin-bottom: 0;
}
--
Martin Jay
[Back to original message]
|