Line up DIVs horizontally

A

anf4u360

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;
}
 
N

Neredbojias

With neither quill nor qualm, (e-mail address removed) 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.
 
Q

QuasiAnon

(e-mail address removed) in
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) :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top