Solved

Need Help with Positioning Right SideBar

Posted on 2011-03-22
2
380 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
2 Comments
 
LVL 3

Accepted Solution

by:
quinks earned 500 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

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, html 6 51
Synchronizing CSS load 3 29
How to loop bootstrap columns which contain database records 9 23
CSS z-index issue 3 22
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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 …

896 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

16 Experts available now in Live!

Get 1:1 Help Now