Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS how to do this

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #26939
    cybershot
    Participant

    Lets say you have a site that is 960 width and 800 height. You want to set a gradient background image. The image is only 800px in height. So if the site should become more than that by adding future content, how to you handle the repeating background with a gradient so that it looks good? I see this done on themeforest.net. the top part of the page has a white to gray color gradient. but the image isn’t that big. So it looks like there is a background color as well. So what is a good technique for this?

    #67124
    AshtonSanders
    Participant

    Well, just have it repeat in one direction (horizontally) and have the bottom of the image fade to a solid color…. so the CSS would be like:

    Code:
    background: url(image/image.jpg) repeat-x #333;
    #67125
    cybershot
    Participant

    I didn’t think you could do a background color and image at the same time. I will try what you posted, thank you

    #67127
    AshtonSanders
    Participant

    Here’s a nice simple tutorial on CSS background: http://www.w3schools.com/css/css_background.asp

    The last box talks about the "background" property.

    #67128
    TheDoc
    Member
    "cybershot" wrote:
    I didn’t think you could do a background color and image at the same time. I will try what you posted, thank you

    Yup, that is exactly what you’re supposed to do. The color will only show where the image isn’t.

    #67130
    cybershot
    Participant

    You know, I think I knew that but just forgot. I have been working on so many other things, that my coding skills are getting weak. Ya got to ake sure to keep coding.

    #67135
    AshtonSanders
    Participant

    Yea, I hear you. I hate when a client calls and asks about a site that’s been done for 6 months. So much has happened since then, I practically forget the domain name… okay not really, but you get the idea.

    #67136
    cybershot
    Participant

    I am in school right now for web design. going for an assoctiates degree. I have been doing so much homework on how the internet works, php, and databases in access, that my coding is getting sloppy and I am forgetting things I tought myself months ago from living on this site.
    it’s coming back though. I just got to keep myself busy coding sites so that I don’t forget.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.