Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [URGENT] How to adjust Background margin? HELP!

    I want to change my website's background and separate the background of text and main content area.I want the page of my website to remain white and to change the rest of the background but when I change the background then the whole background changes of everything.I want something like this website ourgemcodes.com.Please provide me all CSS code.

  • #2
    Regular Coder LearningCoder's Avatar
    Join Date
    Jan 2011
    Location
    The Pleiades
    Posts
    912
    Thanks
    76
    Thanked 28 Times in 28 Posts
    for example if you have a div centered in the page, and you set your background (background meaning the body element) then it will also look like your div has the same background.

    To fix, do this:

    Code:
    <html>
    <head>
    <title>your page</title>
    
    <style type="text/css">
    body {background:#fff;}
    #content {background: #ff0000;}//any color you wish
    </style>
    
    </head>
    
    <body>
       <div id="content">
            <!--put your content here-->
       </div>
    </body>
    </html>
    Regards,

    LC.


  •  

    Posting Permissions

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