I have a problem with position of a block (div). I am newbie in CSS, please help me.
I have this code: http://jsfiddle.net/9rEmt/ (please take a look there) to view online in IE.
If I put absoulte
at positioning, the issue appears: (please choose Compatibility mode if you have newer version of IE )
instead of (without compatibility mode, just simply in IE9) :
Where is the problem ? How to solve this issue ?
Thank you very much
In IE to position an element relative to another element the parent element needs to e positioned itself.
Try to add this to your stylesheet:
#item {
position: relative;
top: 0px;
left: 0px;
}
Also, move the items
div into the item
div so that items
is able to be positioned relative to item
.
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.