table-tags within div-tags

C

Chris

Hi all,

I'm having a problem with Internet Explorer (6) and XHTML/CSS. The page layout screws up, when I put a <table> tag within a <div> tag.

Here is an example of a page with my simple layout and *without* table tags, and how it should look like:
http://www.barons.de/users/~cck/somepage.html

And when I put some lines of simple table tags inside the center column, it will look like this:
http://www.barons.de/users/~cck/withtable.html

Can someone give me some help on this?
Thanks in advance!

Chris
 
M

Mark Parnell

Hi all,
G'day.


I'm having a problem with Internet Explorer (6) and XHTML/CSS.

Don't we all?
The page layout screws up, when I put a <table> tag within a <div> tag.

Don't have time to try it at the moment, but try adding
table {clear: none;}
to your style sheet.

BTW: Please adjust your line length in your posts to around 78
characters. Thanks.
 
D

Disco Octopus

Chris said:
Hi all,

I'm having a problem with Internet Explorer (6) and XHTML/CSS. The
page layout screws up, when I put a <table> tag within a <div> tag.

Here is an example of a page with my simple layout and *without*
table tags, and how it should look like:
http://www.barons.de/users/~cck/somepage.html

And when I put some lines of simple table tags inside the center
column, it will look like this:
http://www.barons.de/users/~cck/withtable.html

Can someone give me some help on this?
Thanks in advance!

Chris

line 32 says that the table should be 100% of the width of the page. take
that away.
 
R

Richard

Chris said:
I'm having a problem with Internet Explorer (6) and XHTML/CSS. The page
layout screws up, when I put a <table> tag within a <div> tag.
Here is an example of a page with my simple layout and *without* table
tags, and how it should look like:
http://www.barons.de/users/~cck/somepage.html
And when I put some lines of simple table tags inside the center column,
it will look like this: http://www.barons.de/users/~cck/withtable.html
Can someone give me some help on this?
Thanks in advance!

Most likely because you show width="100%" in the table tag.
In a style definition set "width:auto;"
IE doesn't like inner divisions or tables to be 100%.
If you use the "auto" IE will max it out to the edge of the division.
 
C

Chris

Thanks everybody for your advices!

I inserted the following lines to my CSS and it works just the way I want.

table.hack {
width: 98%;
}
html>body table.hack {
width: 100%;
}


Chris
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top