Forum Moderators: open

Message Too Old, No Replies

Problems with a <ul> List within a table

Problems with a <ul> List within a table

         

thesoundguy

2:04 pm on Jun 21, 2003 (gmt 0)

10+ Year Member



I know this will sound like a newbie question, but I have been troubleshooting and researching the web, and no luck...

The problem I am having is keeping a single itemed <ul> list to display the item without creating a blank space below(like a <br /> line). I use the attribute line-height in my css file and also include a height on the td cell containing the single itemed list. I have tried to set margins, paddings, and several other attempts. I simply put the output is as follows, minus the table and td cell info :


<ul><li>Single Item</li></ul>

Any help would be greatly appreciative, even if it is the simple little thing I have overlooked!

Birdman

2:14 pm on Jun 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should be able to control it by setting margins for ul and li.

In your CSS:

ul{margin: 0px 0px 0px 0px;}
li{margin: 0px 0px 0px 0px;}

The order of the margin values is: top, right, bottom, left

grahamstewart

1:56 am on Jun 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or do you mean you are trying to get your list to appear all on one line?

If so then you might want this..


ul {
display: inline;
margin: 0;
padding: 0;
}
li {
display: inline;
padding: 0 0.5em;
border-left: 1px solid #000;
}

I like to markup my nav menu as a <ul> list of links and then use this code to put it on a horzintal line.