473,387 Members | 1,492 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,387 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 3082
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.