On my header, i have a link and clicking on the link would open a menu, with list items below the link. It works fine in IE9,10 and chrome. But in Firefox and IE8, the link is moved to the left(though text-align is given as right) and menu is placed adjacent to it. I have spend my whole day on this issue, without any luck.
<div class="float-right">
<section>
<a> test@test.com </a>
<ul style="display: block;">
<li>..</li>
<li>..</li>
</ul>
<section>
<div>
CSS:
.float-right {
float: right;
}
JsFiddle: http://jsfiddle.net/j7MWp/2/
Did you try to add <!DOCTYPE html>
? Sometimes this is only solution for IE.
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.