Log in

View Full Version : html css



Oddy
06-04-2015, 06:49 AM
what's the code to add a css tag into html
tried <div class"allthatstuff">
but cant really get it to work.

my html so far:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Upcomming nova</title>

<link href="stylesheet.css" rel="stylesheet" type="text/css">
</head>

<body>
<div class="top">


</body>
</html>

my css so far:
@charset "utf-8";

top {
background-image:url(../Pictures/ps/nova/header.png);
height:auto;
width: auto;

}
Home {


}

Forums {


}

Donations {


}

Server Information {


}

Staff {


}

the layout im trying to make a website out of, yes it is precut and ready to be coded.
http://i.imgur.com/34MCuSM.png
did i forget anything?

Drew
06-04-2015, 08:01 AM
You've used top as a class attribute, so you'll need to add a dot before "top" in your CSS to make it a class selector, like this:


.top {
background-image: url(../Pictures/ps/nova/header.png);
height: auto;
width: auto;
}

Oddy
06-04-2015, 08:09 AM
You've used top as a class attribute, so you'll need to add a dot before "top" in your CSS to make it a class selector, like this:


.top {
background-image: url(../Pictures/ps/nova/header.png);
height: auto;
width: auto;
}

ohhhh it worked instantly, thank you Drew ;)

Want to hide these adverts? Register an account for free!