side-by-side divs

S

Sam Takoy

Hi,

This question has been asked before many times, but I'm yet to find a
solution that works on Chrome/FF/IE.

How does one display block objects, such as divs or tables, in
horizontal fashion? What's the robust solution? Combinations of floats
and clears do not seem to work in IE.

Thanks,

Sam
 
J

Jonathan N. Little

Sam said:
Hi,

This question has been asked before many times, but I'm yet to find a
solution that works on Chrome/FF/IE.

How does one display block objects, such as divs or tables, in
horizontal fashion? What's the robust solution? Combinations of floats
and clears do not seem to work in IE.

What have you tried? In other words, if you which help provide a URL to
what you have tried that "does not work" for you.
 
N

Neredbojias

Hi,

This question has been asked before many times, but I'm yet to find a
solution that works on Chrome/FF/IE.

How does one display block objects, such as divs or tables, in
horizontal fashion? What's the robust solution? Combinations of
floats and clears do not seem to work in IE.

I don't have any trouble. But then I don't support the obsolete ie6,
either, and ie7 sometimes needs "conditionals". Anyway, you might wish
to try the styling "display:inline-block;" and make hacks for older
browsers as necessary.
 
D

dorayme

Sam Takoy said:
Hi,

This question has been asked before many times, but I'm yet to find a
solution that works on Chrome/FF/IE.

How does one display block objects, such as divs or tables, in
horizontal fashion? What's the robust solution? Combinations of floats
and clears do not seem to work in IE.

<http://netweaver.com.au/floatHouse/page12.php>

should be ok in IE? And if you read a few of the other pages, you
might get to know some of the tricks and pitfalls of doing things
with floats. It's fun, so roll up your sleeves. Here are some
more still kicking about on servers, I *think* these worked even
in IE6:

<http://dorayme.netweaver.com.au/alt/simpleTwoCol.html>

<http://dorayme.netweaver.com.au/alt/floatStopDrop.html>

<http://dorayme.netweaver.com.au/sideBySide.html>

This is a bit more obscure but some block elements see to be side
by side:

<http://dorayme.netweaver.com.au/alt/dt_Inline.html>

As for two tables side by side, same principles really as you see
in the above. Just be careful with tables not to over confidently
specify their widths because tables don't hear too good on such
things. Here is a couple of pairs of tables, they are just
sketchy but should give you an idea:

<http://dorayme.netweaver.com.au/sideBySideTables.html>

Notice the ugly for IE eyes only (conditional commented) div in
there (probably only needed for IE6 but I just left it for all IE
to show a proper and healthy contempt). But if you leave it out,
it will be good for most modern browsers.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top