Table breaking out of div

B

Bruno

Hi,

I have a table inside a div elememt which breaks out of the space which the
element uses. The paragraph of text stays within the boudaries specified but
not the table. For some reason the table starts at the right place on the
left but then extends well beyond the viewport on the right. Here is the
code

<style type="text/css">
..main {padding: 10px;
border: 0px;
background:#FFFFCC;
margin: 0px 190px 0px 190px;}
</style>

<div id="main">
<p>Lots of text which wraps fine</p>
<table style="width: 100%"><tr><td></td><tr></table>
</div>

Any ideas?
 
R

rf

brucie said:
^^^ class

^^^ ID

Or more generically <shout>TURN ON BORDERS FOR EVERYTHING</shout>. That way
you know where all your elements are, what shape they are and which othere
elements the live in them and which style rules affect each 'selected'
element. If still in doubt change the border colour for certain elements so
you can see them individually.

Cheers
Richard.
 
B

Bruno

This was just a typo when copying over the markup it does say #main on the
page.
Or more generically <shout>TURN ON BORDERS FOR EVERYTHING</shout>. That way
you know where all your elements are, what shape they are and which othere
elements the live in them and which style rules affect each 'selected'
element. If still in doubt change the border colour for certain elements so
you can see them individually.

I've turned on all the borders on and put the site live so you can see it at
www.midlands-directory.co.uk/registration.php

Any ideas?
 
B

Bruno

brucie said:

Aha that now works. The issue is with those blasted adverts. Their markup is
riddled with rubbish. As soon as I removed all the adverts it works fine.
That is a royal pain because the client is going to be adding and removing
those things all the time.

See http://www.midlands-directory.co.uk/registration_test.php
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top