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

CSS2 problem: width of a table = 100%

Hello,

I've a problem with a table whose the witdh is 100%. With Firefox, it
correctly fits the width of the parent container, no more. But with
IExplorer, the witdth seems to be equal to the width of the body, so it
enlarges the parent-container.

See http://www.k1ka.be/rubrique.php3?id_rubrique=1
HTML code:
<body>
<div id=corps>
<div id=bandeau>
<table id=navigation>
<tr>
<td id=accueil><a href="http://www.k1ka.be">Accueil</a>/</td>
<td id=autrebranche><a
href="rubrique.php3?id_rubrique=3">Textes</a></td>
<td id=date>Dernière modif.: 23 mai 2006</td>
</tr>
</table>
</div>
(etc.)
CSS:

body {
margin:0;
background-color: white;
}
#corps {
margin: 50px;
padding: 0;
}
#bandeau {
margin: 0;
padding: 0;
}
#navigation {
width:100%;
}

I don't want to use a fixed width for the parent container, because I
hope this page will correctly be displayed with several screenwidthes.
So I use fixed margins for the <div id=corps>. I think that the the
width used in such a case by "width=100%" is the border of the parent
container, without (!) the margins. Am I wrong ?

I Know that the <div id=bandeauis useless, but it results of another
test for the style.

Has someone a solution compatible with firefox+IExplorer ?

Thanks in advance,

G.

Aug 2 '06 #1
3 2437
In article <11**********************@m73g2000cwd.googlegroups .com>,
gv******@skynet.be wrote:
Hello,

I've a problem with a table whose the witdh is 100%. With Firefox, it
correctly fits the width of the parent container, no more. But with
IExplorer, the witdth seems to be equal to the width of the body, so it
enlarges the parent-container.

See http://www.k1ka.be/rubrique.php3?id rubrique=1
HTML code:
<body>
<div id=corps>
<div class="corps">
<div id=bandeau>
<div class="bandeau">

etc. - the double-quotes are important.
Aug 3 '06 #2
David Stone schrieb:
<div class="bandeau">

etc. - the double-quotes are important.
Not necessary in HTML in this case.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Aug 3 '06 #3
On Thu, 3 Aug 2006, David Stone wrote:
HTML code:

<div class="bandeau">

etc. - the double-quotes are important.
Er, no: the double-quotes are of no importance in HTML when the string
contains name chars, as in this case. You're welcome to /recommend/
quoting the value, even when not necessary, if you think it improves
consistency and accuracy; but they don't become "important" until you
start delivering XHTML (and let's not go over *that* frequent argument
again).

Aug 3 '06 #4

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

Similar topics

4
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered...
10
by: NoSpan | last post by:
I have this page that has layout like the following: (no frameset) ---------------------------------------- | header | |--------------------------------------| | ...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
0
by: Thomas Scheiderich | last post by:
I have a table that has 3 image slices. The middle slice changes size based on size of browser window. This works great. My client wants the date to show over the image on the right. So what I...
5
by: Mark | last post by:
I am struggling with a CSS2 layout problem, I am using Visual Web Developer 2005 Express. My website needs to be constrained within the visible viewport. This means that scrollable content will...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
1
by: kchaitanya | last post by:
I have created a master page. When I am adding this master page to .aspx files which are in the root directory, it is working fine. When , I am adding master page to .aspx files which are in sub...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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: 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: 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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.