pngtest Posted June 19, 2008 Share Posted June 19, 2008 Hey guys i have this code <!DOCTYPE HTML PUTLIC "-//w3c//dtd html 3.2 final//en"> <html> <head> <in.html"; } //end if if (empty($links)){ $links = "top.html"; } //end if if (empty($content)){ $content = "main.html"; } //end if if (empty($links)){ $links = "top.html"; } //end if print "<span class = \"topMenu\"> \n"; include ("top.html"); print "</span> \n"; print "<span class = \"menuPanel\"> \n"; include ($menu); print "</span> \n"; print "<span class = \"item\"> \n"; include ($content); print "</span> \n"; ?> </body> </html> that is attached to this css <style type = "text/css" body { background-color: #ffffff } span.topMenu { position: absolute; left: 30% width: 10% } h1{ color: #0000ff; font-family: "Commic Sans MS"; text-align: center } span.menuPanel { position: absolute;span.menuPanel { position: absolute; left: 15px; width: 15% background-color: #ccccff } span.item { position: absolute; border-bottom: small solid #000000; margin-left: 20%; top: 10%; right: 15%; width: 80%; background-color: #ccccff; } and i am unable to get the css working it prints the page improperly and i can not fix it everything is grouped in the left top corner Quote Link to comment Share on other sites More sharing options...
trq Posted June 19, 2008 Share Posted June 19, 2008 Cool. Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted June 19, 2008 Share Posted June 19, 2008 Interesting. Seems to be missing the top part. Oh, and a question... Quote Link to comment Share on other sites More sharing options...
pngtest Posted June 19, 2008 Author Share Posted June 19, 2008 sorry guys it posted with out me finsihing typing. i need it to show a title on the top and the menu to the left and the the main in the center. Quote Link to comment Share on other sites More sharing options...
pngtest Posted June 19, 2008 Author Share Posted June 19, 2008 sorry can't copy and paste properly. <!DOCTYPE HTML PUTLIC "-//w3c//dtd html 3.2 final//en"> <html> <head> if (empty($menuPanel)){ $menuPanel = "menu.html"; } //end if if (empty($content)){ $content = "main.html"; } //end if if (empty($links)){ $links = "top.html"; } //end if print "<span class = \"topMenu\"> \n"; include ("top.html"); print "</span> \n"; print "<span class = \"menuPanel\"> \n"; include ($menu); print "</span> \n"; print "<span class = \"item\"> \n"; include ($content); print "</span> \n"; ?> </body> </html> that should be corrected. Quote Link to comment Share on other sites More sharing options...
trq Posted June 20, 2008 Share Posted June 20, 2008 Sorry, I still don't see a decent descrioion of your problem and your code still doesn't seem to be complete. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 I didn't read through all of the code, but I'm pretty sure your problem would be that you aren't enclosing the include with an echo of style tags. =) echo '<style type="text/css">'; include 'somesheet.css'; echo '</style>'; Quote Link to comment Share on other sites More sharing options...
pngtest Posted June 20, 2008 Author Share Posted June 20, 2008 thanks for all of your guys help and sorry about the wierd things don't know what happened..... ok it is still not working and i still don't know why.Here is the php code. <html> <head><title></title> <body> <?php include ("pngstyle.css"); if (empty($linkMenu)){ $linkMenu = "menu.html"; }// end if if (empty($topMenu)){ $topMenu = "navigation.html"; } //end if if (empty($mainMenu)){ $mainMenu = "main.html"; } //end if print "<span class = \" linkMenu\"> \n"; include ($linkMenu); print "</span> \n"; print "<span class = \" topMenu\"> \n"; include ($topMenu); print "</span> \n"; print "<span class = \"mainMenu\"> \n"; include ($mainMenu); print "</span>"; ?> </body> <html> and the css <style type = "text/ccss"> body { background-color: red; } span.linkMenu { position: absolute; left: 1%; width: 20%; background-color: #fffff2; } span.topMenu { position: absolute; top: 2%; width: 80% background-color: #fffff2; } span.mainMenu { position: absolute; top: 6%; width: 80%; } A:link {font-color: #000000} A:hover {font-size: 10%} A:visited {font-color: #0000ff} </style> and what the source come to when you view. <html> <head><title></title> <body> <style type = "text/ccss"> body { background-color: red; } span.linkMenu { position: absolute; left: 1%; width: 20%; background-color: #fffff2; } span.topMenu { position: absolute; top: 2%; width: 80% background-color: #fffff2; } span.mainMenu { position: absolute; top: 6%; width: 80%; } A:link {font-color: #000000} A:hover {font-size: 10%} A:visited {font-color: #0000ff} </style> <span class = " linkMenu"> <ul> <li><a href = "page.php?content=main.html"> main</a> </li> </ul> </span> <span class = " topMenu"> link one </span> <span class = "mainMenu"> this should be content in the main body of the page </span> </body> <html> am i doing something wrong Quote Link to comment Share on other sites More sharing options...
lemmin Posted June 20, 2008 Share Posted June 20, 2008 You need to put the open body tag after your php so that the style block isn't in the body. You also need to close the head tag before your php. After that, you need to remove the extra 'c' in "text/ccss". After those three things, your style block should actually get parsed, I don't know if it is how you want it to look, though. Quote Link to comment Share on other sites More sharing options...
pngtest Posted June 20, 2008 Author Share Posted June 20, 2008 ok thanks it did not apparently i am not that good at css will have to look into that but thanks on the help guys. Quote Link to comment 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.