Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default css not setting margins

    Well I am currently coding a layout, but the margins for the text dosn't seam to be working.
    in my css I have got:
    HTML Code:
    #box_right {
        background-image: url(images/boxs/box_right.gif);
        background-position: right bottom;
        text-align: left;
        font-size:11px;
        margin-bottom:9px;
        margin-right:9px;
    }
    And for the content box I have got:
    HTML Code:
    <table cellpadding="0" cellspacing="0" width="276">
        <tr>
            <td id="black_box_left"></td>
            <td id="black_box_right" width="266">box title</td>
        </tr>
        <tr>
            <td id="box_left"></td>
            <td id="box_right">Lorem ipsum dolor sit amet, consectetuer adipiscing 
            elit. Donec ac neque non massa interdum rutrum. Nulla feugiat. Fusce 
            ultrices, eros at lobortis elementum, enim neque blandit lectus, at 
            vestibulum neque turpis eget arcu. Vivamus hendrerit varius tellus. 
            Suspendisse nec eros a nisi dapibus condimentum. Praesent vestibulum. 
            Vestibulum interdum, quam sed facilisis sollicitudin, ligula velit 
            tristique turpis, vitae blandit augue lacus ac augue. Vestibulum urna 
            justo, ornare vitae, rhoncus non, lacinia sed, justo. Phasellus varius. 
            Aenean sem. Nunc purus. Sed facilisis urna aliquet lorem. Proin eleifend, 
            nunc sit amet hendrerit hendrerit, est dolor aliquam purus, in pharetra 
            est velit sit amet lectus. Nam tincidunt, lectus ut blandit consectetuer, 
            sem justo iaculis nulla, sed bibendum lacus mi non ipsum.</td>
        </tr>
    </table>
    Is there anything wrong there? Or have I most probably set a default setting for td?

  2. #2
    Join Date
    Jan 2008
    Posts
    534
    Tokens
    0

    Default

    CSS is meant to use Divs?
    Not tables?

  3. #3
    Join Date
    Mar 2007
    Posts
    1,691
    Tokens
    1,025

    Latest Awards:

    Default

    Sure you can do margins on <td>? I always thought it was cell-spacing.

  4. #4
    Join Date
    Jan 2008
    Posts
    534
    Tokens
    0

    Default

    Quote Originally Posted by Awfy View Post
    Sure you can do margins on <td>? I always thought it was cell-spacing.
    You can put a div inside a table,
    But you can't set up the CSS, with a table, as far as I know.

  5. #5
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Awfy View Post
    Sure you can do margins on <td>? I always thought it was cell-spacing.
    Yes, but I would rather do it all on the css as you can easily change it.

    Quote Originally Posted by theJOSH View Post
    You can put a div inside a table,
    But you can't set up the CSS, with a table, as far as I know.
    If you couldn't add css to tables, then the rest of the style such as backgrounds wouldn't work.
    Its just like <td style="background-image:url(file.gif);">
    Last edited by Moh; 14-02-2008 at 07:08 PM.

  6. #6
    Join Date
    Jan 2008
    Posts
    534
    Tokens
    0

    Default

    Quote Originally Posted by .:Jack120:. View Post
    Yes, but I would rather do it all on the css as you can easily change it.


    If you couldn't add css to tables, then the rest of the style such as backgrounds wouldn't work.
    Its just like <table style="background-image:url(file.gif);">
    The CSS, Classes must be aligned to divs in the main html,
    So you'd put a div inside a table.

  7. #7
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by theJOSH View Post
    The CSS, Classes must be aligned to divs in the main html,
    So you'd put a div inside a table.
    im not using classes im using ids.

    Like I said, the rest of the style is working.
    This is what it looks like.

  8. #8
    RedCrisps Guest

    Default

    padding-bottom: 9px;

  9. #9
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    #box_right {
    background-image: url(images/boxs/box_right.gif);
    background-position: right bottom;
    text-align: left;
    font-size:11px;
    padding-bottom:9px;
    padding-right:9px;
    }

    margin makes the whole thing move. padding makes the box insides move.

  10. #10
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by RedCrisps View Post
    padding-bottom: 9px;
    Quote Originally Posted by Blob View Post
    #box_right {
    background-image: url(images/boxs/box_right.gif);
    background-position: right bottom;
    text-align: left;
    font-size:11px;
    padding-bottom:9px;
    padding-right:9px;
    }

    margin makes the whole thing move. padding makes the box insides move.
    You two are stars!
    +Rep

    Blob, remind me. I need to spread.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •