Line up DIVs horizontally

Discussion in 'HTML' started by anf4u360@yahoo.com, Sep 16, 2005.

  1. Guest

    I want them to line up like they do with TD.

    I've got them all using this. Is this the correct way to do it?

    Also, I'm getting a double border where they meet up. I thought
    collapse was supposed to prevent that.

    ..testdiv {
    position: static;
    width: 1em;
    float: left;
    border: 1px solid black;
    border-collapse: collapse;
    }
    , Sep 16, 2005
    #1
    1. Advertising

  2. Neredbojias Guest

    With neither quill nor qualm, quothed:

    > I want them to line up like they do with TD.


    I want them to line up like they do in the Army, but most women refuse.

    > I've got them all using this. Is this the correct way to do it?


    ??? Using what?

    > Also, I'm getting a double border where they meet up. I thought
    > collapse was supposed to prevent that.
    >
    > .testdiv {
    > position: static;
    > width: 1em;
    > float: left;
    > border: 1px solid black;
    > border-collapse: collapse;
    > }


    Oh, I see: it's a css question. Thought you were bonkers there for a
    moment, mate.

    Anyway, you are probably referring to collapsing margins not borders and
    the margins of floated boxes do not collapse. "Border-collapse" is for
    tables.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
    Neredbojias, Sep 16, 2005
    #2
    1. Advertising

  3. Guest

    in news::

    > I want them to line up like they do with TD.
    >
    > I've got them all using this. Is this the correct way to do it?
    >


    it sounds like your divs are wrapping? some of the "later" divs stack underneath "earlier" (earlier in your x/html file)?

    if so, you *may* have to attend to total widths.


    body padding:0.5%
    layout is
    [div, width 33%] [div, width 33%] [div, width 33%]
    that would be a tight fit, cause those widths add to 100%

    caveat: i've already forgotten what pos static does. (it didn't appeal to my intentions, only honorable, when i read about pos
    static) :)
    , Sep 16, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stuart Miller
    Replies:
    5
    Views:
    429
    Stuart Miller
    Jun 25, 2004
  2. Haydn Williams

    Sorting datalist records horizontally

    Haydn Williams, Sep 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    583
    Frank Mamone
    Sep 9, 2004
  3. shank

    line up images horizontally

    shank, Oct 1, 2003, in forum: HTML
    Replies:
    7
    Views:
    896
    brucie
    Oct 1, 2003
  4. rich
    Replies:
    0
    Views:
    714
  5. maya
    Replies:
    4
    Views:
    230
Loading...

Share This Page