Jump to content

Css İlk Ve Son Öge Margin Sıfırlamak


Recommended Posts

Arkadaşlar. Aşağıdaki gibi bir yapım var.

Öncelikle css dosyasını kendim kodladım.
Arkadaşlar row classı içinde bulunan ögelerden ilk öğesinin margin-left ve son öğesinin margin-right değerini sıfırlamak istiyorum ve bir standart olsun istiyorum. Yani row classı' nın içindeki öğelerin her zaman ilk ve son öğenin margin değerlerini sıfırlasın. Nasıl yapabilirim?

 

 style.css

body { margin: 0px; padding: 0px; }
.container { width: 1200px; margin: 0 auto; padding-top: 18px; padding-bottom: 18px; background-color: #34495E; }
.grids { width: 1164px; margin: 0px 18px; background-color: #BBB; }
.clean { clear: both; }

.row { height: auto; }
.column { float: left; margin-top: 10px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px;}

.col-1  { background-color: yellow; color: #34495E; width: 54px;   }
.col-2  { background-color: yellow; color: #34495E; width: 128px;  }
.col-3  { background-color: yellow; color: #34495E; width: 202px;  }
.col-4  { background-color: yellow; color: #34495E; width: 276px;  }
.col-5  { background-color: yellow; color: #34495E; width: 350px;  }
.col-6  { background-color: yellow; color: #34495E; width: 424px;  }
.col-7  { background-color: yellow; color: #34495E; width: 498px;  }
.col-8  { background-color: yellow; color: #34495E; width: 572px;  }
.col-9  { background-color: yellow; color: #34495E; width: 646px;  }
.col-10 { background-color: yellow; color: #34495E; width: 720px;  }
.col-11 { background-color: yellow; color: #34495E; width: 794px;  }
.col-12 { background-color: yellow; color: #34495E; width: 868px;  }
.col-13 { background-color: yellow; color: #34495E; width: 942px;  }
.col-14 { background-color: yellow; color: #34495E; width: 1016px; }
.col-15 { background-color: yellow; color: #34495E; width: 1090px; }
.col-16 { background-color: yellow; color: #34495E; width: 1164px; }

index.html

<!DOCTYPE html>
 <html lang="en">
    <head>
	  <link type="text/css" rel="stylesheet" href="css/style.css">
    </head>

<body>
<div class="container">
	<div class="grids">
	
		<div class="row">
			<div class="col-4 column">Sol</div>
			<div class="col-8 column">İçerik</div>
			<div class="col-4 column">Sağ</div>
		</div>

		<div class="clean"></div>
	</div>
</div>
</body>
</html>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Similar Content

    • By IlkerEMIR
      Arkadaşlar öncelikle elimde bir css ve jquery ile yapılmış slider var. Fakat ekranın ortasında duruyor. Websiteme dahil edemiyorum. Yardımcı olursanız çok sevinirim. İsteğim margin ve padding ayarlarını yapabileceğim yerleri belirtirseniz sevinirim.

      https://hotfile.com/dl/248983581/8effe0f/HaberSlider.rar.html
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...