• 01-04-2010, 17:56:02
    #1
    resimde görülen 3 bloğun en sağında fazladan boşluk kalıyor. boyutlar aralıklar dahil kayma olmaması gerek. 5 arttırınca altta kayıyor blok. hatayı farkedebilen var mı?



    html kodları
    Alıntı
    <html>
    <head>
    <title>Tema</title>
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    </head>
    <body>
    <div id="genel">

    <div class="ust"><div id="ust">

    </div></div>

    <div class="leftBlock">Burası Sol Bloğumuz</div>
    <div class="centerBlock">Burası Orta Bloğumuz</div>
    <div class="rightBlock">Burası Sağ Bloğumuz</div>
    </div>
    </body>
    </html>
    css dosyası
    Alıntı
    #genel
    {
    width: 990px;
    height: 600px;
    background-color: #333333;
    }

    #ust
    {
    width: 990px;
    height: 130px;
    background-color: #666666;
    }

    .ust
    {
    padding: 5px 5px 5px 5px;
    }

    .leftBlock
    {
    width:170px;
    height:200px;
    background-color: #666666;
    float:left;
    margin-left:5px;
    }

    .centerBlock
    {
    width:635px;
    height:200px;
    background-color: #666666;
    float:left;
    margin-left:5px;
    }

    .rightBlock
    {
    width:170px;
    height:200px;
    background-color: #666666;
    float:left;
    margin-left:5px;
    }
  • 01-04-2010, 18:09:59
    #2
    Bir div e padding verirsen genişliği padding kadar artar
    kodun şu hali düzgün çalışıyor
    <style>
    #genel
    {
    width: 1000px;
    height: 600px;
    background-color: #333333;
    }
    
    #ust
    {
    width: 990px;
    height: 130px;
    background-color: #666666;
    }
    
    .ust
    {
    padding: 5px 5px 5px 5px;
    }
    
    .leftBlock
    {
    width:170px;
    height:200px;
    background-color: #666666;
    float:left;
    margin-left:5px;
    }
    
    .centerBlock
    {
    width:640px;
    height:200px;
    background-color: #666666;
    float:left;
    margin-left:5px;
    }
    
    .rightBlock
    {
    width:170px;
    height:200px;
    background-color: #666666;
    float:left;
    margin-left:5px;
    }
    </style>
  • 01-04-2010, 18:14:12
    #3
    sağol düzeldi. 50 yeri denedim yahu kaç saattir.
  • 02-04-2010, 12:09:23
    #4
    Üyeliği durduruldu
    hocam yardımcı olmak gıbı olsun sıtenın butun kodlarını bir div içine koy ismini tasiyici yap 600px ornek verdim 600px yap ve margin left margin right la sag tarafglarını otomatık yap hersey ortada gozuksun
  • 02-04-2010, 14:35:05
    #5
    Üyeliği durduruldu
    Doğru yoldan şaşma

    <style type="text/css">
    * { margin:0; padding:0;}
    body { background:#333;}
    #genel { width: 1000px; margin:10px auto; }
    #ust,.leftBlock,.rightBlock,.centerBlock {  background:#666; }
    .leftBlock,.rightBlock {  width:175px;   height:200px;  float:left;}
    #ust { margin:0 0 5px; height: 130px; }
    .centerBlock { width:640px; height:200px; float:left; margin:0 5px; }
    .clearfix:after {
        content: ".";
        display: block;
        clear: both;
        visibility: hidden;
        line-height: 0;
        height: 0;
    }
    .clearfix {
        display: inline-block;
    }
    html[xmlns] .clearfix {
        display: block;
    }
    * html .clearfix {
        height: 1%;
    }
    </style>
    <div id="genel">
            <div id="ust"></div><!-- /ust -->
            <div id="icerik" class="clearfix">
                <div class="leftBlock">Burası Sol Bloğumuz</div><!-- /leftblock -->
                <div class="centerBlock">Burası Orta Bloğumuz</div><!-- /centerblock -->
                <div class="rightBlock">Burası Sağ Bloğumuz</div><!-- /rightblock -->
            </div><!-- /icerik -->
        </div><!-- /genel -->