IE is notorious for not playing well with CSS

I am facing an issue with my Google search box code. It works perfectly on Firefox, Chrome, and other browsers except for Internet Explorer. Can anyone help me troubleshoot this?

Below is the code snippet:

Abulkas Tablet


#outerContainer{
    width: 350px;
    height: 60px;
    border-radius: 10px;
    box-shadow: 0 0 5px 1px #888;
    display: block;
}
.buttonwithimg {
    background: url(google-g-logo-2012.png) no-repeat;
    cursor: pointer;
    border: none;
}

.googleButton{
    position: relative;
    left: 5px;
    width: 40px;
    height: 50px;
}

#srchBox{
    border-radius: 3px;
    margin-left: 8px;
    height: 50px;
    width: 200px;
    margin-top: 5px;
}

.otherButton{
    width: 43px;
    height: 50px;
    .background { 
        width:150px; 
        height:150px; 
        padding:3px; 
        background-image:url(andro-view-tools/Transform-galaxy-s2-to-galaxy-s3.jpg); 
        border: 1px solid black; /* Safari and Chrome */
        -webkit-background-size: 190% 160%; /* Firefox */
        -moz-background-size: 190% 160%; /* Internet Explorer */
        -ms-background-size: 190% 160%; /* Opera */
        -o-background-size: 190% 160%; /* CSS3 */ 
        background-size: 190% 160%; 
    }
}

</style>
   <div class="background">
       &nbsp;<div id="outerContainer" style="width: 342px; height: 63px">
            &nbsp;&nbsp;<button class="buttonwithimg" style="width: 59px; height: 57px">;
                </button><input id="srchBox" type="search">    
                   <button>class="otherButton" style="width: 59px; height: 52px">Search</button>
      </div>
         </div>   
           </body> </html>

Answer №1

Discover the "hack" for box-shadow in Internet Explorer by visiting this link

Answer №2

Internet Explorer does not have built-in support for the box-shadow property.

To address this issue, I suggest utilizing a tool like CSS3Pie.

Furthermore, it seems that IE9 does not require a prefix for the background-size property, making the use of -ms-background-size unnecessary. Keep in mind that IE8 does not support background-size at all, even with a prefix. To enable support for IE8, you can try using a jQuery hack available at: https://github.com/louisremi/jquery.backgroundSize.js

For an easy way to check which features are supported by various browsers, I recommend visiting CanIUse.com.

I hope this information proves useful to you.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is it possible to assign numerical values to attributes in HTML code?

I'm unsure about something - is it possible to set an attribute value as a number? For example: <div data-check="1"></div> Is this the correct way to do it or not? I've heard conflicting opinions, with some people saying you shouldn ...

Utilize visuals to select premade designs

I am looking to enhance the user experience in selecting templates on Wordpress by integrating images for a visual preview. Instead of a traditional text-based dropdown menu, users would be able to see what the template looks like before choosing it. EDIT ...

Customizing the appearance of an HTML element using user-input text styling

On my webpage, there are two text areas and a division. One of the text areas is meant for users to input HTML code, while the other is for CSS code. Whenever a button is clicked, a JavaScript function will be triggered to display the combined HTML and CSS ...

Uncover the hidden message within the unique special character "ì"

My JSON file contains a specific character, such as ì; Here is the service I am using: $http({ url: jsonUrl, method: "GET" }).success(function (data) { // data is an array that contains a list of elements (f ...

Tips for Changing the CSS of an External Component with Material-UI-React

Is there a way to override the default CSS of an external component that is not developed in Material-UI or my project? In styled-components, I can simply take the root classes and replace them with my own custom CSS. How can I achieve a similar result wit ...

Using Javascript's OnChange event to dynamically update data

Attempting to achieve a seemingly straightforward task, but encountering obstacles. The goal is to trigger a JavaScript onChange command and instantly update a radar chart when a numerical value in a form is altered. While the initial values are successful ...

JavaScript's click() function cannot be used on text areas

Currently, I am in the process of creating a script for automating comments. During step one, I encountered an issue where the code is expected to simulate a click on this text area within a red box, but unfortunately nothing happened. Initially, I attem ...

"Interactive bootstrap tabs nested within a dropdown menu that automatically close upon being clicked

Hey, I've got a dropdown with tabs inside. When I click on certain tabs within it, they close but the content inside the tabs that I click on changes, so it's functioning properly. However, the issue is that it closes when I want it to stay open ...

What is the best way to test the output of HTML code in a unit test scenario

I am new to web development and testing, taking it slow. I have a website with a button that reveals information when clicked. How can I create a test case to ensure that the displayed output is correct? I need to verify that the text appears on the scre ...

What is causing the left-to-right scrollbar in this Bootstrap template?

Currently delving into the realm of Bootstrap 4, I decided to experiment with creating a personal study template using this technology. However, after implementing the code, I noticed an unexpected left-to-right scrollbar appearing when viewing the website ...

Looking to adjust the width of a Bootstrap dropdown menu?

I am trying to adjust the width of my dropdown menu Here is a link to jsfiddle with my code: [jsfiddler][1]. On the right side of the main menu, I have a languages dropdown menu. When it expands, its width is very large and I want it to match the main m ...

Encountering an issue when passing a response using coverage.js

I am utilizing coverage.js to showcase data. When I pass my variable containing the coverage response into an HTML file, similar to how it's done in Angular to display expressions, I encounter a syntax error: <div class="container" style="margin- ...

The command 'source-highlight' is not a recognized internal or external command

Recently, I delved into the world of asciidoc and decided to create an example in Python. However, every time I attempt to display a code blog in HTML, I encounter an exception that says 'source-highlight' is not recognized as an internal or exte ...

Use Flexbox hover effect to display submenu text exclusively in the column being hovered

Having an issue with a 5 column flexbox. Each box should display a header text and supplementary text only when hovered over, returning to normal when unhovered. I was able to accomplish this in Codepen (view the rough model here). However, when trying to ...

Inadequate text alignment

Trying to create a header mockup for a website featuring branding elements like a logo and brand name. Utilizing Angular.js for the webpage development process, incorporating a URL for the logo image from an online source. Encountering alignment issues th ...

Retrieve the value from the model and if it is not defined, resort to the default value

Here's the HTML code snippet I've created: <div>IsValid : {{component._isValid || true}}</div> In this code, if component._isValid is undefined, it will display true. However, if it has a defined value, that value will be displayed. ...

What is the best way to use jQuery to adjust the size of a slider image based on a percentage of the browser window

I've been searching all over for a solution to this issue, but so far I haven't had any luck. Basically, I have an image that is 1800 pixels wide by 500 pixels high. I need this image to adapt to all screen resolutions. Instead of having a fixed ...

Tips for creating a clickable textbox

Does anyone know how to make a textbox clickable even when it is set as readonly. I'm looking for a way to make my textboxes clickable like buttons because I have some future plans for them. <input type="text" readonly value="Click me" id="clickm ...

Tips for aligning content vertically within a header:

I'm currently working on creating a responsive header with two columns. My goal is to have the button in the right column vertically centered. I am aware of the method for centering items using 'top: 50%; margin-top: -xy px', but my button ...

Applying CSS rules from an array to elements by looping through

I'm looking for a way to allow users to input CSS styles and have those styles applied to the last selected element, which is determined by the "rangeselector" variable. Currently, the code selects the correct element, but only the first CSS rule is b ...