navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

CSS Positioning

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> CSS Positioning
Page: [1]
 
boonedawg

 

Posts: 36
Joined: 4/8/2006
Status: offline

 
CSS Positioning - 4/13/2006 15:16:40   
I am trying to get my top right navigation to position itself 5px from the top of the page, currently it is at 18px from the top. I have tried using a top padding of 5px, with no luck :), it's stays the same. I try using a -5px margin, still no luck :). Any ideas on how i would accomplish this? Any help in this matter would be greatly appreciated. Thanks in advance. :)

http://www.shop.ramare.com/template.html

boonedawg

< Message edited by boonedawg -- 4/13/2006 19:45:43 >
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: CSS Positioning - 4/13/2006 15:55:07   
Have you tried just this:

<body style="margin: 5px;">

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to boonedawg)
boonedawg

 

Posts: 36
Joined: 4/8/2006
Status: offline

 
RE: CSS Positioning - 4/13/2006 21:04:51   
rdouglass,

I am unsure where to put that in my code.

CSS


/* Head Nav */
.headnav {
float: right;
width: 831px;
height: 50px;
text-align: right;
padding: 0;
margin: 0;
voice-family: "\"}\"";
voice-family: inherit;
width: 831px;
}
html>body .headnav {
width: 831px;
}

#headnavlist li {
display: inline;
list-style-type: none;
font-size: 10px;
padding-left: 3px;
margin: 0;
}

HTML


<div id="container">
<div id="header">
<div class="logo"></div>
<div class="headnav">
<div id="headnavcontainer">
<ul id="headnavlist">
<li><a href="#">Home</a></li>
<li>|</li>
<li><a href="#">Login</a></li>
<li>|</li>
<li><a href="#">Logout</a></li>
<li>|</li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
</div>

(in reply to rdouglass)
womble

 

Posts: 5702
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: CSS Positioning - 4/14/2006 4:12:36   
Just set up a new style in your stylesheet:

body {
margin: 5px;
}

_____________________________

~~ "A cruel god ain't no god at all" ~~
~~ Erase hate. Practice love. ~~
:)

(in reply to boonedawg)
Tailslide

 

Posts: 6290
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: CSS Positioning - 4/14/2006 4:32:56   
You've got an awful lot of divs in there - I'd say that they're not all necessary. I'd just have the logo and the top menu sitting in the header div and do away with all the rest of it. I think you'll find it easier to position the menu then too.

Something to remember is that it's a very good idea to "reset" margins and padding to zero early on in your CSS - reason being that different browsers have different defaults as far as margins and padding goes. It's best to set the lot to zero and then add it where necessary. A good example is that Firefox adds a few pixels more than IE to the top of a page so that unless you reset your margins and padding, the content will sit very slightly further down in FF than IE.

body {margin: 0; padding: 0;}



_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to womble)
boonedawg

 

Posts: 36
Joined: 4/8/2006
Status: offline

 
RE: CSS Positioning - 4/14/2006 13:41:14   
This is what my body tag looks like for css;

body {
width: 970px;
background: #ffffff;
text-align: center;
padding: 0;
margin: 0 auto;
}

Still note working in FF but IE it looks fine. Any ideas how to get FF to display the same as IE?

boonedawg

(in reply to boonedawg)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> CSS Positioning
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts