Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Chrome & Safari css layout problem

    Shop is located at saffireblue.ca/shop

    On the product info pages, the product name is misaligned and overlaps the product image. This only happens in Chrome and Safari from what I can tell.

    Example: saffireblue.ca/shop/books-e-downloads/bath-bombs-by-elaine-stavert

    Any help would be greatly appreciated!

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Chrome & Safari css layout problem

    As a general rule, whenever something displays well in some browsers and not in others, there'sa fault in the code -- either the php or the CSS. When I checked the syntax of your example page I found 54 errors and 3 warnings. Many of the errors are not critical but some may be. In particular there are DIVs trapped inside an HR, because the HR wasn't properly closed. On a complex page, those sorts of things can add up to a level of confusion for some browsers.

    I also checked that product title (using Firebug in Firefox -- you must use this or something similar when developing a site!). I can see the DIV for the product name starts over at the left edge of the image, but on a 'good' browser something is pushing the product name over and leaving empty space in the DIV where the image is. Ordinarily this would be defined in your stylesheet, but Firebug didn't show any such definition, so I suspect this is just the image itself pushing the name over, and on some browsers it's not being pushed. So specify a left padding for the name, by adding this to the bottom of your main stylesheet...


    #productName {
    padding-left: 155px;
    }

    Adjust as needed.

    Rob

  3. #3
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Chrome & Safari css layout problem

    Hmm. That just bumps it out in all browsers. Any other ideas?

    Thanks for taking the time to look at this for me, I really appreciate it!

  4. #4
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Chrome & Safari css layout problem

    Ok in your style sheet

    find this

    #productName {
    color: #444444;
    font-size: 2em;
    font-weight: 400;
    margin-top: -5px;
    }


    replace it with this

    #productName {
    color: #444444;
    font-size: 2em;
    font-weight: 400;
    }

    does that make a difference?
    Webzings Design
    Semi retired from Web Design

  5. #5
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Chrome & Safari css layout problem

    If that doesn't work

    you could try this, its a css hack targeting webkit browsers only (Chrome Safari, Konqueror), it should work

    @media screen and (-webkit-min-device-pixel-ratio:0) {
    #productName {
    margin-top: 0px;
    }
    }


    add it to the very bottom of your stylesheet
    Webzings Design
    Semi retired from Web Design

  6. #6
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Chrome & Safari css layout problem

    Yep. That did it! Thank you so much! :)

 

 

Similar Threads

  1. v139h My Site in Safari & Chrome
    By traytray in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Jan 2013, 02:38 PM
  2. v138a Pages not fully loading in FF & IE, but they are in Chrome and Safari
    By awilder in forum General Questions
    Replies: 2
    Last Post: 15 Mar 2012, 05:33 PM
  3. HELP! Weird CSS Issue with Safari and Chrome Browsers
    By limelites in forum General Questions
    Replies: 19
    Last Post: 4 Oct 2009, 07:25 PM
  4. CSS Positioning Problem in Safari and Chrome Only
    By limelites in forum General Questions
    Replies: 13
    Last Post: 25 May 2009, 03:40 PM
  5. Layout different in IE than FF, Safari, & Netscape
    By maperr55 in forum General Questions
    Replies: 2
    Last Post: 22 Sep 2008, 03:28 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