Absolute / CSS / Fixed / Position / Relative

CSS Position ile Konumlandırma : Static, Relative,Absolute,Fixed,Sticky

HTML’de normal şartlarda divler yani bizim web sitemizin blokları birbirlerini takip eden akışa sahiptir. Biz

position

etiketi ile konumlandırmayı manuel olarak ayarlayabiliyoruz. Bu etiket position ile bir kaç yapı öğreneceğiz. Bunlar ;

  • Relative
  • Absolute
  • Fixed
  • Static
  • Sticky

Ayrıca

  • top
  • bottom
  • left
  • right

gibi yönleride yardımcı eleman olarak kullanıyoruz.

<!DOCTYPE html>
<html>
<head>
	<title>Position</title>
	<meta charset="utf8">


	<style type="text/css">
		
.bir {


	background-color: yellow;

	width: 400px;

	position: relative;

	bottom: 10px;

	height: 100px;


}


.iki {

	background-color: red;
	width: 400px;
		height: 100px;



}


.uc{

background-color: green;
	position: fixed;

	width: 400px;
	height: 100px;	
}

.ana {

	background-color: blue;
		width: 600px;

		position: absolute;
	top:0px;		
}


	</style>
</head>
<body>



<div class="ana">

	<h3>Ana</h3>

	<div class="bir">Bir</div>

	<div class="iki">İki</div>

	<div class="uc">Üç</div>
	

</div>




</body>
</html>
5 2 votes
Article Rating
Subscribe
Bildir
guest
0 Yorum
Inline Feedbacks
View all comments