By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

Table inside <div>

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.