alys Posted June 4, 2006 Share Posted June 4, 2006 Sorry, I had a problem which was posted here, but I found an error in my php coding, so it is all fixed now. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Quote Link to comment https://forums.phpfreaks.com/topic/11155-phphtmlcss-newbie-question/ Share on other sites More sharing options...
kenrbnsn Posted June 4, 2006 Share Posted June 4, 2006 Compare the generated HTML from your PHP script with the working HTML and you should see the differences.Here is the start of the working HTML[!--html--][div class=\'htmltop\']HTML[/div][div class=\'htmlmain\'][!--html1--]<[color=blue]html xmlns[/color]="[color=orange]http://www.w3.org/1999/xhtml[/color]"><[color=blue]head[/color]><[color=blue]title[/color]>Stories and Lies<[color=blue]/title[/color]><[color=blue]meta content[/color]="[color=orange]text/html; charset=iso-8859-1[/color]" http-equiv="[color=orange]Content-Type[/color]" /><[color=blue]link rel[/color]="[color=orange]shortcut icon[/color]" href="[color=orange]images/favicon.ico[/color]" /><[color=blue]link type[/color]="[color=orange]text/css[/color]" href="[color=orange]style.css[/color]" rel="[color=orange]stylesheet[/color]" /><[color=blue]/head[/color]><[color=blue]body[/color]><[color=blue]div id[/color]="[color=orange]container[/color]"><[color=blue]div id[/color]="[color=orange]top[/color]"><![color=red]-- Edit your site name here --[/color]><[color=blue]h1[/color]><[color=blue]/h1[/color]><![color=red]-- End edit --[/color]><[color=blue]/div[/color]><[color=blue]div id[/color]="[color=orange]nav[/color]"><[color=blue]div id[/color]="[color=orange]navcontainertop[/color]"><[color=blue]/div[/color]><[color=blue]div id[/color]="[color=orange]navcontainer[/color]"><[color=blue]html[/color]><[color=blue]head[/color]><[color=blue]title[/color]>Simple Colors<[color=blue]/title[/color]><[color=blue]meta content[/color]="[color=orange]text/html; charset=iso-8859-1[/color]" http-equiv="[color=orange]Content-Type[/color]" /><[color=blue]link rel[/color]="[color=orange]shortcut icon[/color]" href="[color=orange]images/favicon.ico[/color]" /><[color=blue]link type[/color]="[color=orange]text/css[/color]" href="[color=orange]style.css[/color]" rel="[color=orange]stylesheet[/color]" /><[color=blue]/head[/color]><[color=blue]div id[/color]="[color=orange]nav[/color]"><![color=red]-- Edit Sidebar here --[/color]><[color=blue]h3[/color]>Navigation<[color=blue]/h3[/color]><[color=blue]P ALIGN[/color]="[color=orange]left[/color]"><[color=blue]ul[/color]>[!--html2--][/div][!--html3--]Here is the cooresponding section of the PHP generated HTML[!--html--][div class=\'htmltop\']HTML[/div][div class=\'htmlmain\'][!--html1--]<[color=blue]html xmlns[/color]="[color=orange]http://www.w3.org/1999/xhtml[/color]"><[color=blue]head[/color]><[color=blue]title[/color]>Stories and Lies<[color=blue]/title[/color]><[color=blue]meta content[/color]="[color=orange]text/html; charset=iso-8859-1[/color]" http-equiv="[color=orange]Content-Type[/color]" /><[color=blue]link rel[/color]="[color=orange]shortcut icon[/color]" href="[color=orange]images/favicon.ico[/color]" /><[color=blue]link type[/color]="[color=orange]text/css[/color]" href="[color=orange]style.css[/color]" rel="[color=orange]stylesheet[/color]" /><[color=blue]/head[/color]><[color=blue]body[/color]><[color=blue]div id[/color]="[color=orange]container[/color]"><[color=blue]div id[/color]="[color=orange]top[/color]"><![color=red]-- Edit your site name here --[/color]><[color=blue]h1[/color]><[color=blue]/h1[/color]><![color=red]-- End edit --[/color]><[color=blue]/div[/color]><[color=blue]div id[/color]="[color=orange]nav[/color]"><[color=blue]div id[/color]="[color=orange]navcontainertop[/color]"><[color=blue]/div[/color]><[color=blue]div id[/color]="[color=orange]navcontainer[/color]"><[color=blue]html[/color]><[color=blue]head[/color]><[color=blue]title[/color]>Simple Colors<[color=blue]/title[/color]><[color=blue]meta content[/color]="[color=orange]text/html; charset=iso-8859-1[/color]" http-equiv="[color=orange]Content-Type[/color]" /><[color=blue]link rel[/color]="[color=orange]shortcut icon[/color]" href="[color=orange]images/favicon.ico[/color]" /><[color=blue]link type[/color]="[color=orange]text/css[/color]" href="[color=orange]style.css[/color]" rel="[color=orange]stylesheet[/color]" /><[color=blue]/head[/color]><[color=blue]div id[/color]="[color=orange]nav[/color]"><![color=red]-- Edit Sidebar here --[/color]><[color=blue]h3[/color]>Navigation<[color=blue]/h3[/color]><[color=blue]P ALIGN[/color]="[color=orange]left[/color]"><[color=blue]ul[/color]>[!--html2--][/div][!--html3--]You should notice that the generated HTML has another "<html>" and "<head>" tags in it. This is thowing off your display since the markup is nolonger valid.KenAlways leave your original question intact. Post a reply to the topic when it is solved.Ken Quote Link to comment https://forums.phpfreaks.com/topic/11155-phphtmlcss-newbie-question/#findComment-41713 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.