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 4 of 4
  1. #1
    Junior Member Darkleo's Avatar
    Join Date
    Feb 2008
    Location
    Somewhere, Far Away, Australia
    Posts
    3
    Member #
    16465
    I wish to use a gradient as a background image, but I only want to have the image on the top of the screen. The gradient starts at #659bd0 and goes to #FFE433. This is the image:
    Attachment 2865
    I would like to place one row of this across the top of the screen, then use the bottom colour (#FFE433) on the rest of the page. How do I do this using CSS?
    Attached Images Attached Images

  2.  

  3. #2
    Senior Member imagn's Avatar
    Join Date
    Jul 2007
    Location
    Los Angeles
    Posts
    156
    Member #
    15594
    If you want the background to repeat across the width of the page with the lower-most fade out color extending to the bottom use:

    body {
    background: #FFE433 url('../images/background.jpg') repeat-x top left;
    }

    The above code assumes the .css file is NOT in the root directory and the image "background.jpg" is in a directory called IMAGES.

    It also assigns the image to the TOP LEFT of the container (BODY element in this case) and tells is to repeat horizontally (REPEAT-X). It also gives the remaining visible space (where the background image doesn't repeat) your specified color (FFE433).

  4. #3
    Junior Member Darkleo's Avatar
    Join Date
    Feb 2008
    Location
    Somewhere, Far Away, Australia
    Posts
    3
    Member #
    16465
    thanks.

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Please delete your threads when you accidentally duplicate them.


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 11:09 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com