Home > Web Front-end > HTML Tutorial > Why is relative positioning invalid in IE7? _html/css_WEB-ITnose

Why is relative positioning invalid in IE7? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:14:54
Original
1441 people have browsed it

Why is relative positioning invalid in IE7?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>page title</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>	<style type="text/css">		*{margin:0;padding:0;}		body{padding:20px;}		.btns_line {			padding-bottom:1px;			text-align:center;			word-spacing:-6px;		}		.btn{			position:relative;			display:inline-block;		}		.btn:hover{			top:1px;		}		.btn_wood{background-color:tan;margin-left:5px;}			</style>	<div class="btns_line">		<a href="#" class="btn btn_wood"><span><em class="icon"></em>Keep Me in</span></a>		<a href="#" class="btn btn_wood"><span><em class="icon"></em>Keep Me in</span></a>	</div></body></html>
Copy after login


Reply to discussion (solution)

.btn{
position:relative;
}
.btn: hover{
                                                                          .

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template