Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need Help with Positioning Right SideBar

Posted on 2011-03-22
2
Medium Priority
?
423 Views
Last Modified: 2012-06-21
We are developing a new web site and modeling some different designs. I'll probably turn this over to a professional, but in the meantime can anyone explain to me why the div id="right-side-bar" in this layout will not position as expected in the top right are of the ancestor containing it?

http://dev.himalayanacademy.com/books

Look for the words "Genius Links" which i just dummy text in the div, which now falls below instead of in the right area where I want it to go. It should sit right to the right of the #main-book-container. There's room there, I can't figure why it gets pushed down.
0
Comment
Question by:Sivakatirswami
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
quinks earned 2000 total points
ID: 35195799
#right-side-bar {
    -moz-border-radius: 0.5em 0.5em 0.5em 0.5em;
    background-color: #D2D5DF;
    position: absolute;
    right: 0;
    top: 0;}

#main-content {
    background-color: #F7F4EA;
    position: relative;}
0
 

Author Comment

by:Sivakatirswami
ID: 35201656
Oh boy! I was sure I had tried absolute positioning in an earlier iteration. I was worried that if a horizontal div was added above that this div would get stuck on top other items on top if they moved down.

But not I see that absolute position is relative to the containing ancestor. I know I have read that so many times, but I keep making the fundamental conceptual mistake in  thinking that "absolute" is relative to the browser window...

Maybe doing CSS at the end of a long day it not a good idea ! Thanks Quinks
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
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…
Suggested Courses

604 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