Hi, I’m having issues with negative margins on IE11. I realize that IE is funky with them so I found two possible fixes in a google search. I only need this for min-height: 768px and in IE11. I don’t have the ability to test 768 so I have to have a friend test and I want to make sure my code is as accurate as possible when I do so they don’t have to keep testing. My question is the css formatting. Which one would be correct?
Repeat your Google search and find out if the “css” is SCSS or something else in an uncompiled form. If it is, you’ll need to compile it before including it in your code.
I am not aware of any way that CSS can identify IE11.
Thanks very much for the URL to PhilipNewcomer’s article. Good stuff.
I hesitated to ask more specifically what you are trying to do that requires negative top margins. They are usually not needed if a different method of coding that area of the layout can be found. For example, newbies commonly are unaware that lists have margin-top and bottom by default which sometimes imposes a white bar above their header.
So let me follow @felgall’s lead and ask if you can post a link to your test site or create a working page that demonstrates the problem using your real code.
That’s the wrong approach and as Ron suggests we can most likely fix the issue without hacks as most problems in IE11 are down to the developers misunderstanding of how css works exactly. Even if there is a bug that you have found then chances are that a simple change in the way you approach the problem will solve the issue.
These days you never want to use a hack because the past has told us that they end up breaking something else along the way. I wouldn’t risk any of those hacks you listed.
Of course you may have found a bug that does need a hack and in which case it is important for us to know what it is in order to spot it in the future. Therefore a demo of the problem is certainly needed.
So, I figured out my issue in all areas,but one. My site is a fullscroll, and the problematic area is section 7. This is the CSS for each row that has a green check at the end:
@media screen and (min-height: 768px) {
.symptomrow {
margin-top:-8px;
}
I am trying to reduce the vertical spacing between each row. The above code works in Chrome and FF, not IE. To get it to work in IE I have to use:
Hi Ralph, thanks for the perspective. That wasn’t it. The padding is fine around the icon. I changed it just to see and it made no difference. The icon is part of the row. I need to adjust vertical spacing between the full row. First row for example is Purchasing and a check mark. I need less space below that row and same goes for all rows.