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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Mar 2012
    Posts
    156
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Getting around these negative margins...

    How can I bring the price and that whole column up level with the picture? I tried giving .productcol negative margins but for some reason I cant get it to work. That whole column isn't in a whole div and I cant seem to figure out whats pushing it down

    http://palmcasualpvc.com/products-pa...c-patio-sets-2

  • #2
    New Coder
    Join Date
    Dec 2010
    Posts
    66
    Thanks
    16
    Thanked 0 Times in 0 Posts
    You could position it absolutely, i.e:

    Code:
     .productcol {
    position: absolute;
    right: 0px;
    top: -90px;
    }

  • #3
    New Coder
    Join Date
    Apr 2005
    Location
    Detroit, MI: Home of the body bag
    Posts
    33
    Thanks
    1
    Thanked 8 Times in 8 Posts
    Well, you do have an empty element with properties that is still designating space. For example, you have a class called "product_description" directly above the price with no content inside, yet it has a margin-bottom property of 10px.

    I'm not sure what purpose that class serves, but I'm assuming it exists because at some point you plan to have content there. So even if you go by the position:absolute route, the text that will eventually reside in that element will not be consistent because it will be misaligned with your image. Then you're trying to fix a fix versus evaluating the layout beforehand, which could lead to a lot of problems.

    If the product description has no purpose and will never be used, eliminate the element altogether or at least the margin, remove the top/bottom padding from your "wpsc_product_price" class, and add adjust the line-height of the price a bit. I say all of this not knowing what the ideal layout and spacing purposes, but that should do the trick.

  • #4
    Regular Coder
    Join Date
    Mar 2012
    Posts
    156
    Thanks
    19
    Thanked 0 Times in 0 Posts
    That seemed to do the trick. It still looks awkward though. Is there any way I could push the price and that column of stuff up aligned with the title?

  • #5
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Quote Originally Posted by taymag View Post
    That seemed to do the trick. It still looks awkward though. Is there any way I could push the price and that column of stuff up aligned with the title?
    Not without altering your html because they are in different containing elements. You could move .productcol into the header if you want

    side note: You have a javascript error. Line 410, you need to change
    Code:
    	
    
    var container_image = $('.single_product_display .imagecol');
    to
    Code:
    	
    
    var container_image = jQuery('.single_product_display .imagecol');


  •  

    Posting Permissions

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