Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7798495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:01:30+00:00 2026-06-02T00:01:30+00:00

I am working on a WordPress theme using the WordPress Boilerplate as a base

  • 0

I am working on a WordPress theme using the WordPress Boilerplate as a base (HTML5 Boilerplate + another WordPress base theme). Can be seen here:

JaredSartin.com (Theme is in progress, don’t mind some of the other mess :P)

It looks just fine in Chrome, but the top image gets messed up in all other browsers. I am layering 2 images to overlap so I can have a responsive design, removing the back image and leaving just the title when the browser gets to a certain width.

The images are absolutely positioned with a percentage margin-top and margin-left on the top one to properly position it. they are both set to scale with the page via

height:auto;
width:100%;

OR

width:85%;

in the top image’s case. Now, I was working in Chrome to produce the current look, the left-margin is fine in all browsers I have tested (FF and IE7/IE8 on Windows) but the top is off. In FF’s inspector, I see that the adjusted top-margin needs to be 7.5% (makes more sense than the one I set in chrome – 24.5%).

Any ideas to a cross browser fix? I don’t want to have to use specific browser detection (like Chrome vs Other). I already have some reset styles in place.

EDIT

I have a fix/hack, but if you have a better one (not so hacky, but just plain Cross Browser CSS), let me know…

header img#titleimgfront{
    width: 85%;
    margin-top: 7.5%; /* For non-webkit browsers */
    margin-left: 8.5%;
}

/* unfortunate hack since Webkit has an issue with Margin-top */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  header img#titleimgfront{
    margin-top: 24.6%;
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:01:32+00:00Added an answer on June 2, 2026 at 12:01 am

    There’s nothing wrong with what you’re doing — this is a bug in Webkit, that it calculates a percentage margin-top from the height of an absolutely-positioned element, where other browsers (and the spec) calculate it from the width. (see: https://lists.webkit.org/pipermail/webkit-unassigned/2011-February/293573.html)

    It does seem counter-intuitive to base margin-top and margin-bottom values on the element’s width, but that’s the way it is.

    But you’ve found an effective workaround, so you’re sorted. Don’t feel that your layout is causing this problem, because it isn’t, it’s just Webkit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on my own custom WordPress theme, using a blank, default template to
I am working on a Wordpress theme, my footer background color just disappeared and
I'm working with a Wordpress Theme. It's a product showcase and my client needs
A wordpress theme I'm working on has headlines which span across the entire content
I'm working with wordpress.com along with the custom design upgrade to be able to
I'm working on a wordpress site, with a blog post that ends like: http://www.blog.com/?p=2
I'm working on a wordpress theme that uses dropdowns for part of the site
I'm having an issue with a WordPress theme project I'm working on (the theme
I'm working on a new project, it is a wordpress theme with advanced functionality.
I am using a wordpress theme with two sidebars. I want to disable one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.