Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2007
    Posts
    46
    Plugin Contributions
    0

    Default .centerColumn add image to top

    I have a couple of problems that seem like they could be easily answered. I want to add an image to the center Column. So I added a test image to CSS:

    .centerColumn {
    background-image: url(../images/nirvanagrandopeningsale.jpg);
    background-repeat: repeat-x;
    height: 90px;
    margin:0;
    padding-top: 0;
    }

    It worked fine, except that it lines up with the h1. Not sure how to change this. See it at http://diginirvana.com/zen_cart/store

    You'll also notice if you click on a product, that it covers the product image too.

    How do I get the image to not be aligned with h1? Also, how do I move down the product?
    Thanks for any help!
    Carina

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

    Default Re: .centerColumn add image to top

    Increase the padding-top and the content will move down.

    You are telling .centerColumn to be 90px high. Did you want the bg image to be 90px high? If so, you have to make the image file that size - you can't specify it with CSS.
    Last edited by gjh42; 28 Nov 2007 at 08:44 PM.

  3. #3
    Join Date
    Sep 2007
    Posts
    46
    Plugin Contributions
    0

    Default Re: .centerColumn add image to top

    AWESOME! That worked like a charm! But what do I do about the product image? Is there an easy fix for that too?
    http://diginirvana.com/zen_cart/stor...products_id=25

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

    Default Re: .centerColumn add image to top

    As far as I can see, you still have .centerColumn unchanged in your stylesheet, although the display has changed:
    Code:
    .centerColumn {
    	background-image: url(../images/nirvanagrandopeningsale.jpg);
    	background-repeat: repeat-x;
    	height: 90px;
    	margin:0;
    	padding-top: 0;
    	}
    On your product page, it appears that everything except the product main image is moving down to comply with the padding. This doesn't make sense. Unfortunately I don't have any more time right now to figure it out. Hope someone can step in.

  5. #5
    Join Date
    Sep 2007
    Posts
    46
    Plugin Contributions
    0

    Default Re: .centerColumn add image to top

    Thanks for your help. I just changed the padding-top in h1. That fixed everything but the product.

    I also just noticed that the problem occurs on the contact us page too. Hmmm. Any suggestions.

  6. #6
    Join Date
    Sep 2007
    Posts
    46
    Plugin Contributions
    0

    Default Re: .centerColumn add image to top

    I figured it out! Thanks for all your help!

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

    Default Re: .centerColumn add image to top

    Changing the h1 padding-top is the wrong way to get a universal solution to the problem, and will possibly cause problems if h1 is used anywhere except in that page location.

    CHange .centerColumn as described and see how that works.




    Ah good! Glad you got it!



    Looks great!

 

 

Similar Threads

  1. Want to add an image to the top of my website.
    By adamtlhern in forum General Questions
    Replies: 0
    Last Post: 30 Jul 2013, 12:30 AM
  2. How to remove top banner and add links to top?
    By Punkristo in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Jun 2010, 07:21 PM
  3. Sideboxes and Centercolumn messed to the top with Mozilla but ok with IE
    By Llama de Anor in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Mar 2008, 08:35 AM
  4. How do I add images to centercolumn ?
    By Amilo in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Aug 2007, 02:22 AM
  5. centerColumn versus Plainbox - image align
    By wasana in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Jun 2006, 05:19 PM

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