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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:26:16+00:00 2026-06-15T11:26:16+00:00

Assuming the following code: <div class=content> <div style=background:url(swoosh.jpg) no-repeat; background-size:100% 100%; class=top> <div style=height:42px;

  • 0

Assuming the following code:

<div class="content">
<div style="background:url(swoosh.jpg) no-repeat; background-size:100% 100%;" class="top">
<div style="height:42px; align:center;" id="logo">

My goal is to make the div with the background swoosh.jpg be a simple div with class=top

I have tried getting the conditional to work myself, however for some reason (syntax?) it is not working properly.

The following is what I have tried

<div class="content">
<!--[if !IE]>
<div class="top">
<![endif]-->
<!--[if IE]>
<div style="background:url(swoosh.jpg) no-repeat; background-size:100% 100%;" class="top">
<![endif]-->

I should mention that I cannot use anything other than inline CSS for this application – and have no access to the header.

  • 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-15T11:26:16+00:00Added an answer on June 15, 2026 at 11:26 am

    I think this is how to do what you want but as previously stated, it’s not the best way of doing things if you have other options (tested in IE9 – IE10 doesn’t work with conditional statements):

    <![if !IE]>
    <div class="top">
    <![endif]>
    <!--[if IE]>
    <div style="background:url(swoosh.jpg) no-repeat; background-size:100% 100%;" class="top">
    <![endif]-->
    

    http://jsfiddle.net/APFZh/2/

    IE 10 targeting requires a little JS:

    <![if !IE]><!--<script>  
    if (/*@cc_on!@*/false) {  
        document.documentElement.className+=' ie10';  
    }  
    </script><!--<![endif]-->  
    

    This appends a class of “ie10” to the html element but you could write whatever you want to the document

    http://www.impressivewebs.com/ie10-css-hacks/

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

Sidebar

Related Questions

Assuming the following selector $(div span:first-child) applied in following html code John, Karl, Brandon
Assuming following code. There is class MyStream witch has template overloaded operator <<. There
i have populated gridview from SaleDAL class, assuming following is the code, Please ignore
Background I am assuming the following code is completely thread safe: // Called from
Assuming A.sql contains the following code, then second Select query won’t be executed due
Assuming you have the following XML: <?xml version=1.0 encoding=utf-8?> <content> <info> <media> <image> <info>
I have the following code: $(a.sticky-link).click(function (e) { e.preventDefault(); $(div.stickies-box).slideToggle('slow'); $(a.sticky-link).toggleClass(selected); }); $(div.stickies-box).mouseup(function ()
Hey there, assuming I have the following code in a mex routine: mxArray *newPoint
I have some thread-related questions, assuming the following code. Please ignore the possible inefficiency
Assuming the following view model definition: public class MyObject { public string Name {

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.