HighDots Forums  

CSS2 problem: width of a table = 100%

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS2 problem: width of a table = 100% in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
gvdmoort@skynet.be
 
Posts: n/a

Default CSS2 problem: width of a table = 100% - 08-02-2006 , 07:42 AM






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=bandeau> is useless, but it results of another
test for the style.

Has someone a solution compatible with firefox+IExplorer ?

Thanks in advance,

G.


Reply With Quote
  #2  
Old   
David Stone
 
Posts: n/a

Default Re: CSS2 problem: width of a table = 100% - 08-03-2006 , 07:37 AM






In article <1154518960.983259.192660 (AT) m73g2000cwd (DOT) googlegroups.com>,
gvdmoort (AT) skynet (DOT) be wrote:

Quote:
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">

Quote:
div id=bandeau
<div class="bandeau">

etc. - the double-quotes are important.


Reply With Quote
  #3  
Old   
Johannes Koch
 
Posts: n/a

Default Re: CSS2 problem: width of a table = 100% - 08-03-2006 , 08:39 AM



David Stone schrieb:
Quote:
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.)


Reply With Quote
  #4  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: CSS2 problem: width of a table = 100% - 08-03-2006 , 09:22 AM



On Thu, 3 Aug 2006, David Stone wrote:

Quote:
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).



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.