- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
it remains fixed, even i changed its position from fixed to relative?
You’ll have to give us more than that.
Do you have a link?
/* Sidebar */
#sidebar {
float: right;
width: 280px;
position: relative;
z-index: auto;
left: 220px;
}
#sidebar ul {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar li {
margin-bottom: 20px;
padding: 20px 20px 40px 20px;
background: url(images/img04.jpg) no-repeat;
}
#sidebar li ul {
line-height: 240%;
}
#sidebar li li {
margin: 0;
padding: 0;
background: none;
padding-left: 15px;
background: url(images/img05.gif) no-repeat left center;
}
#sidebar h2 {
margin-bottom: 20px;
text-transform: lowercase;
color: #4F789F;
font-family: “Adani Medium”;
}
#s {
width: 160px;
}
this is my sidebar css code.
Yes, I understand but it doesn’t help on its own. We need to see the sidebar in context of the other elements around it.
What are you trying to achieve?
Remember ‘relative’ positioning means relative to itself. Also, floats and positioning will often fight and cause unforeseen problems.
Se: https://css-tricks.com/video-screencasts/110-quick-overview-of-css-position-values/