472,958 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Table width 100% breaks layout in IE

Hi,

I am trying to integrate phpBB into my existing site design. I am doing
this simply by pasting fragments of my HTML into the phpBB templates.
This works fine in Firefox and Opera but the layout breaks in IE. I have
narrowed down the problem to the fact that phpBB uses tables for layout
and sets the width of those to 100%. If I change this to 80% it looks
correct in IE but not in Firefox.

Is this a bug in IE and if so how can I work around this?

The problem can be seen at:
http://www.bits.bristol.ac.uk/james/.../forum100.html
(table width set to 100%) and at:
http://www.bits.bristol.ac.uk/james/...m/forum80.html (table width
set to 80%).

My CSS is here: http://www.bits.bristol.ac.uk/james/ivsa/style.css
phpBB adds some CSS using an internal style sheet.

I also have exactly the same problem trying to do the same with Gallery
at: http://www.bits.bristol.ac.uk/james/...lery2/main.php

Any help / advice gratefully received.

James
--
James Frayne
ja*************************@yahoo.co.uk
Remove doesnotlikespam to send mail.
Feb 5 '06 #1
2 3064
James Frayne wrote:

I am trying to integrate phpBB into my existing site design. I am doing
this simply by pasting fragments of my HTML into the phpBB templates.
This works fine in Firefox and Opera but the layout breaks in IE. I have
narrowed down the problem to the fact that phpBB uses tables for layout
and sets the width of those to 100%. If I change this to 80% it looks
correct in IE but not in Firefox.
Next time explain "breaks".
Is this a bug in IE and if so how can I work around this?

Yes.
Use the HTML 4.01 Strict DTD.

The sample URL uses a partial HMTL Transitional DTD. This puts IE into
"quirks" (aka: even buggier) mode. It calculates the table width *before*
considering the floated menu. Thus the extra wideness which, you may note,
happens to be the width of the menu.
Even using the Strict DTD, the width must be reduced, say to 98% or 99%,
to allow for the extra width added by the borders.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Feb 6 '06 #2
Jim Moe wrote:
James Frayne wrote:
I am trying to integrate phpBB into my existing site design. I am doing
this simply by pasting fragments of my HTML into the phpBB templates.
This works fine in Firefox and Opera but the layout breaks in IE. I have
narrowed down the problem to the fact that phpBB uses tables for layout
and sets the width of those to 100%. If I change this to 80% it looks
correct in IE but not in Firefox.

Next time explain "breaks".

Apologies for not doing this. Will do next time.
The sample URL uses a partial HMTL Transitional DTD. This puts IE into
"quirks" (aka: even buggier) mode. It calculates the table width *before*
considering the floated menu. Thus the extra wideness which, you may note,
happens to be the width of the menu.
Even using the Strict DTD, the width must be reduced, say to 98% or 99%,
to allow for the extra width added by the borders.


Thanks for your help. I had suspected from some searching that it was to
do with quirks mode being triggered by the transitional DTD but changing
it to strict did not work so I thought I was on the wrong track.
However I had not realised the need to allow for the borders.

Thanks again, I'm off to persuade phpBB to output strict HTML.

James
--
James Frayne
ja*************************@yahoo.co.uk
Remove doesnotlikespam to send mail.
Feb 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andre | last post by:
Hello, I was wondering how to do percentage widths for tables. I thought simply having the width="15%" would do it. I had it so that there is only one row, and three data cells. Each cell...
8
by: starritt | last post by:
I have the following style: ..content {position: absolute; right: 10px; left: 170px; top: 135px; padding-left: 0px; color: #15447c;} ..content table {width: 100%; background: BLUE; color:...
4
by: Alex Meier | last post by:
I have the following problem: I need a simple, tabular layout in a webshop. - left column: navigation column with approx. 170px width - right column: content area the goal: the left column...
2
by: Logan | last post by:
i've added a data grid to an aspx form, & i've noticed that the width of the grid is fixed. I want to be able to set the width to fit the entire width of the browser. Such as done in classic...
3
by: VK | last post by:
Stock in one strange problem equal to both FF and IE. With form width set to 100% the right border of form goes hell knows where behind the screen. Is there a way to tell reliably to form to...
0
by: mephraim | last post by:
I have a page at (view in IE): http://rmc2.dev.leepfrog.com/ie_fix_me/index.html that has an image floated right outside of a main content div that looks like: <img src="blah" style="float:...
16
by: Tantale | last post by:
I used this serviec to check my webpage http://www.jmrw.com/Abroad/Barcelone/index.htm Made with Dreamweaver 8. The result is 206 errors, most of them "end tag omitted, but OMITTAG NO was...
16
by: Charles A. Landemaine | last post by:
I set a table with 100% width to occupy all available space, but in IE7 it uses more than that, it uses 100% of the page width instead of 100% of the table container. Could you test the page in IE7...
4
by: lilOlMe | last post by:
Hi there! I'm developing a "scrollable table". At first I started using CSS. It worked pretty well until I found a bug that happens when placing this table into a tabbing control... So I...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.