Click to See Complete Forum and Search --> : Formatting Issues
derekj
08-12-2009, 03:56 PM
Hey guys,
I'm just learning web development and have been having some formatting issues at my page here: http://www.derekjohansen.com/Web_Practice/trusses/roofs.php
there are extra spaces below the header, and between the table and the link at the bottom. When I compare my code to the similar page:
http://www.derekjohansen.com/Web_Practice/trusses/floors.php
I don't have the same formatting issue! I really have no idea what is causing this! I went through the code line by line and don't see ANYTHING! Any tips would be greatly appreciated! I thought it might have been my CSS sheet, but both pages use the same sheet, and only one of them has the problem!
Thanks for the help,
Derek
Evenjos
08-12-2009, 05:23 PM
I don't see any problem, except a little extra space at the bottom of the table. You may want to try removing all the <div> and <p> tags over there. I find that they add unwanted extra space. I prefer to write straight HTML, not use Dreamweaver.
thraddash
08-12-2009, 05:41 PM
There are a lot of errors in these pages:
For example you have multiple <html>, <body> and <head> tags (probably others), I think there are at least three of each.
Html has a structure like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>The Pages Header</title>
<meta tags here />
<style type="text/css">
/*ALL YOUR STYLESHEET RULES HERE*/
</style>
<script type="text/javascript">
/*YOUR JAVASCRIPT CODE HERE*/
</script>
</head>
<body>
<!--THE PAGES CONTENT HERE-->
</body>
</html>
Please correct the structure in your pages first.
derekj
08-12-2009, 05:44 PM
Now like I said, I'm new, but I think the reason it's doing that is because I used PHP includes for the menu and the header. Each of the sections with the multiple tags are where the PHP include is in my source code. What other way should I do this?
thraddash
08-12-2009, 05:50 PM
The header and menu files will not need to contain the <html>, <body> or <head> tags.
They can simply just contain their content such as the banner image.
The main php page that includes them must be written so that the header file is included at the right time (after the body tag) which it seems like your doing anyway. :)
This will probably not be a big thing to fix.
derekj
08-12-2009, 06:14 PM
Thank you very much! That will be the first think I fix when I work on it tonight/tomorrow!
Thanks!
thraddash
08-12-2009, 06:16 PM
If you get stuck, please submit the main php file and the header file for inspection. So I know what I'm dealing with :P
multimediocrity
08-16-2009, 02:05 PM
Hmm... we might be able to give you more advice if you tell us what browser and platform you're using. Are you using IE, FireFox, etc?