test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • jakerlund Friend
    #118685

    Hi,

    The first thing in the template css is this:

    * {
    margin: 0;
    padding: 0;
    }

    All my content loose their padding setting and things i’ve set to center in pages are forced to the left (in FF not IE)
    If i remove the first * css my content look fine again but then the top left logo is off and also the transmenu is placed off in IE not in FF.

    So how can this be fixed, i need padding settings in pages to look as they should but the top left graphic and transmenu placement should ofcourse stay in place.

    Thanks

    Khanh Le Moderator
    #214202

    Hi,
    This is quite strange problem. Could you provide your live site url so we could take a look and give you some suggestion.

    jakerlund Friend
    #214212

    khanh,

    I don’t have any live url yet (runs on local server) but the problem is easy to spot.
    I run the defaul Xenia template and if i use any table anywhere the padding i set for those are ignored probably due to the first (* padding, margin 0) line in the template css.
    Also the previous and next links are forced to the left in FF but are centered in IE (should be centered)

    Below screenshots shows the “previous/next” issue for FF, and also has a 400×40 table which should have a 10 pix padding and should be placed centered but end up without any padding for both FF/IE and it is forced to the left on FF.

    Thanks

    jakerlund Friend
    #214219

    Below is screenshots of how it looks when i remove the first css tag

    removed

    * {
    margin: 0;
    padding: 0;
    }

    Now previous/next and padding is ok where it’s used in FF/IE, but top left logo is off in FF/IE and transmenu drop downs are off in IE

    Thanks

    Khanh Le Moderator
    #214242

    Hi,
    As I said that this problem is quite strange, we need your live site to see what happen. Setting up a live site is not too complicate and we cannot help you through some screenshots.

    jakerlund Friend
    #214277

    khanh,

    Thanks for taking the time to investigate this.

    My problem is that things get displayed to the left when they should be centered and that all paddings in tables are ignored, if i get this everybody must to.

    Please check my test site i’ve set up 2, one with original css and one with the first css tag removed.

    Thanks

    Hieu Nguyen Admin
    #214278

    Hi Jakerlund,

    I see the problem you’ve been trying to describe here, and would like to answer as following.

    – We’ve include the first CSS tag in this template just for dynamically control of template’s elements, for example Heading Style (H1, H2, H3..). This is why when you removed the tag, the logo becomes messed up. But this way of coding CSS also has a limit, as you mentioned about.

    For the solutions, there are 2 ways for you:

    1st> Keeping the 1st tag, and try to use stylesheet (CSS) to style all of your add-in elements.

    For example, to make a padded table and make it align center, the code should be:

    [PHP]<table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”300″ align=”center” style=”margin: 0 auto;”>
    <tbody>
    <tr>
    <td valign=”top” style=”width: 50%; background-color: #ff6600; padding: 10px;”>
    Table <br />10 pix padding<br />1 pix spacing<br />
    </td>
    <td valign=”top” style=”background-color: #ff6600; padding: 10px;”>
     Aligned centered<br />
    </td>
    </tr>
    </tbody>
    </table>[/PHP]

    And surely, the simple way to do this trick is adding a class to the table, then define that class in your CCS.
    For example, to make a padded table and make it align center, you can do like this:

    – Add a class to a table.

    <table border="0" cellspacing="0" cellpadding="0" width="300" align="center" class="padded-tb">
    ...
    </table>

    – Then define the style for the table in your CSS


    table.padded-tb {
    margin: 0 auto;
    }

    table.padded-tb td {
    padding: 10px;
    background-color: #ff6600;
    }

    ==> This is a very versatile way and you will use the real power of CSS. If you have 5 tables like the one you need, just add the predefined class to them and you’ve done! 😉

    2nd> Removing the 1st tag, and try to fix the bugs.

    – For the logo, just find this code:

    #ja-header h1 {
    font-size: 2em;
    position: absolute;
    top: 0;
    left: 0;
    }

    and change it to:

    #ja-header h1 {
    font-size: 2em;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    }

    – For the transmenu, just find this code:

    body#bd {
    background: #EFEFEF;
    }

    and change it to:

    body#bd {
    background: #EFEFEF;
    margin: 0;
    padding: 0;
    }

    I hope this post will point out something for you! Further questions, please feel free to ask us again! 😀

    jakerlund Friend
    #214280

    Hieu Nguyen,

    Wonderful indeed :-*

    Thank you for explaning so well, i learned a lot from this, now things look exactly as intended.

    Best regards

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 8 replies, has 3 voices, and was last updated by  jakerlund 17 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum