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

  • Home
  • SEARCH
  • 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 7843031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:27:16+00:00 2026-06-02T16:27:16+00:00

I have a div that isn’t lining up correctly in Chrome, IE and FF.

  • 0

I have a div that isn’t lining up correctly in Chrome, IE and FF. Chrome needs a padding-left:40px; while IE and FF do not. I’ve been playing with if for a few hours and I know I’m missing something simple.
This is what I’ve been trying:

<!--[if !IE]>-->
<link href="non-ie.css" rel="stylesheet" type="text/css">
<!--<![endif]-->

I’ve also tried in the normal style.css:

<!--[if !IE]--> 
#lower .expo {padding-left:40px;}
<!-- <![endif]-->

or

#lower .expo {width:400px; padding-top:40px; float:left;}

I also tried this:

#lower .expo {width:400px; padding-left:40px; padding-top:40px; float:left;}
<!--[if gt IE 6]> 
#lower .expo {width:400px; padding-top:40px; float:left;}
<!-- <![endif]-->

Interestingly if I do this:

<!--[if gt IE 6]> 
#lower .expo {width:400px; padding-top:40px; float:left;}
<![endif]-->
#lower .expo {width:400px; padding-left:40px; padding-top:40px; float:left;}

IE displays correct but not FF or Chrome. Its driving me crazy. I must be missing something simple but I’ve been looking at it too long.

  • 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-02T16:27:17+00:00Added an answer on June 2, 2026 at 4:27 pm

    Just for the sake of your actual error, it lies in how you are doing the comments. It should be:

    <!--[if !IE]><!-->
    <link href="non-ie.css" rel="stylesheet" type="text/css">
    <!--<![endif]-->
    

    For a better way than that, here’s what I use:

    <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
    <!--[if lt IE 7]> <html class="ie6"    lang="en"><![endif]-->
    <!--[if IE 7]>    <html class="ie7"    lang="en"><![endif]-->
    <!--[if IE 8]>    <html class="ie8"    lang="en"><![endif]-->
    <!--[if IE 9]>    <html class="ie9"    lang="en"><![endif]-->
    <!--[if IE 10]>   <html class="ie10"   lang="en"><![endif]-->
    <!--[if !IE]><!--><html class="non-ie" lang="en"><!--<![endif]-->
    

    The benefit of doing it this way is that you get to keep the best practice of only using 1 stylesheet. You simply preface your target with the corresponding IE class you want to hack.

    For example: .ie6 #target-id


    For a more in depth explanation, check out Paul Irish’s article:

    Conditional stylesheets vs CSS hacks? Answer: Neither!

    UPDATE:

    2012.01.17: Here is the current iteration that we have in the HTML5 Boilerplate. We actually tried to reduce it down to just a single
    .oldIE class for IE ≤8 (to use with safe css hacks), but that didn’t
    fly. Anyway, our current version..

    <!--[if lt IE 7]><html class="lt-ie9 lt-ie8 lt-ie7"><![endif]-->
    <!--[if IE 7]><html class="lt-ie9 lt-ie8"><![endif]-->
    <!--[if IE 8]><html class="lt-ie9"><![endif]-->
    <!--[if gt IE 8]><!--><html class=""><!--<![endif]-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div that I want to toggle between displaying or not when
I have a piece of jquery code that isn't firing correctly in IE (8
I have a div that changes based on if the form was submitted correctly
I have a DIV that I want to touch the bottom of the screen
I have a div that's set to overflow: auto; . This contents of this
I have a div that I have bound the jQuery hover event to activate
i have a div that i use as a container to fit in footer
I have a Div that is 400px in height with the ID content, I
I have a div that contains a ul and in each li there is
I have a div that contains 3 fields You can see the image here

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.