6 replies [Last post]
skylerhall
skylerhall's picture
Offline
newbie
Last seen: 10 years 1 week ago
Timezone: GMT-5
Joined: 2010-11-17
Posts: 3
Points: 4

Hey everyone, new to the forum, thought I'd start by saying hello!

I'm working on a web page for my buddy and I, and I'm very rusty with my coding at the moment. I've seem to hit a dry spot and don't know what to do.

This is the code for my css...

@charset "utf-8";
/*main*/
body {
	margin:0;
	padding:0;
	background-color: #39334b;
}
 
div#main {
	width: 960px;
	height: 800px;
	margin-left: auto;
	margin-right: auto;
	background-image: url(img/project.png);
}
/*nav*/
#nav {
	margin: 140px auto 0px auto;
	width: 495px;
	height: 60px
 
}
ul#nav {
	margin: 5px 0 10px 0;
	height: 40px;
	line-height: 45px;
	font-size: 2em;
	font-family: "Arial", serif;
	overflow: hidden;
}
ul#nav li {
	display: inline;
	list-style-type: none;
	text-transform: capitalize;
	margin: 0 10px 0 0;
}
ul#nav li a:link, ul#nav li a:visited {
	color: #fff;
	text-decoration: none;
}
ul#nav li a:hover {
	border-bottom: solid;
	border-bottom-width: 0px;
	text-shadow: #000;
	border-color:#e7edf3;
	color: #adbacd;
}

Untitled.png

What you see is what appears through the "live view" setting in DW. My links sit where I want them to when looking at it through the design view, but that doesn't help me.
If anyone can find my problem, I would greatly appreciate it. I know its most likely something I just wasn't paying attention too.
Thanks in advance!

//mod edit: moved from 'site discussion' as it's for discussions related to this site. --gt

regia
regia's picture
Offline
Enthusiast
San Diego
Last seen: 5 years 28 weeks ago
San Diego
Timezone: GMT-4
Joined: 2010-10-24
Posts: 313
Points: 360

What...???

skylerhall wrote:

What you see is what appears through the "live view" setting in DW. My links sit where I want them to when looking at it through the design view, but that doesn't help me.
If anyone can find my problem, I would greatly appreciate it. I know its most likely something I just wasn't paying attention too.

So what is your problem, you just said you had one but didn't explain what is wrong with it. One other big pointer, DO NOT BELIEVE WHAT DW IS SHOWING YOU IN LIVE VIEW. There are many different browsers out there all with their different quirks. Test in Firefox, Safari, Chrome and then all the IE's from 6 - 8 and forget about DW live view, that is only an interesting feature if you need to immediately grab hold of an element.

skylerhall
skylerhall's picture
Offline
newbie
Last seen: 10 years 1 week ago
Timezone: GMT-5
Joined: 2010-11-17
Posts: 3
Points: 4

The problem is the links are

The problem is the links are where they're supposed to be and its moving the image I have further down from the top margin.

Its the same with Firefox, Chrome, etc. I do usually test the page through those first.

djsounds02
djsounds02's picture
Offline
Enthusiast
Burnley, UK
Last seen: 9 years 4 weeks ago
Burnley, UK
Joined: 2010-06-17
Posts: 110
Points: 134

dont use DW. Get yourself

dont use DW. Get yourself notepad++

djsounds02
djsounds02's picture
Offline
Enthusiast
Burnley, UK
Last seen: 9 years 4 weeks ago
Burnley, UK
Joined: 2010-06-17
Posts: 110
Points: 134

You have only given us css

You have only given us css code? html code too please? How far is it moving it down? Get measureit for firefox to find out then when you have the size you can work out what attribute in the css you have implemented wrong?

skylerhall
skylerhall's picture
Offline
newbie
Last seen: 10 years 1 week ago
Timezone: GMT-5
Joined: 2010-11-17
Posts: 3
Points: 4

here is html

<!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=utf-8" />
<title>projectheadspill</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" />
</head>
 
<body>
 
<div id="main">
<div id="nav">
  <ul id="nav">
  <li><a href="#">about</a></li>
  <li><a href="#">sound</a></li>
  <li><a href="#">video</a></li>
  <li><a href="#">contact</a></li>
  </ul>
 
</div>
</div>
 
</body>
</html>

keganquimby
keganquimby's picture
Offline
newbie
New Hampshire, USA
Last seen: 9 years 49 weeks ago
New Hampshire, USA
Timezone: GMT-5
Joined: 2010-12-21
Posts: 8
Points: 8

woah. lets start with the

woah. lets start with the fact that you can only have one ID per page, so you cant have the ul and the div with an id of "nav"... i think thats messing up the margins and padding, because you do use a #nav in your css

once you change your IDs and CSS to go with it, repost and I'll take a look