0

Hi! I am making a chat program, I am currently making the online list. All elements (users that are online) should have one gray solid background, that also is wide. so it don't look like this;


How should I do that? all the backgrounds should be just as long as each other.

Attachments arrow.PNG 4.4 KB
3
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by diafol
0

You can enclose it in a table and set absolute table width that way, each user name (data) will be confined or constrained within the specified table width.

0

Hmm, I wouldn't use tables. An unordered list would probably be the way to go. background-color on the 'ul' element should do the trick.

0

Hm but if I use an unordered list, how to get rid of the dots?

Attachments arrow.PNG 1.3 KB
0

hm or... it is not so good. look at this


how to chose the distance between the TDs?

EDIT: it was just that I had one BR between all the TDs :)

Edited by ErlendHL: solved

Attachments arrow.PNG 3.96 KB
0

Leave the table out.

ul{
 margin:0;
 padding:0;
 background-color: red;
}
li{
 list-style:none;
 margin:0;
 padding:0;
}

change the margins/padding to suit you

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.