PDA

View Full Version : a table inside a p tag ignoring css rules?


monkeymedia
02-23-2012, 07:53 PM
http://www.redwebhosting.co.uk/test/spotless/services.php

as you can see, the table thats inside the p tage isnt using the background image like the other stuff that enclosed in <p>

clearly I'm doing something wrong. I did alter the table properties to include the background image but it doesnt go full width. can someone help me please?

thanks in advance, this place is invaluable when I get stuck

Darren

dbepp
02-24-2012, 12:18 AM
Out of curiosity... why use a table?

monkeymedia
02-24-2012, 08:22 AM
because I'm displaying a grid of data. Is there a better way to do it?

Corrosive
02-24-2012, 09:01 AM
I think what you have created is invalid code. A paragraph cannot contain any other block-level elements and a table is a block-level element on its own, it doesn't need any container.

DWcourse
02-24-2012, 11:16 PM
A table is the way to go here.

The table isn't actually in the paragraph anyway.

Try:

<table width="100%" cellspacing="0" cellpadding="0" border="0">

But you'll still have issues