Having trouble getting text alignment to work properly in Internet Explorer?

I'm attempting to align my "li" elements in a row so that I can display three images side by side with text below them, similar to a product catalog view. While everything looks good in Chrome, Internet Explorer is only aligning everything to the left.

CSS:

#products ul {
    margin: 0;
    padding: 0;
    margin-top: 50px;
}
#products li {
    list-style-type: none;
    float: left;
    display: inline; 
    height: auto;
    padding: 10px;
}
#products img {
    max-width: 250px;
    padding: 20px;
    float: left;
}
#products ul li p {
    text-align: center;
    font-weight: 200;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

HTML:

<HeaderTemplate>
        <div id="products">

            <h2>ALL PRODUCTS</h2>
            <ul>
        </HeaderTemplate>
        <ItemTemplate>
            <li><a href="<%# Eval("ProductID", "Productdetails.aspx?ProductID={0}") %>"><img src="<%# Eval("ProductImage") %>" /></a>
                 <p><%# Eval("ProductName") %></p>
                 <p>$<%# Eval("ProductPrice") %></p></li>

        </ItemTemplate>
        <FooterTemplate>
            </ul>
            </div>
        </FooterTemplate>

Answer №1

Give this a shot:

#items li a {
    display: block;
}

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

Steps to record and upload a video directly to the server using getusermedia

For my application, I need the user to record a video and have it saved on the server disk instead of downloading it to the client browser. I am currently using getusermedia for this purpose, with the following code: (function(exports) { exports.URL = exp ...

What is the optimal method for invoking a Javascript function via a hyperlink?

I'm looking to include links on my website that will activate a javascript function when clicked, and I do not want these links to be underlined. Additionally, I want the cursor to change to a standard pointer. What is the most effective way to achiev ...

Display a modal upon submission of the form

My goal is to display a "thank you" modal upon submitting my form. I am working with 3 files: magic.js (which handles the jQuery functions), index.html, and process.php. Below, I have included the code for each of the 3 files, but I am struggling to make ...

The placement of toolbar buttons in HTML

My current dilemma involves the placement of a logo on the navigation bar of my website. When the logo is present, the text is not centered vertically, but when I remove the logo it centers correctly. * { margin: 0px; padding: 0px; } .logohead { d ...

What is the best way to highlight and extract only the white-coded texts on VSCode to facilitate the process of translating webpages manually?

Currently, I'm engaged in a project where my task involves duplicating an entire website using HTTrack. However, I only need to copy the main page and web pages that are one link deep. Upon copying the website, my next challenge is to translate all of ...

Move the aircraft across the display in a lively animation

I need help creating an animation where a plane flies across the screen, exits from the left side, and re-enters from the right side in a continuous loop. How can I achieve this effect to make the plane fly endlessly across the screen? Here is my code: ...

Why is it that in IE9, submitting a basic form using jQuery doesn't seem to work?

Take a look at the code snippet below: <html> <head> <style type="text/css"> #myform {display:none;} </style> </head> <body> <button type="button" id="uploadbutton">Upload Images</button> <form name="myf ...

What are effective strategies for avoiding HPACK decompression errors?

During my development of an HTTP/2.0 server library for a school project, I encountered an issue with sending headers frames and receiving compression errors from Chrome (and Firefox, without any response from Edge). The twitter/hpack library is being used ...

Vue.js application returning 404 error when trying to include a script in index.html

After generating my application with a simple command: vue init webpack I decided to install jquery from the node_modules folder: npm install --save jquery and then added it to my index.html page like this: <head> <script src="node_module ...

Using a Python class instance as a parameter in a Bottle template

Here is how my class is structured: class Person: def __init__(name=None, id_=None): self.name = name self.id_ = id_ # The current way I am handling it is as follows. The member object is of type Person. return template('index.html&apo ...

AngularJS ng-repeat nested loop allows you to iterate through an array

I am currently working with the following JSON data: { "ListNhomThanhTra": [ { "ListKeHoachThanhTra": [ { "ListDoiTuong": [ { "MA_DV_DUOC_TT": "DT01", ...

I'm currently designing pop-up notifications for a project I'm developing. The button appears on screen, but for some reason, the pop-up feature isn't functioning as intended

`I am currently working on a game project for my class, aiming to create a nostalgic web-based choose-your-own-adventure game similar to the ones I enjoyed playing years ago. I want the experience to be challenging, where making the wrong decisions could l ...

Issues with HTML to PDF text rendering (DOMPDF scrambles text after a certain number of HTML lines)

I've noticed some discrepancies between the output from my XAMPP setup and my Real Server. While everything works smoothly on XAMPP, the production server seems to be encountering issues. The problem appears to be related to the DOMPDF library that ...

How can I implement a hover-over image change effect similar to the one seen in Gmail accounts?

I am attempting to implement a feature that allows users to change their image, similar to what can be done in a GMail account. When the user hovers over the image, an option to "change image" should appear. This may be a new concept for me because I am ...

Utilize a single button in jQuery to modify several rows simultaneously

Is there a way to edit multiple rows using just one button with jquery? I am currently facing an issue where only the value of a single row is editable when I click on the edit button due to the use of row span. Below is the code snippet: $('.editb ...

How to style FullCalendar to apply background-color for the entire day, not just the event using the 'addEventSource' method

Is it possible to add a background color for the entire day, rather than just for the event itself? The code I've written currently only displays the events with a background color. <script> $(document).ready(function() { $.ajax({ u ...

search engine optimized for easy input via keyboard

I have successfully incorporated AJAX search functionality into my project, inspired by this example here. The unique feature of this implementation is the ability to navigate through search results using the TAB key. The structure of my search results tab ...

Is there a way for me to collaborate on a footer control with a different website?

Is it possible to seamlessly incorporate a footer from one website into another? Ideally, I want the footer HTML (and styles) to be dynamically inserted into different web pages. The common workaround is using an iframe, but this causes navigation issues ...

Having trouble getting ASPJAX to function properly

I'm looking to create a demo showcasing the combination of ASP and AJAX. I came across some code snippets from http://www.aspjax.com that I've incorporated into my project. However, I'm having trouble displaying the expected text. Here is t ...

Why is my <li> not centered and my navbar appears 'transparent' when I scroll through in HTML CSS?

https://i.sstatic.net/Qa2iS.png I am looking to achieve a solid navbar with centralized workouts and diets. https://i.sstatic.net/4bUlX.png I attempted to create a navbar, but when I added a search bar, it caused my "Workouts" and "Diets" to be off-center ...