Solved

Need Help with Positioning Right SideBar

Posted on 2011-03-22
2
412 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

707 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