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 629239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:43:27+00:00 2026-05-13T19:43:27+00:00

I have a a conditional comment in my page to fix a double padding-top

  • 0

I have a a conditional comment in my page to fix a double padding-top problem with IE7.

I am trying to add “padding-top:5px;” to a DIV only in IE7. The rest of the browsers (including IE6 and IE8) use “padding-top:10px;” contained in stylesheet.css.

stylesheet.css contains

.clImageSamplerText {padding-top:10px;}

stylesheet_ie7.css contains

.clImageSamplerText {padding-top:5px;}

If I use

<link href="stylesheet.css" rel="stylesheet" type="text/css">
<!--[if IE 7]>
    <style>.clImageSamplerText {padding-top:5px;}</style>
<![endif]-->

my code works no problem.

If I use

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

it does not work.

Anyone have any ideas?

  • 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-05-13T19:43:28+00:00Added an answer on May 13, 2026 at 7:43 pm

    Just a shot in the dark — if you are using an XHTML doctype, you might find that closing your <link /> tags will fix the problem.

    So try:

    <link rel="stylesheet" type="text/css" href="stylesheet.css" />
    <!--[if IE 7]>
        <link rel="stylesheet" type="text/css" href="stylesheet_ie7.css" />
    <![endif]-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the header of my page I have a conditional statement to check if
I have a requirement to add conditional disabled & class attributes to a dropdown
Is there such a thing as conditional comments for Chrome? I have a page
I have a segment of HTML code which includes a conditional comment: <!--[if IE]>
Possible Duplicate: How to write conditional comment for non IE browsers? i have a
So I put the ie7 conditional comment in my head tag directly underneath the
I have this html file with a conditional comment. <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta http-equiv=Content-Type
I tried to add a conditional statement for IE7 with jQuery, but it doesn't
I have this conditional in a perl script: if ($lnFea =~ m/^(\d+) qid\:([^\s]+).*?\#docid =
I have some conditional formatting styles. I don't want to keep creating new rules

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.