Help table không canh giữa được

Đối với table bạn dùng css : margin: 0 auto;
Đối với text bạn dùng css : text-align: center;
 
Sửa lại class table.dataTable như ban đầu để khắc phục lỗi trên. Sau đó thêm vào EXTRA.CSS
Mã:
.ctaBbcodeTable
{
         margin: 0 auto;
}
 
đây là ban đầu chưa chỉnh sửa (nhưng nó k quay trở lại được, nó vẫn bị như thế)
CIpIepO.png

sau khi thêm chữ auto của bạn ở trên, thì nó mới bắt đầu hiện lỗi, và lỗi đó chỉ xảy ra khi table và file attachment cùng xuất hiện 1 lúc
giống như bài này http://paperzonevn.com/threads/001-bulbasaur.152.html
+ nếu xóa attachment đi thì quay trở lại k lỗi
+ nếu xóa table đi thì quay trở lại k lỗi
Tồn tại cả 2 thì bị lỗi
ps: cái đó xảy ra khi bạn ở trên hướng dẫn thêm vào chữ auto, còn lúc đầu thì file attachment và table cùng tồn tại là không bị lỗi
 
Bạn để lại như lúc ban đầu chưa chỉnh sửa gì và thêm cái mình viết ở trên thôi
 
Mã:
/** Data tables **/

table.dataTable
{
    width: 100%;
    _width: 99.5%;
    margin: 0;
}

.dataTable caption
{
    @property "heading";
    font-weight: bold;
    font-size: 11pt;
    color: @primaryLightest;
    background-color: @primaryLightish;
    padding: 5px 10px;
    margin-bottom: 3px;
    border-bottom: 1px solid @primaryMedium;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    @property "/heading";
}

.dataTable tr.dataRow td
{
    border-bottom: 1px solid @primaryLighterStill;
    padding: 5px 10px;
    word-wrap: break-word;
}

.dataTable tr.dataRow td.secondary
{
    background: @primaryLightest url("@imagePath/xenforo/gradients/category-23px-light.png") repeat-x top;
}

.dataTable tr.dataRow th
{
    background: @secondaryLighter url("@imagePath/xenforo/gradients/category-23px-light.png") repeat-x top;
    border-bottom: 1px solid @secondaryLight;
    border-top: 1px solid @secondaryLighter;
    color: @secondaryDarker;
    font-size: 11px;
    padding: 5px 10px;
}

    .dataTable tr.dataRow th a
    {
        color: inherit;
        text-decoration: underline;
    }

.dataTable .dataRow .dataOptions
{
    text-align: right;
    white-space: nowrap;
    word-wrap: normal;
    padding: 0;
}

.dataTable .dataRow .important,
.dataTable .dataRow.important
{
    font-weight: bold;
}

.dataTable .dataRow .dataOptions a.secondaryContent
{
    display: inline-block;
    border-left: 1px solid @primaryLighterStill;
    border-bottom: none;
    padding: 7px 10px 6px;
    font-size: 11px;
}

    .dataTable .dataRow .dataOptions a.secondaryContent:hover
    {
        background-color: @primaryLighterStill;
        text-decoration: none;
    }

    .dataTable .dataRow .delete
    {
        padding: 0px;
        width: 26px;
        border-left: 1px solid @primaryLighterStill;
        @property "secondaryContent.background";
        background: @primaryLightest url('@imagePath/xenforo/gradients/category-23px-light.png') repeat-x top;
        @property "/secondaryContent.background";
    }   
               
        .dataTable .dataRow .delete a
        {
            display: block;
            background: transparent url('@imagePath/xenforo/permissions/deny.png') no-repeat center center;
            cursor: pointer;
       
            padding: 5px;
            width: 16px;
            height: 16px;
           
            overflow: hidden;
            white-space: nowrap;
            text-indent: -1000px;
        }
 
Em coi lịch sử của template coi phục hồi ban đầu lại được không. Rồi xem có thiếu { hoặc } ở css không, chứ nhìn vào là hoàn toàn thua, rất khó xác định lỗi từ đâu.

Theo anh do css thiếu }
 
Back
Top