Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    13
    Member #
    23895
    Ok so i am trying to make a simple webpage for one of my sites, its basically a test site and i want the layout to look like this sales page, as far as the white area in the middle.

    www.cbsaletracker.com

    All im really asking is how i can get the white area in the middle of the page with the dark blue background. what scripting will i have to use? because i cant find anything like it for simple html. the page i am creating is a sales page about a different subject so i wanted to see if i could create this type of page and add my own text, logo, images, etc.. all in which i know how to do.. just not get the "background" to look like that with the text centered.
    Thank you very much.
    nHOTy

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    In your HTML, create a div called "container" or something. Then in your CSS give it
    Code:
    width: whatever px; 
                        margin:auto;
                        background:white;
    Put everything you want on the white background inside this div

    That's a start.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Member JayWood's Avatar
    Join Date
    Oct 2010
    Location
    East Coast U.S.
    Posts
    55
    Member #
    24240
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title> Your site title</title>
    <style type="text/css">
      body{
         background: #color url(images/bgFade.jpg) top repeat-x;
      }
      #container{
         width: 960px;
         margin: 0 auto;
      }
    </style>
    </head>
    <body>
       <div id="container">
    <!-- YOUR CONTENT GOES BETWEEN THE DIVs -->
       </div>
    </body>
    </html>
    Of course this is a stripped down version, it will still give you a basis to start. The url paramater in background is where your background fade will be listed relative to the html document itself. Therefore, you should have an "images" folder within the same folder as the above html document.

    Repeat-x forces the background to repeat horizontally only, and will end if it's not large enough, leaving a white background should a user scroll down your page.

    TOP requires the background image to start at the top of the document (your page).

    #COLOR refers to a hexadecimal color, this will need to be the final pixel color at the bottom of your gradient image, the bgFade.jpg that is. So say your fade background starts at the top as blue, but fades to red, and is only say 300 pixels high. Well without the #COLOR to fall back on, you'll get a blue to red gradient all the way across the site, and have a white background below it. Therefore, if we're using a blue to red fade, then #COLOR would need to be red.

    On a side note, you don't have to use hex values such as #FF0000 is the same as red. You can just use red instead.
    (example)
    HTML Code:
    background: red url(images/bgFade.jpg) top repeat-x;
    Don't forget to Rep people if they've helped you, it's just the right thing to do.
    My Site - JJ's Webs
    My oDesk Profile - Hire me on oDesk
    My Themeforest Profile - Just for you TF people!

  5. #4
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Hi - I would still do it with an external stylesheet.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  6. #5
    Member JayWood's Avatar
    Join Date
    Oct 2010
    Location
    East Coast U.S.
    Posts
    55
    Member #
    24240
    My rule of thumb is to only use an external CSS if the declarations increase beyond three
    Don't forget to Rep people if they've helped you, it's just the right thing to do.
    My Site - JJ's Webs
    My oDesk Profile - Hire me on oDesk
    My Themeforest Profile - Just for you TF people!

  7. #6
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    Quote Originally Posted by JayWood View Post
    My rule of thumb is to only use an external CSS if the declarations increase beyond three
    Quite so. styling in the head if there is not a lot of code, renders about a half second faster then linking. it may not sound like a lot of time but after adding some javascript goodies you will appreciate the half second advantage.

    while($get_it !== true){ continue; }

  8. #7
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    use a png with a gradient from black(opacity about 20-30) to transparent. you can use the body { background: #2222aa url(images/fade.png) repeat-x; } for both bg color and the fade image. the reason for this is you can change the bg color without having to redo the fade image every time. simply change the color and you still have the fade.

    while($get_it !== true){ continue; }

  9. #8
    Junior Member
    Join Date
    Sep 2010
    Posts
    13
    Member #
    23895
    ok all thank you, i have been very busy the last week, worked all week, and sat/sun and back to work i went today.. so once i get time (most likely tomorrow) ill implement this. thank you for your help, ill get back too you


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:11 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com