Reputation: 13651
I have a chat button/link that sits at the bottom right of my page. This is my code in the css, it works perfect in firefox and chrome:
a.trigger{
position: fixed;
bottom: 0px; right: 15px;
padding: 6px 10px 6px 10px;
display: block;
}
In IE though, it just sits at the top of the page. How can I fix it so it works in IE too?
Upvotes: 1
Views: 337
Reputation: 8887
Note: IE7, IE8 and IE9 support the fixed value only if a !DOCTYPE
is specified.
The first line of your page should one of the following:
HTML 4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML 5
<!DOCTYPE html>
Source: http://www.w3schools.com/css/css_positioning.asp
Upvotes: 1
Reputation: 1284
The following code is a clever way to make IE behave a little better. Make sure the css is in that order and that should be the answer or at least get you closer to your goal.
* html .sticky {
position:absolute;
}
.sticky {
position:fixed;
right:0;
top:40%;
}
Upvotes: 0