jarrett000 Posted March 12, 2009 Share Posted March 12, 2009 I have an image I want at 30%, but the doctype (strict) is preventing from. Here's my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html xmlns='http://www.w3.org/1999/xhtml' lang='en_US' xml:lang='en_US'><head><style type="text/css">.MainIimg {height: 30%;}</style></head><body><img src="NavImg.gif" class="MainIimg" /></body> I've also tried setting it with height="30%" but it just doesn't do anything. This does work, however, when I donot have a doctype present. Is there a way to bypass the doctype? Link to comment Share on other sites More sharing options...
Ingolme Posted March 12, 2009 Share Posted March 12, 2009 Add this to your CSS: html,body { height: 100% }; Also, you need to add it to every element that's an ancestor of the node you want to resize. Link to comment Share on other sites More sharing options...
jarrett000 Posted March 13, 2009 Author Share Posted March 13, 2009 Thx, that worked Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.