DIV not correctly sized in TD

DIV not correctly sized in TD

am 11.10.2007 14:24:30 von didier.boelens

Hello,

I have the following problem with DIVs, embedded in table TDs.
In two words, I would like to have one DIV per TD, each of these DIV
taken the full size.
Here is an example:






















Header



Left



Right



Left 2



Down Left



Down Right






The result is that everything is correct EXCEPT "Right" et "Down
Right" parts. The corresponding DIVs are not sized correctly in the
sense that it is not 100% width and height.

Could anyone help me?
Many thanks

Re: DIV not correctly sized in TD

am 11.10.2007 14:54:05 von Andy Dingley

On 11 Oct, 13:24, boeledi wrote:

> I have the following problem with DIVs, embedded in table TDs.

So stop doing that. You can style the s too, just as easily as the

s. You don't appear to be doing anything that requires these
extra elements.


Also you're not using a doctype declaration, so your browser will
render in quirks mode. Before worrying about any layout problems,
especially those involving box widths, you must push the browser into
standards mode. I suggest adding the HTML 4.01 Strict doctype
declaration.

Re: DIV not correctly sized in TD

am 11.10.2007 15:53:50 von Neredbojias

Well bust mah britches and call me cheeky, on Thu, 11 Oct 2007 12:24:30
GMT boeledi scribed:

> Hello,
>
> I have the following problem with DIVs, embedded in table TDs.
> In two words, I would like to have one DIV per TD, each of these DIV
> taken the full size.
> Here is an example:
>
>
>
>
>
>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
> style="height:60px;">

Header


>

>

Left


>

>

Right


>

>
> style="height:100px;">

Left 2


>

>
> style="height:200px;">

Down Left


>

>

Down
> Right


>

>
>
>
> The result is that everything is correct EXCEPT "Right" et "Down
> Right" parts. The corresponding DIVs are not sized correctly in the
> sense that it is not 100% width and height.

Why do you have a height designation on a div in all but the 2nd row?

Anyway, try adding a height to either the pertinent div or the cell
within which it rests (so your percentage designation has a reference).
This may still not work in the latter case as tables are unruly beasts,
and you should probably nevertheless delimit your non-css values.

--
Neredbojias
Half lies are worth twice as much as whole lies.