1internet Posted March 23, 2013 Share Posted March 23, 2013 I have an issue in IE8 where my div is displayed about 50px closer to the top than in FF or Chrome, or IE9. I think I have narrowed it down to it being the position absolute. I am declaring an HTML5 doctype, but still facing this issue. It also occurs for position: relative. #slider { position: absolute; margin-left: 315px; margin-top: -350px; z-index: 1; } Any easy solution to get around this? Quote Link to comment https://forums.phpfreaks.com/topic/276041-position-absolute-in-ie8/ Share on other sites More sharing options...
haku Posted March 23, 2013 Share Posted March 23, 2013 Explicitly set 'top' (or 'bottom') and 'left' (or 'right') Quote Link to comment https://forums.phpfreaks.com/topic/276041-position-absolute-in-ie8/#findComment-1420445 Share on other sites More sharing options...
1internet Posted March 23, 2013 Author Share Posted March 23, 2013 I tried that, but left won't work for different window sizes. How do I solve that? Quote Link to comment https://forums.phpfreaks.com/topic/276041-position-absolute-in-ie8/#findComment-1420446 Share on other sites More sharing options...
haku Posted March 23, 2013 Share Posted March 23, 2013 Not enough information to say. Quote Link to comment https://forums.phpfreaks.com/topic/276041-position-absolute-in-ie8/#findComment-1420450 Share on other sites More sharing options...
1internet Posted March 23, 2013 Author Share Posted March 23, 2013 It works with top, do I really need left or right? Is vertical placement enough? Quote Link to comment https://forums.phpfreaks.com/topic/276041-position-absolute-in-ie8/#findComment-1420463 Share on other sites More sharing options...
haku Posted March 23, 2013 Share Posted March 23, 2013 Test cross-browser. If it is the same, you don't need it. If it's not, you do. Quote Link to comment https://forums.phpfreaks.com/topic/276041-position-absolute-in-ie8/#findComment-1420464 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.