Have I done something wrong?

  • Thread starter Thread starter Jet
  • Start date Start date

Jet

Jet

Soldato
Joined
19 Oct 2004
Posts
2,952
Location
Newcastle
I'm redesiging with CSS, etc, but hit my first snag. I've positioned a logo in the top left using an external style sheet, since it will be on every page of the site. It displays ok in Dreamweaver but when I preview in the browser it doesn't display. Is this normal? Because of the way CSS works or because it's an external style sheet and won't load with the preview? I can post the code/CSS if needed.

2nd question. If I want to centre the full website is there anything wrong with creating a div which is centered, etc, and putting everything else into this div?

Thanks.
 
Yep, I've learnt enough CSS I think to know when to use the different types. I hope.

Here's the code, not much done so far as you can see lol.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>****</title>
<link href="assets/styles.css" rel="stylesheet" type="text/css" />

</head>

<body>
<div id="logo"></div>
</body>
</html>

Code:
/* CSS Document */

#logo {
	position:absolute;
	left:3px;
	top:3px;
	width:140px;
	height:84px;
	z-index:1;
	background-image: url(images/mainlogo.jpg);
}
 
Thanks a lot Growse, i've made those changes. Dreamweaver inserts the position, z-index things when I create a layer (div). I've took it out and used margin instead. It now displays properly, maybe the quotes are required.

Do you know of any chart showing what each of the different attributes actually mean, like z-index and what effect the various options have, like positioning absoute, relative, etc?

Thanks again.
 
Back
Top Bottom