Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8245273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:07:43+00:00 2026-06-07T22:07:43+00:00

I cannot get positioning, max-width, and ‘right: 0px’ to work together in harmony! I’m

  • 0

I cannot get positioning, max-width, and ‘right: 0px’ to work together in harmony! I’m creating a div that is fixed on my site in the upper right corner. The content of the page has a max-width of 1000px, however the label only obeys my rule of ‘right: 0px’ and sticks to the right, disobeying once max-width has been reached. It should also be noted that by default, the div is in the upper left and obeys the max-width (if I type ‘left: 0px;’ though, it does not obey the rule and it sticks to the left).

CSS:

#content {
margin: 0 auto;
max-width: 1000px; }

#div {
width: 150px;
position: fixed;
right: 0px; } 

Here are some alternatives that I’ve already tried:

  • width: 100% (with text-align: right) <— not quite right, and I don’t like the 100% width as opposed to 150px
  • adding code to position the div “manually” in the html (not CSS)
  • I’ve discovered that float and text-align don’t affect to fixed positioning

Help is greatly appreciated! Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:07:44+00:00Added an answer on June 7, 2026 at 10:07 pm

    If I understand correctly, this is what you’re after.

    You need to add a container with an absolute position to get the content over to the right and then use a fixed position container to keep it top right where you need it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot get this modal dialog to work property. Problem is that in a
I cannot get Bindable LINQ to work with VB.NET for the life of me.
I cannot get the jQuery slideDown function to work on <table> elements. They just
Cannot get my head around the SQL that will return the number of times
I cannot get execv() to work in my C program. I suspect the problem
I cannot get the right-facing arrow (next) to sit on the right edge of
I cannot get this last div to go up properly in my layout and
I cannot get my code to work! I am trying to implement the quick
I cannot get the latest SubSonic with SQLite ActiveRecord to work. I grabbed the
I cannot get wxErlang to work at all. Do i need to include a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.