Jump to content

Height With Css


jarrett000
 Share

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...