paulmo Posted October 25, 2010 Share Posted October 25, 2010 My footer is only centering on page if I put it after the closing </body> tag. Is this OK? My header tag is before the <body> tag and that works, which gave me the idea to try it with footer and it worked. Link to comment Share on other sites More sharing options...
thescientist Posted October 25, 2010 Share Posted October 25, 2010 uh, all your HTML content should be between the <body> tags, not outside of it. You should post your code, it sounds like you're page isn't structured properly. It should go something like this: <html/DTD><head> <title></title> //any links to external script or CSS files here</head><body> All your web content</body></html> Link to comment Share on other sites More sharing options...
ShadowMage Posted October 25, 2010 Share Posted October 25, 2010 By "header tag" do you mean <head> or <div id='header'>?You can't have any content outside of the body tags.EDIT:Gah, too slow. @thescientist:Doesn't the doctype need to be the first thing in the document? Ie,<doctype><html><head><title></title></head>..... Link to comment Share on other sites More sharing options...
Synook Posted October 25, 2010 Share Posted October 25, 2010 Fun HTML fact, you don't need the opening HTML tag if you have a DOCTYPE markup declaration. If you like to write in a, uh, formal XML-like fashion, though, it's probably better to have the opening HTML tag in there anyway. Link to comment Share on other sites More sharing options...
thescientist Posted October 26, 2010 Share Posted October 26, 2010 By "header tag" do you mean <head> or <div id='header'>?You can't have any content outside of the body tags.EDIT:Gah, too slow. @thescientist:Doesn't the doctype need to be the first thing in the document? Ie,<doctype><html><head><title></title></head>..... Fun HTML fact, you don't need the opening HTML tag if you have a DOCTYPE markup declaration. If you like to write in a, uh, formal XML-like fashion, though, it's probably better to have the opening HTML tag in there anyway.I'm pretty sure all three of is have had this same conversation before at one point. Link to comment Share on other sites More sharing options...
ShadowMage Posted October 26, 2010 Share Posted October 26, 2010 I'm pretty sure all three of is have had this same conversation before at one point. Yes, we have. :)But when I edited my post, your post showed the tags like this:<html><doctype><head>.....Which is incorrect, is it not? Link to comment Share on other sites More sharing options...
jeffman Posted October 26, 2010 Share Posted October 26, 2010 Anyway, paulmo, if your element does not center correctly inside the body tags, there is certainly a reason. As the scientist said, you should post some code, probably HTML and CSS. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.