I just started taking a web design class about 4 weeks ago and I'm extremely interested in it. If anyone can help a newbie like me, I'd be very grateful.
I'm not quite sure on what the problem is here. The code worked on a separate file of mine, but when I tried to start a new project it just wouldn't work anymore. :/
Here is my HTML:
<!DOCTYPE html>
<html>
<head>
<title>Good Boy</title>
<link rel="stylesheet" type="text/css" href="goodboyslove.css">
<link rel="shortcut icon" href="images/GBFavicon.ico">
</head>
<body>
<a href="http://www.oriko-san.tumblr.com/"><img id="gblogo" class="center" src="images/GB.png" alt="good boy logo" width="128" height="128">
Here is my CSS:
<!DOCTYPE css>
.center {
display: block;
margin-left: auto;
margin-right: auto; }
#gblogo{position:relative;top:32px;}
doctype
is a document type declaration which is not valid in a CSS document. Removing that will solve the issue. CSS falls under a MIME type which you are declaring with the type="text/css"
of your link tag.
Here is a introduction article regarding HTML and includes a section of the use of doctype