Effect of doctype on css

deusevil

New Member
When I do\[code\]<html> <head> </head> <body> <div style="width:100%;height:100%;background:blue;"></div> </body></html>\[/code\]the div fills the windowbut if i add a doctype tag at the beginning\[code\]<!DOCTYPE HTML><html> <head> </head> <body> <div style="width:100%;height:100%;background:blue;"></div> </body></html>\[/code\]the div fills the width, but doesn't fill the height.Any idea what's going on? I know I'm supposed to put doctype tags, I'm just wondering specifically it's doing in this case thats causing the different behavior.
 
Top