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 8832435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:31:40+00:00 2026-06-14T08:31:40+00:00

I have the following HTML code <div id=container> <div id=fixed>Logo</div> </div>​ and then the

  • 0

I have the following HTML code

<div id="container">
    <div id="fixed">Logo</div>
</div>​

and then the following CSS code

#container {
    width: 400px;
    border: 1px solid red;
    float:right;
}

#fixed {
    float:left;
    width: 200px;
    border: 1px solid green;
}​

When i resize the windows i want the fixed div to keep moving to the right when the edge of the window is at the begining of it.

Do you know any way of doing this with CSS, javascript or HTML?

I have created an example in jsfiddle you can view it in http://jsfiddle.net/alvarezskinner/kRrdb/ if you resize the middle bar you will see the fixed layer stays still.

  • 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-14T08:31:42+00:00Added an answer on June 14, 2026 at 8:31 am

    I don’t think this does exactly what you want, but it at least gets closer. Change the container style to:

    #container {
        width: 100%;
        border: 1px solid red;
        float:right;
        max-width:400px;
    }
    

    Instead of moving the fixed div, this will just make sure that the container doesn’t get wider than the page, thereby ensuring that the fixed div doesn’t go past the left of the page. Will this work well enough?

    Here is a fiddle if you want it: http://jsfiddle.net/jdwire/kRrdb/2/

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

Sidebar

Related Questions

I have the following HTML/CSS code: <div id=container style=padding:5px; width:600px;> <div id=panel> <a style=padding:5px;
Suppose I have the following HTML code: <div id=container style=width: 960px> <div id=help_panel style=width:
I have the following code: html: <div id=footer-container> last line in page </div> css:
I have the following html code with Jquery Sorting <div class=sortable style='width:700px; margin: 0
I have the following html code. <html> <body> <div style=max-width:1600px; min-width:900px; > <table> </table>
I have the following css code .container { width:800px; background-color:yellow; margin:auto; display:table; } .cell
I have the following HTML code / structure: <div id=container> <div id=div1>text</div> <div id=div2>more
I have following code in the html file: <div class=navbar navbar-fixed-top> <div class=navbar-inner> <div
Have the following html code: <div id=container> <div id=container2> ... </div> </div> and the
I have the following HTML code: <div class=container> <span class=red></span> <span class=hot></span> </div> On

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.