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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    34
    Thanks
    4
    Thanked 0 Times in 0 Posts

    How do I do this in CSS?

    Hi,

    Take a look at the left column of my website:



    As you can see, the first third of the background is a background image, and then after this, it's just one colour (just grey). How can I do this with CSS, so I can have the top part of the background as an image, then when this image finishes, it goes to a plain colour? Bear in mind I want text which would flow from one background into another (as shown in the image above), and this is where I am struggling to know how I could do this?

    Thanks, James

  • #2
    Regular Coder
    Join Date
    Jan 2009
    Posts
    193
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Use css to set the background color to the gray you need and add the background image as well. When the box elements expands to larger then the image then it will use the background color you set.

    Something like
    Code:
    background: #00ff00 url('background_image.gif') no-repeat fixed top left;

  • #3
    Banned
    Join Date
    Aug 2010
    Location
    newyork
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try
    edit .
    Code:
    background-image: url('background_image.gif');
      background-repeat: repeat-y;
    css
    Last edited by mushget; 08-12-2010 at 04:15 PM. Reason: edit

  • #4
    New Coder
    Join Date
    Aug 2010
    Posts
    34
    Thanks
    4
    Thanked 0 Times in 0 Posts
    thank you both - I will try and and see what results I get


  •  

    Posting Permissions

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