Q:

absolute ignoring parent padding

I am using bootstrap and I am trying to create my own dropdown menu on right side.
I Tried below css.But its ignoring parents padding.But when I use position : relative Its working fine but its pushing the text contents down.So I want absolute overlay but also Preserve the parent padding.
.menu
{
  background:#ccc;
  top: 50px;
  right: 0px;
  position: absolute;
  clear: both;
}

Here is the fiddle with html - http://jsfiddle.net/97bqun6s/
P.s: my parent is bootstrap .container class whose padding varies for screen sizes.

A:

When you use position: absolute on an element then that element will be positioned within its closest 'non static' parent container's content area and padding box. You can refer to the Box Model for reference.
A simple solution would be to say right: 15px. This will offset the side-nav from the right to align with the rest of the container.
See this jsFiddle
EDIT:
Since the padding of the container is variable this may not be a viable solution.
You could instead add a wrapper div just inside the container
<div class="container">
    <div class="content-wrap">
        ...
    </div>
</div>

and position it relative.
 .content-wrap {
    position: relative;
 }

See updated jsFiddle

