Jump to content

Archived

This topic is now archived and is closed to further replies.

alys

PHP/HTML/CSS newbie question.

Recommended Posts

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\" /]

Share this post


Link to post
Share on other sites
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.

Ken



Always leave your original question intact. Post a reply to the topic when it is solved.

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.