473,326 Members | 2,111 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,326 software developers and data experts.

Width argument does not work correctly

Hello,

my problem is as following, I got a table like this:

<table class=main>
<tr>
<td class=t11></td>
<td class=t12></td>
</tr>
<tr>
<td colspan=2></td>
</tr>
<tr>
<td class=t21></td>
<td class=t22></td>
</tr>
<tr>
<td class=t31></td>
<td class=t32></td>
</tr>
</table>

The stylesheet sets the with of ".main", ".t11" and ".t22" (along with
some other stuff not included here):
table.main {width: 810px;}
td.t11 {width: 150px;}
td.t12 {width: 660px;}

That doesn't work, and I dont know why, there is no other width agument
that might be influencing it. I also ran it through jigsaw and its all
valid.

However it _does_ work when I set the width for ".t31" what confused me
totaly.

The complete code you can see here:
http://www.aspepex.net/hmforum/test3.html
http://www.aspepex.net/hmforum/hm.css
I apologize for it not being formated that nice.

The relevant parts are the "table.main" and "td.tvcol11" to
"td.tvcol32". When you look at the Website you can see the glitch at the
right side in the red heading where is "Nachricht" what shows that the
background image is being repeated as the td is not 660px wide.

Any help is appreciated

TIA
Jul 21 '05 #1
5 4566
Alexander Scheurer <ma**@aspepex.net> wrote:
The stylesheet sets the with of ".main", ".t11" and ".t22" (along with
some other stuff not included here):
table.main {width: 810px;}
td.t11 {width: 150px;}
td.t12 {width: 660px;} That doesn't work, and I dont know why, there is no other width
agument that might be influencing it. I also ran it through jigsaw
and its all valid.


Your doctype sets your browsers into quirks mode, which doesn't treat
widths the way you think. Google on doctype switching and use one
that triggers standards compliant mode.

Bye,
Martin
Jul 21 '05 #2
Alexander Scheurer <ma**@aspepex.net> wrote:
The relevant parts are the "table.main" and "td.tvcol11" to
"td.tvcol32". When you look at the Website you can see the glitch at the
right side in the red heading where is "Nachricht" what shows that the
background image is being repeated as the td is not 660px wide.


This is a "bug" of the browser. Unfortunately Gecko-based browsers and
IE do have some problems with calculating table widths. They do not
respect the CSS specification.

BTW: In Opera 8 and iCab 3 your table is rendered correct.

--
Alexander
Jul 21 '05 #3
Martin Bialasinski wrote:
Your doctype sets your browsers into quirks mode, which doesn't treat
widths the way you think. Google on doctype switching and use one
that triggers standards compliant mode.


Thanks alot that helped me. I now have other stuff that doesn't fit as
it used to but if, its the standard I think I have to look into my code.

Btw I found this:
http://gutfeldt.ch/matthias/articles/doctypeswitch.html
which led me to this:
http://www.w3.org/TR/html4/struct/global.html
Jul 21 '05 #4

"Alexander Scheurer" <ma**@aspepex.net> wrote in message
news:db*************@news.t-online.com...
Martin Bialasinski wrote:
Your doctype sets your browsers into quirks mode, which doesn't treat
widths the way you think. Google on doctype switching and use one
that triggers standards compliant mode.


Thanks alot that helped me. I now have other stuff that doesn't fit as
it used to but if, its the standard I think I have to look into my code.

Btw I found this:
http://gutfeldt.ch/matthias/articles/doctypeswitch.html
which led me to this:
http://www.w3.org/TR/html4/struct/global.html


That and your class code needs "quotes" around it.
You need the official CSS Reference Sheet?
http://www.w3schools.com/css/css_reference.asp

www
Jul 21 '05 #5
"Baldy" <Ba***@poof.com> wrote:
That and your class code needs "quotes" around it.
XHTML requires attribute values to be quoted, HTML does not.
You need the official CSS Reference Sheet?
http://www.w3schools.com/css/css_reference.asp


There is nothing "official" about w3schools.com, they have nothing to do
with w3.org. In fact w3schools have a reputation for providing incorrect
and poor quality information.

--
Spartanicus
Jul 21 '05 #6

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

Similar topics

3
by: Jack Black | last post by:
Using Mozilla 1.4... I need to get the Height and Width of an object (in this case, a parent DIV) for the purpose of creating a textbox of max width and height in the container. Since...
179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
2
by: Stian Lund | last post by:
Hi, on the following page, http://stian.freeshell.org/index.php the floated image in the latest post is shown as tiny/zero-width in Mozilla 1.7 and Firefox 1.0 (you can just about make it left of...
5
by: Jean Pion | last post by:
Dear readers, Can anyone explain how to set column width of a table in ccs. I use the following style in an external stylesheet: table.tbl { table-layout:fixed; border-top: 5px solid #333;...
5
by: John Smith | last post by:
Here is my HTML table formatting code. <table border="1" width="100%"> <tr width = "100%"> <td width="33%">11asdhagdshaskgashjgahjgadhjgdjshdgasjdgajdgadjhgdgahjdgadhjsgad
10
by: Immortalist | last post by:
Various aquisition devices that guide learning along particular pathways towards human biases. And as E.O. Wilson might say mental development appears to be genetically constrained. (1) Language...
1
by: =?Utf-8?B?d2NsYXJrZTEwMQ==?= | last post by:
Hello all, I've created the following ASP.NET code sample which, when rendered, displays a 100% textbox within a single cell table. The problem is that Internet Explorer (6 or 7) truncates the...
6
by: Ralf Goertz | last post by:
Hi, I'd like to use copy() to send the content of an integer container to cout. How can I make sure that /all/ of them are printed with width 2? #include <iostream> #include <iterator> int...
2
by: paul | last post by:
I have a JS function to change the width of a <divthat works great in Firefox, but not at all in IE7. In IE an error message occurs: Line: 92 Char: 5 Error: Invalid Argument Code: 0 Firefox...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.