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.

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.

Member Avatar

diafol

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.

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

I used tables and that worked best. Thanks!

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 :)

Member Avatar

diafol

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