[newbie need help] minta tolong bantuan script centering css

Discussion in 'Desain Web dan Programming' started by bentosai, 3 Oct 2011.

Thread Status:
Not open for further replies.
  1. bentosai

    bentosai New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    gini Tuan...saya lagi nyoba2 biki layout nih berikut scriptnya :

    <body>
    <div id="header" style="width:100%;height:auto;padding:0.5em;background-color:#A4DBFF;float:left
    position:relative;">
    <div id="" style="width:960px;height:auto;background-color:#666666;align:center;float:left;">
    <div id="" style="width:20px;height:20px;float:left;background-color:#CCCCCC;"></div>
    <div id="" style="width:20px;height:20px;float:left;background-color:#999999;"></div>
    </div>
    </div>
    <div id="line_dash" style="border-top:dashed 2px #FFFFFF;padding:0.5em;width:100%;float:left;background-
    color:#A4DBFF;"></div>
    </body>



    nah...saya pusing Tuan...kenapa saya utak atik daritadi, yang bagian div container ini:
    <div id="" style="width:960px;height:auto;background-color:#666666;align:center;float:left;"></div>
    ga mau ke tengah Tuan..

    kalo udah di utak atik bisa ke tengah, tapi yang lainnya jadi berantakan...mohon bantuannya...


    thx
     
  2. vkios01

    vkios01 Expert 1.0

    Messages:
    749
    Likes Received:
    18
    Trophy Points:
    18
    itu ada floatnya om, float:left; jadi rata kiri itu
    coba tambahin, margin: 0 auto;
    tapi hapus dulu floatnya.
     
  3. Fadli

    Fadli Poster 2.0

    Messages:
    155
    Likes Received:
    1
    Trophy Points:
    18
    jawaban yang tepat sasaran! :D
     
  4. Es Cendol

    Es Cendol Apprentice 1.0

    Messages:
    308
    Likes Received:
    0
    Trophy Points:
    16
    jadinya kek begini :D
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...