Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: DOCTYPE for PHP

  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DOCTYPE for PHP

    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.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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:
    Code:
    #left_press{
    	tex-align:left;
    	position:absolute;
    	width:222px;
    	height:1320px;
    	background-color:#5b3a32;
    	top:108px;
    	left:13px;	
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    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:
    Code:
    #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.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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.


    .
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •