Reputation: 31
A weird one... I have a website with a container for 960px, with a sidebar inside it... I need to position the sidebar to the absolute left, however I still need the sidebar to have a height, so the page is as large as the sidebar, so that the footer sits below it...
Please look at the links so I've got the whole setup in there
So an example of what I started with is this:
.sidebar {
background:#fff;
border: solid 1px #000;
width:100px;
float:left;
margin:25px;
}
And what I've been able to do is the below:
.sidebar {
background:#fff;
border: solid 1px #000;
width:100px;
float:left;
margin:25px;
position:absolute;
left:25px;
}
So what I want is kinda like the second one, however I need the sidebar to have a height...
The way the site is setup I can't just remove the sidebar from the container, trust me I've tried for hours.
I need this positioned to the left of the browser window, not the wrapper.
Any help would be awesome!
Thanks.
EDIT
I just hid the element and used jQuery to fade it in and move it outside of the wrapper at the same time.
jQuery('.sidebar').prependTo(".page").fadeIn()
Thanks for your help
Upvotes: 0
Views: 1299
Reputation: 439
I am not sure. Is this you need.
Try this:
Chech here: http://jsfiddle.net/nMeqp/7/
.sidebar {
background:#fff;
border: solid 1px #000;
width:100px;
float:left;
margin:0px;
position:absolute;
left:25px;
}
Upvotes: 0