...

View Full Version : DOCTYPE for PHP



Citrusgirl
11-13-2010, 04:37 PM
Okay so i've been trying to go through and validate my website,
but after adding the DOCTYPE to just one of the pages,
the layout just went crazy.





Do I have the correct DOCTYPE for a page with php?


Here is a link below to the page I tested it on.

http://www.organicgardencafe.com/press.php





It seems to be whenever i add the DOCTYPE to any of the pages their format starts to look like this.
Otherwise they all look fine.

Excavator
11-13-2010, 05:33 PM
Hello Citrusgirl,
I'm not sure what the PHP is doing but I did notice all that absolute positioning has some problems.
Try adding a px measurement unit to the top and left numbers, like this:

#left_press{
tex-align:left;
position:absolute;
width:222px;
height:1320px;
background-color:#5b3a32;
top:108px;
left:13px;
}

Citrusgirl
11-13-2010, 05:52 PM
Hello Citrusgirl,
I'm not sure what the PHP is doing but I did notice all that absolute positioning has some problems.
Try adding a px measurement unit to the top and left numbers, like this:

#left_press{
tex-align:left;
position:absolute;
width:222px;
height:1320px;
background-color:#5b3a32;
top:108px;
left:13px;
}



It turns out it was adding the px to all the attributes of the page. A simple little change.

Thanks so much for your help.

Excavator
11-13-2010, 05:58 PM
Right on. Glad it was a simple fix.

Have a look at the links about validation in my signature line, it's an easy way to find small errors like that.


.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum