Forum Moderators: not2easy

Message Too Old, No Replies

Form & table not contained within <div> tags

         

kbish

3:59 pm on Feb 7, 2005 (gmt 0)

10+ Year Member



Have recently happened across this forum and found it a wonderful resource as I try to get my head around CSS and it's many quirks. I now have a problem that I can't find an answer to in the site search. I wonder if anyone can help.

I'm coding in XHTML transitional with CSS and can't seem to get a table, used to contain a form, to sit within containing <div> tags.

I have a heading within heading tags, followed by a short paragraph of text within <p> tags. Below this is the form with it's various parts contained within a table for display purposes. All of this I put in a div container.

Following all that I have a footer at the bottom of the page contained within another div. Well, at least that's where I thought it should fall.

When I test it in a browser the footer is sitting to the right of the table! I put a border on the div to see what was happening and it just contains the heading and paragraph, with the table sitting below outside the border, its top edge just crossing the line.

Any suggestions what might be going on and how to fix this?

nefarioustim

4:46 pm on Feb 7, 2005 (gmt 0)

10+ Year Member



Can you cut'n'paste your code into the forum so we can see it?

------------------------------
nefarioustim

[edited by: Woz at 6:23 am (utc) on Feb. 8, 2005]
[edit reason] No sigs please, see TOS#13 [/edit]

kbish

3:59 pm on Feb 9, 2005 (gmt 0)

10+ Year Member



I seem to have inadvertently fixed the problem. I had cut and pasted a sample form and it's containing table into my page to run a test on a form handler. The table contained a lot of html formatting and when I removed this to apply CSS styles the table was suddenly contained within the div tags. Curious...

jfjet

5:40 pm on Feb 9, 2005 (gmt 0)

10+ Year Member



You probably had a width set for the table that's too wide for the containing div. In firefox, the overflowing element should just stick out, while IE may sometimes extend the container div to accommodate the overflowing element, OR at some cases, throw the content at a random location. This is probably what you saw.