Posted on 2009-02-09
Last Modified: 2013-07-29
I want to center this .jpg file that is 1224 width

This .jpg is attached and has a gradient that horizontally changes from light brown to darker brown

Now how can I create a background that will fit this color.

The only rule is that I can not change the .jpg file.

Please see attached file.
Question by:eejk
    LVL 7

    Expert Comment

    by:Brad Dobyns, CSM
    I don't see an image. Are you sure its attached?
    LVL 11

    Expert Comment

    do you mean how will you create a background on an image that sits on your gradient that will fit?

    if so itll need to be a transparent gif. best to set the transparency mid way between your two browns
    LVL 13

    Expert Comment

    Not sure exactly what you mean. You can check the article. It is about how to use large background images


    Author Comment

    sorry,  4got to attach image

    LVL 7

    Accepted Solution

    In looking at this again, I am confused about what you said in the description. So, with that I have provided two examples of what I THINK you need. You can tell me if I am way off base or not.

    CSS Gradient background:

    Centering image: {   display: block;   margin-left: auto;   margin-right: auto; }

    And here is the HTML that would be centered:

        <img src=brown-background-long.jpg" alt="" class="center" />

    Hope that helps,
    LVL 58

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now