473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
3 14391
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
7
by: Herbman | last post by:
Hi, I'm trying to position a <tr> ("row") element with CSS. The table itself is positioned with <div> tags. The problem is when I use <div> tags to position the rows within the table nothing...
8
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is...
2
by: listaction | last post by:
Hi Folks, can you help me by explaining how the code below can be translated using <div> and achieve the same effect? Thanks, LA <html> <body> <table bgcolor="#000000" width="100%"...
9
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
5
by: chakradhari.ashish | last post by:
Does anybody know how can I load an html page inside a <div</div> where the content gets update on the onclick even of anchor <a href=> </a>? I googled around and followed some links pointing me...
5
nathj
by: nathj | last post by:
Hi All, I'm working on a new site that has a two column layout underneath a title bar. If you check out: http://www.christianleadership.org.uk/scratch/mainpage.php using IE or Opera you will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.