![]() |
|
|
|||||||
![]() |
HTML - Problem with table width: mozilla renders it, IE makes up numbers |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi all,
I'm trying to make a website with a fixed table width centred in the page. The width is specified using: <table width="779"> This works fine in the latest version of mozilla, 1.7.13. However, in IE6 it renders as 955 pixels. (IE also ignores row height specifications half the time, but that's something I'll work on later) I want this website to be viewable with both mozilla and IE rather than look goofy in one but nice in the other. Can anyone explain to me why this is happenening and what I can do to make IE render the table at the fixed width I want? Regards, Ari -- spammage trappage: remove the underscores to reply I'm going to die rather sooner than I'd like. I tried to protect my neighbours from crime, and became the victim of it. Complications in hospital following this resulted in a serious illness. I now need a bone marrow transplant. Many people around the world are waiting for a marrow transplant, too. Please volunteer to be a marrow donor: http://www.abmdr.org.au/ http://www.marrow.org/ spodosaurus |
|
|
|
|
#2 |
|
Posts: n/a
|
In article <e4rrcg$l2j$>,
spodosaurus <spodosaurus@_yahoo_.com> wrote: > Hi all, > > I'm trying to make a website with a fixed table width centred in the > page. The width is specified using: > > <table width="779"> > > This works fine in the latest version of mozilla, 1.7.13. However, in > IE6 it renders as 955 pixels. (IE also ignores row height specifications > half the time, but that's something I'll work on later) I want this > website to be viewable with both mozilla and IE rather than look goofy > in one but nice in the other. > > Can anyone explain to me why this is happenening and what I can do to > make IE render the table at the fixed width I want? > url? First, put style info for the table in css. If you want to do it inline, put style="width: 779px" instead of what you have about width. The "px" bit is important. Second, there is no normal way a browser will respect your widths for anything if you have content that can't normally and sensibly fit in there (like a landscape picture in a too small portrait box). Or if your widths for the cells in the row do not make mathematical sense. And surely other things too. Did I say url? -- dorayme |
|
|
|
#3 |
|
Posts: n/a
|
spodosaurus wrote:
> I'm trying to make a website with a fixed table width centred in the > page. Don't. Get with the 21st century and do it right. Download yourself a CSS 3 columen template and use that instead of abusing tables (try glish or bluerobot) |
|
|
|
#4 |
|
Posts: n/a
|
Andy Dingley <> wrote:
> > I'm trying to make a website with a fixed table width centred in the > > page. > Don't. Get with the 21st century and do it right. Download yourself a > CSS 3 columen template and use that instead of abusing tables (try > glish or bluerobot) This is assuming you have several years to wait for everyone to get a browser that CSS actually works correclty in.... Otherwise, just use tables because it works.... |
|
|
|
#5 |
|
Posts: n/a
|
spodosaurus wrote: > Hi all, > > I'm trying to make a website with a fixed table width centred in the > page. The width is specified using: > > <table width="779"> > > This works fine in the latest version of mozilla, 1.7.13. However, in > IE6 it renders as 955 pixels. (IE also ignores row height specifications > half the time, but that's something I'll work on later) I want this > website to be viewable with both mozilla and IE rather than look goofy > in one but nice in the other. > > Can anyone explain to me why this is happenening and what I can do to > make IE render the table at the fixed width I want? Place the width as a percentage rather then in PX units. Different browsers use different window sizes, as in the scroll bars in IE, or users may have a specific font size etc etc. So if you want to use a table to place the text and images of a page, then you should center it and then just give it a width of say 25% and you may not need to concern yourself with the hight, but you should set that as a % as well. This will mean your page will still look similar on a range of browsers but will be able to be changed, made more viewable by the visitor if he or she desirers. -- Regards Chad. http://freewebdesign.cjb.cc |
|
|
|
#6 |
|
Posts: n/a
|
Travis Newbury wrote:
> Andy Dingley <> wrote: >>> I'm trying to make a website with a fixed table width centred in the >>> page. >> Don't. Get with the 21st century and do it right. Download yourself a >> CSS 3 columen template and use that instead of abusing tables (try >> glish or bluerobot) > > This is assuming you have several years to wait for everyone to get a > browser that CSS actually works correclty in.... > > Otherwise, just use tables because it works.... > Sorry that is BS, OP *is* using a table and *still* having difficulties! Normally fixing the errors one can get very satisfactory results without relying on tables for layout in spite of IE. -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com |
|
|
|
#7 |
|
Posts: n/a
|
Travis Newbury wrote: > This is assuming you have several years to wait for everyone to get a > browser that CSS actually works correclty in.... More browsers support CSS usably than work with tables and fixed widths in pixels (think mobile devices) |
|
|
|
#8 |
|
Posts: n/a
|
Travis Newbury wrote:
> Andy Dingley <> wrote: >>> I'm trying to make a website with a fixed table width centred in the >>> page. >> Don't. Get with the 21st century and do it right. Download yourself >> a CSS 3 columen template and use that instead of abusing tables >> (try glish or bluerobot) Here's a fairly good one from bluerobot, though it uses pixel dimensions, Verdana, and fixed font sizes. http://bluerobot.com/web/layouts/layout3.html Glish is now a bit long in the tooth. > This is assuming you have several years to wait for everyone to get a > browser that CSS actually works correclty in.... You should upgrade from Netscape 3... This one works well in just about any browser. http://benmeadowcroft.com/webdev/css.../3-column.html > Otherwise, just use tables because it works.... Tables work fine for (um, have I heard this before?) tabular data. -- -bts -Warning: I brake for lawn deer |
|
|
|
#9 |
|
Posts: n/a
|
spodosaurus <spodosaurus@_yahoo_.com> scripsit:
> I'm trying to make a website with a fixed table width Stop trying that. Problem solved. > The width is specified using: > > <table width="779"> That's a spectacularly bad choice. Did you ever check what it looks like in Print Preview, for example? > This works fine in the latest version of mozilla, 1.7.13. However, in > IE6 it renders as 955 pixels. So? You're not giving any relevant facts like the URL, so I give just the general answer: that's how things should be expected to be. Different browsers work differently. Do you realize what the width attribute _means_? It is the suggested minimum width. On the other hand, you have probably far too much stuff*) on the page, if the table requires, on some browser, that much width. *) I don't say "content", since much of the stuff is probably not content proper but noise and distraction. |
|
|
|
#10 |
|
Posts: n/a
|
In article <4471bbc6$0$3706$>,
"Jonathan N. Little" <> wrote: > Travis Newbury wrote: > > Andy Dingley <> wrote: > >>> I'm trying to make a website with a fixed table width centred in the > >>> page. > >> Don't. Get with the 21st century and do it right. Download yourself a > >> CSS 3 columen template and use that instead of abusing tables (try > >> glish or bluerobot) > > > > This is assuming you have several years to wait for everyone to get a > > browser that CSS actually works correclty in.... > > > > Otherwise, just use tables because it works.... > > > > Sorry that is BS, OP *is* using a table and *still* having difficulties! > Normally fixing the errors one can get very satisfactory results without > relying on tables for layout in spite of IE. I think Travis meant that there is a smaller learning curve to getting a table layout to look good and consistent over all browsers. Surely he is right, eh young Jonathan? If you set out a table for reasonable aims for websites, along with the methods of achieving them, along further with the levels of difficulty, and then, for good measure make a set of the various possible graphs, remarks like Travis's come from looking at different graphs to what you are looking at. -- dorayme |
|