I am making a web project http://conatus.in/alumniconnect/index.php?page=about I need to have a floating right sidebar, to accommodate different panels for facebook, news etc.
However, the right sidebar is not working properly. Right sidebar's div id is "sidebarright". CSS is
#sidebarright {
float:right;
}
The contents are posted just above the main panel (<div id="content">)
Left sidebar <div id="sidebar">
with following css is working good.
#sidebar {
float:left;
width:250px;
}
I tried several combinations using firebug and dragonfly, but just cant make the right sidebar to properly float.
Use position:fixed; That makes your sidebar float when you scroll too.
I finally used
#sidebarright {
float:right;
}
When I added more content on the right div
it float:right
started working...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.