Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Help with adding a image to background bars CSS.

    Hey Peops

    I wanted to ask for some help floating an image at the end of the sidebox bars of my store.

    First my CSS responsible for the bar is here ..

    Code:
    background: #35568C;
    color: white;
    font-size: 15px;
    font-weight: bold;
    padding: 21px 20px 20px;
    text-transform: uppercase;
    That looks like this ..



    And I would like to float an image over the bar so it looks like this ...



    Can someone help me out or point me in the right direction ?

    Thank you in advance !!

  2. #2
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Re: Help with adding a image to background bars CSS.

    Sorry forgot to link my site ..

    http://www.colmangroup.co.uk

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Help with adding a image to background bars CSS.

    You can't have a background image that extends beyond the edges of an element, as you show. What you need to do is make the owl image for the sideboxes to include the blue field, and use that as the background-image for the headings instead of the background-color. Essentially info_bar_owl.jpg without the text.

    If you want the owl's wing to visually extend beyond the rest of the sidebox content and have the blue edge align with the rest, give your headings a negative margin-right, like this:

    margin-right: -13px;
    Last edited by gjh42; 8 Feb 2011 at 06:33 PM.

  4. #4
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Re: Help with adding a image to background bars CSS.

    Thank gjh42 much appriciated. I also want to do this with other bars that extend over the entire page. If i use a image for those bars it may throw the page out of proportion on different screen sizes. Can I make a smaller image if the owl with the background colour and position it at the end ? If so how would I achieve this using CSS ? Sorry about all the questions I'm pretty clueless on all this stuff lol

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Help with adding a image to background bars CSS.

    You could do that easily if the owl didn't also project above the top of the blue bar. Solid color takes almost no extra file size to extend a long distance, so you can make the bar long enough to fit the widest you want your page to get. Any extra width of the bg image will just be cut off, so no problems there.
    I recommend using max-width: 1234px; (whatever size you want) in #mainWrapper, because most pages are not going to look good with the content stretched over a big widescreen monitor. Either that, or they will be crowded beyond recognition or requre major horizontal scrolling in a small screen.

    By the way, you will want to use for any bg image that doesn't exactly fit the container

    background-position: right top;
    Last edited by gjh42; 8 Feb 2011 at 07:46 PM.

  6. #6
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Re: Help with adding a image to background bars CSS.

    Many thanks gjh42 worked a treat ;)

 

 

Similar Threads

  1. Adding a background image/texture to stylesheet.css
    By irori in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 28 Jul 2012, 10:52 AM
  2. help with background image
    By smallpigpig in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 4 Jan 2011, 02:46 AM
  3. Need help with background image
    By mplssign in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 4 Dec 2008, 07:15 PM
  4. any help with my background image?
    By 1kell in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 25 Nov 2008, 09:12 AM
  5. Background image not showing up with CSS
    By CobraPlant in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Nov 2007, 03:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR