Treehouse: Grow your CSS skills. Land your dream job.

CSS Margins

  • # May 3, 2012 at 10:37 pm

    I have full screen background on this site.
    I set the left margin on the content to 400px.
    That only works well the the layout if the screen/browser is very large.

    I want the content to always be just to the right of her image.
    Any ideas on how I can do this?

    # May 3, 2012 at 10:51 pm

    you can try this on the wrap:

    #container, .wrap {
    margin-right: 20px;
    width: 70%;
    padding: 0 10px;
    float: right;
    /*remove width from content*/
    #content {width: auto;}

    also, remove

    # May 4, 2012 at 3:25 am

    Sounds like you’ll need to use a percentage.

    # May 4, 2012 at 3:35 am

    Just change you css as

    #container, .wrap {
    margin-right: 50px;
    width: 800px;
    padding: 0 10px;
    float: right;
    # May 4, 2012 at 8:33 am

    thanks for all your responses.

    elneco, I tried yours first and it worked !! SOLVED!

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

You must be logged in to reply to this topic.