ورود

View Full Version : سوال: در مورد css



{mahdi}
دوشنبه 12 خرداد 1393, 11:26 صبح
به این صفحه یه نگاهی بندازید
چرا من وقتی یه لایه تعریف می کنم میره بالا



<!doctype html>
<html>
<head>
<style type="text/css">
html{width:99%; height:100%;}
body{width:100%; height:100%; background-color:#666;}
#header{width:100%; height:30px; display:block}
#header #right{float:right; margin-right:10px;}
#header #right input[type=text]{border-radius:50px;}
#header #left{float:left;}
#header #left a{text-decoration:none; color:white; font-size:10px;}
#header #left a:hover{color:red;}
#logo_menu{width:100%; height:250px; background-color:white;}
#logo_menu #left{ float:left; display:inline-block; margin-left:40px;}
#logo_menu #left p{font-size:10px; margin-top:-20px;}
#logo_menu #right{ float:right; border:1px solid black; width:468px; height:60px; margin-top:40px; margin-right:40px; display:block;}
</style>
</head>
<meta charset="utf-8">
<title>roject 2</title>
</head>
<body>
<div id="header">
<div id="right"><input type="text"></div>
<div id="left">
<a href="#">SIGN UP</a>&nbsp;|&nbsp;<a href="#">LOGIN</a>&nbsp;|&nbsp;
<a href="#">RSS FRRDS</a>&nbsp;|&nbsp;<a href="#">ARCHIVED NEWS</a>
</div>
</div>
<div id="logo_menu">
<div id="left">
<h1>Columnist</h2><p>Free psd website template</p>
</div>
<div id="right"><p align="center" style="vertical-align:central">486*60</p></div>
<div></div>
</div>
</body>
</html>

ab.ali
دوشنبه 12 خرداد 1393, 16:43 عصر
یعنی چی که لایه ایجاد می کنم؟؟
اگر منظورتون اون div بین logo_menu هستش که باید بگم همیشه بالا است شما باید با margin و ... بیارین پایین!

mohamad_torabi
دوشنبه 12 خرداد 1393, 21:31 عصر
به این صفحه یه نگاهی بندازید
چرا من وقتی یه لایه تعریف می کنم میره بالا



<!doctype html>
<html>
<head>
<style type="text/css">
html{width:99%; height:100%;}
body{width:100%; height:100%; background-color:#666;}
#header{width:100%; height:30px; display:block}
#header #right{float:right; margin-right:10px;}
#header #right input[type=text]{border-radius:50px;}
#header #left{float:left;}
#header #left a{text-decoration:none; color:white; font-size:10px;}
#header #left a:hover{color:red;}
#logo_menu{width:100%; height:250px; background-color:white;}
#logo_menu #left{ float:left; display:inline-block; margin-left:40px;}
#logo_menu #left p{font-size:10px; margin-top:-20px;}
#logo_menu #right{ float:right; border:1px solid black; width:468px; height:60px; margin-top:40px; margin-right:40px; display:block;}
</style>
</head>
<meta charset="utf-8">
<title>roject 2</title>
</head>
<body>
<div id="header">
<div id="right"><input type="text"></div>
<div id="left">
<a href="#">SIGN UP</a>&nbsp;|&nbsp;<a href="#">LOGIN</a>&nbsp;|&nbsp;
<a href="#">RSS FRRDS</a>&nbsp;|&nbsp;<a href="#">ARCHIVED NEWS</a>
</div>
</div>
<div id="logo_menu">
<div id="left">
<h1>Columnist</h2><p>Free psd website template</p>
</div>
<div id="right"><p align="center" style="vertical-align:central">486*60</p></div>
<div></div>
</div>
</body>
</html>




یکی از این علست ها میتونه این باشه که به همه شی ها دستور شناور بودن رو دادید ولی به شی مورد نظر ندارید