Forum Moderators: not2easy

Message Too Old, No Replies

Tricky 100% table width

         

JAB Creations

5:54 am on Mar 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The container which the table appears inside has a floating element denoted visually by the pound signs below...

-------
##
##


-------

Normal content wraps around the table as denoted by the periods...

-------
##.....
##.....
.........
.........
-------

However I'm trying to get the table to use up 100% of the available width like a non-floating divisible element and not generate a horizontal scrollbar in the content (using overflow for other unrelated reasons) on the parent element. I could clear the table and it would start rendering after the floating content though I'd end up with a large empty space at the top of the page.

The main issue however is that the table does not act like a divisible element; it does not take up 100% of available width and there is no CSS float or width property set on the table.

...oh and yes, the table contains tabular data. Thoughts please?

- John

nrobidoux

9:26 pm on Mar 9, 2010 (gmt 0)

10+ Year Member



TBH I'm slightly confused by your post. If you parent element of the table is the BODY tag then there is no need to float the table just align it how you want and either use the old school width attribute or the CSS width property to set the width.

If the parent element is not the body tag but another block element using the old school attribute or the CSS property should make the table take up 100% of it's parent element anyway.

www.w3schools.com has plenty of info

What exactly do you mean by a "divisible" element? The DIV tag? If so, I'd recommend just referring to them as DIV's.

JAB Creations

2:30 am on Mar 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I decided to go with a simpler layout.

Also I'm using the correct terminology and there is no such thing as a "tag".

- John

drhowarddrfine

2:38 am on Mar 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



and there is no such thing as a "tag".
Of course there is! Tags mark the beginning and ending of an element's structure and contain its name. Elements are the the structure as a whole and includes the contents plus the tags themselves.

tangor

2:42 am on Mar 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the update. I'll reformat brain to exclude "tag" as a descriptive of html tags. :)

JAB Creations

2:51 am on Mar 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<element attribute="value" />

I dislike gray, everything has definition. At best you may be able to use it to refer to part of the element such as the start "tag" of the divisible element however there is little reason to do so since generally one would refer to the element directly.

- John