Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Creating tables with DIV

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23441
    Sargonnas
    Member

    Ive tried every combination of div tags, css, etc that I know of, and I still cannot get it to do what I want.

    Heres the deal.. Ive got a page. Its a table done 20%,60%,20%. In the right 20%, Ive got another table. This table is set up as the following:

    Code:
    Server Status:

    The contents of that div tag are inserted using AjaxUpdate. Its set to refresh every 15 seconds. What Im doing could very easily be done with tables, but the browser will not render the table if its inserted after the page is created, it must be done before hand. This is not an option. It leaves me with using css and div tags to create the list.

    What Im looking for, is a name aligned to the left of the table, a status (simple UP/DN, may be images later.. would use X and a checkmark, but IE *puke* will not render the checkmark, and that craptastic browser is forced on people here at work.) aligned to the right, and multiple rows of this. Each row separated by an <hr> maybe.

    Code:
    NameStatus


    NameStatus


    NameStatus


    NameStatus

    If Im unclear or left anything out, let me know.. a bit distracted here at work.

    Thanks.

    #50698
    Cotton
    Member

    I’m not sure if I follow, but… why don’t you put the section in a div with text-align to the right, then make a class for the name and float it left.

    CSS

    Code:
    div#statusBox {width: 20%; float: right; text-align:right;
    div#statusBox .name {float: left;}

    HTML

    Code:
    Name: Status:

    Name will be on the left edge, status on the right.

    #50691
    Sargonnas
    Member

    Thank you, that worked.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.