/    Sign up×
Community /Pin to ProfileBookmark

How to place something in a page wrap

Hi,
So i am coding a website and i have this to make a page wrap:

[CODE]
#page-wrap {
text-align: left;
width: 60%;
margin: 0 auto;
}
[/CODE]

And i was wondering if its possible to place something out of this page wrap to the right and i was wondering how i could color the outside of this page wrap a different color to make sides to my webpage.
I have tried googling but i can not find anything.
Thanks for helping.

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulAug 28.2016 — Hi and welcome to the site. I'm somewhat confused... What is a "page wrap"? Anyway, to answer your specific queries:

  • - How to color outside the "page wrap", set the background of BODY. E.g.
    <i>
    </i>body {
    width: 100%;
    background: blue;
    }


  • - There are a number of ways to place something to the right of the "page wrap", depending on how you want it to respond to different window widths. e.g.


  • [code=html]
    <html>
    <head>
    <style>
    html {
    background: grey;
    }
    body {
    width:100%;
    max-width: 960px;
    height:100%;
    margin: 0 auto;
    background: blue;
    }
    #page-wrap {
    text-align: left;
    height: 100%;
    width: 60%;
    margin: 0 0 0 20%;
    float: left;
    background: white;
    }
    #right-box {
    text-align: left;
    height: 100%;
    width: 20%;
    margin: 0;
    float: right;
    background: cyan;
    }
    </style>
    </head>
    <body>
    <div id="page-wrap">
    <p>Page wrap content goes here</p>
    </div>
    <div id="right-box">
    <p>Right box content goes here</p>
    </div>
    </body>
    </html>
    [/code]
    ×

    Success!

    Help @ELECTR0ZED spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.3,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...