jsparrow Posted May 5, 2011 Share Posted May 5, 2011 I have a basic web page that is a rectangle and I'm trying to put a box within this rectangle at the top, but it has a space that I can not figure out how to get rid of. Here is the code for the index.php, top.inc and align.css files: index.php <html> <head> <title> Home </title> <link rel="stylesheet" href="align.css" type="text/css"> </head> <body> <div id="wrapper"> <div id="logo"> <?php include ("top.inc") ?> </div> </div> </body> </html> top.inc <html> <head> </head> <p> Show this to me </p> </html> align.css body { font-family: Arial, Helvetica, sans-serif; font-size:100%; padding:0px; background-color:white; text-align:center; } #wrapper { width:600px; height:850px; margin:70px auto auto auto; background-color:yellow; border-style:solid; border-width:2px; border-color:green; } #logo { width:600px; height:280px; margin:0px auto 0px auto; background-color:orange; } How do I get rid of the space at the top of the top.inc and make if flush with the top of the wrapper? Quote Link to comment https://forums.phpfreaks.com/topic/235638-problem-with-space-at-top-of-wrapper-using-include-statement/ Share on other sites More sharing options...
btherl Posted May 5, 2011 Share Posted May 5, 2011 I'm asking for this to be moved to the HTML or CSS forum. BTW you are including a full HTML page within another HTML page there - probably your included file should be a div or a table. Quote Link to comment https://forums.phpfreaks.com/topic/235638-problem-with-space-at-top-of-wrapper-using-include-statement/#findComment-1211155 Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 yeah, top.inc needs to be a div. then start from there Quote Link to comment https://forums.phpfreaks.com/topic/235638-problem-with-space-at-top-of-wrapper-using-include-statement/#findComment-1211156 Share on other sites More sharing options...
Pikachu2000 Posted May 5, 2011 Share Posted May 5, 2011 Moved to CSS . . . Quote Link to comment https://forums.phpfreaks.com/topic/235638-problem-with-space-at-top-of-wrapper-using-include-statement/#findComment-1211157 Share on other sites More sharing options...
jsparrow Posted May 5, 2011 Author Share Posted May 5, 2011 Thanks. Yea, just made the .inc file a div and removed all the other html and that worked. Quote Link to comment https://forums.phpfreaks.com/topic/235638-problem-with-space-at-top-of-wrapper-using-include-statement/#findComment-1211165 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.