Absolutle Positioned Navigation bar in a Float Layout

Posted on 2009-04-07
Last Modified: 2012-05-06
I am trying to get navigation bar to be absolute positioned.  However, when I resize the browser the navbar moves. How do I keep it in place?  See Link
html, body {

  font-family: sans-serif;

  margin: 0;

  padding: 0;

  border: 0;


body { background-color: rgb(250,250,250)};

h1 {

font-family: Trebuchet MS;

font-size: 24px;

font-weight: normal;

color: rgb(47, 79, 79);


#main {

  width: 800px;

  max-width: 1000px;

  height: 600px;


  margin: 2em auto;

  padding: 1em;


#logo {


margin-top: 50px;






#buttons {

	position: absolute;

	top: 184px;

	right: 182px;

	width: 349px;


#footer {

font-size: 70%;

text-align: center;

line-height: normal;

margin-top: 30px;


Open in new window

Question by:Albee_J
  • 2
LVL 13

Expert Comment

ID: 24093058
On the link provided the #button is positioned relative with top of -180px.

Please check and provide feedback


Accepted Solution

Albee_J earned 0 total points
ID: 24095935
I got it to work by futzing around with it.  I changed it from absolute to relative.

Author Comment

ID: 24095949
I posted to quickly in here. Sorry...

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS Font Arial Narrow 2 31
How to change pointer icon to hand icon on mouseover 2 19
Capture logon name 13 42
css icomoons will not display on page 14 20
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now