467,077 Members | 995 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

Table inside <div>

I have a style sheet containing the following definitions:

#leftcontent {
position: absolute;
left:20px;
top:60px;
width:180px;
border:1px solid #000;
padding-top: 15px;
}

#centrecontent {
margin-left: 200px;
margin-right: 200px;
border:1px solid #000;
padding-top: 15px;
}

#rightcontent {
position: absolute;
right:20px;
top:60px;
width:180px;
border:1px solid #000;
}

and inside <div id="centrecontent"> I have <table width=100%>, which I hoped
would produce a table the width of just the centre section. However, in
Internet Explorer the table is the full width of the page, which then goes
off the side of the window since it is already indented about 200 px. In
any other browser I have tried the table width is correct. Can someone
please tell me what is wrong? Thanks.
Jul 20 '05 #1
  • viewed: 14191
Share:
3 Replies
DU
Joseph Haig wrote:
I have a style sheet containing the following definitions:

#leftcontent {
position: absolute;
left:20px;
top:60px;
width:180px;
border:1px solid #000;
padding-top: 15px;
}

#centrecontent {
margin-left: 200px;
margin-right: 200px;
border:1px solid #000;
padding-top: 15px;
}

#rightcontent {
position: absolute;
right:20px;
top:60px;
width:180px;
border:1px solid #000;
}

and inside <div id="centrecontent"> I have <table width=100%>, which I hoped
would produce a table the width of just the centre section. However, in
Internet Explorer the table is the full width of the page, which then goes
off the side of the window since it is already indented about 200 px. In
any other browser I have tried the table width is correct. Can someone
please tell me what is wrong? Thanks.


This sort of problems/questions is always easier to solve/answer by
providing an url.

DU
Jul 20 '05 #2
DU wrote:
Joseph Haig wrote:
I have a style sheet containing the following definitions:

#leftcontent {
position: absolute;
left:20px;
top:60px;
width:180px;
border:1px solid #000;
padding-top: 15px;
}

#centrecontent {
margin-left: 200px;
margin-right: 200px;
border:1px solid #000;
padding-top: 15px;
}

#rightcontent {
position: absolute;
right:20px;
top:60px;
width:180px;
border:1px solid #000;
}

and inside <div id="centrecontent"> I have <table width=100%>, which I
hoped
would produce a table the width of just the centre section. However, in
Internet Explorer the table is the full width of the page, which then
goes
off the side of the window since it is already indented about 200 px. In
any other browser I have tried the table width is correct. Can someone
please tell me what is wrong? Thanks.


This sort of problems/questions is always easier to solve/answer by
providing an url.


It isn't public yet but I have put something that should illustrate it here:

<http://www.maths.man.ac.uk/~jhaig/tmp/page.php>

The style sheet is:

<http://www.maths.man.ac.uk/~jhaig/tmp/layout.css>
Jul 20 '05 #3
DU
Joseph Haig wrote:
DU wrote:

Joseph Haig wrote:

I have a style sheet containing the following definitions:

#leftcontent {
position: absolute;
left:20px;
top:60px;
width:180px;
border:1px solid #000;
padding-top: 15px;
}

#centrecontent {
margin-left: 200px;
margin-right: 200px;
border:1px solid #000;
padding-top: 15px;
}

#rightcontent {
position: absolute;
right:20px;
top:60px;
width:180px;
border:1px solid #000;
}

and inside <div id="centrecontent"> I have <table width=100%>, which I
hoped
would produce a table the width of just the centre section. However, in
Internet Explorer the table is the full width of the page, which then
goes
off the side of the window since it is already indented about 200 px. In
any other browser I have tried the table width is correct. Can someone
please tell me what is wrong? Thanks.


This sort of problems/questions is always easier to solve/answer by
providing an url.

It isn't public yet but I have put something that should illustrate it here:

<http://www.maths.man.ac.uk/~jhaig/tmp/page.php>

The style sheet is:

<http://www.maths.man.ac.uk/~jhaig/tmp/layout.css>

Just validate your HTML code and add a suitable doctype decl. (with a
full url; I recommend strict definition) and the table will be rendered
accordingly in MSIE 6.

DU
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by F. Da Costa | last post: by
61 posts views Thread by Toby Austin | last post: by
5 posts views Thread by chakradhari.ashish@gmail.com | last post: by
nathj
5 posts views Thread by nathj | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.