The slider does not centralize images

I'm relatively new to design and running into issues with my current project.

For the banner, I've implemented Easyslider and the images are scrolling smoothly. However, they appear off-center in Google Chrome and fail to display in Firefox. Surprisingly, everything works fine on IE. Additionally, I'm struggling to configure the smaller images below the banner as navigation controllers. It seems like a screen-seat issue, but after spending days trying to resolve it, I'm feeling quite desperate.

You can view the project at this URL:

Here's a snippet of the HTML code:


    <section class="banner">
    <ul>                
<li><a href="#"><img src="img/banner_central_02.jpg" alt="" /></a></li>
<li><a href="#"><img src="img/banner_central_03.jpg"" alt="" /></a></li>
<li><a href="#"><img src="img/banner_central_04.jpg" alt="" /></a></li>     
    </ul>
    </section>

    <section class="container" (more HTML code) . . .
  

The JQuery snippet:


    <script type="text/javascript">
        var $j = jQuery.noConflict();

     $(document).ready(function(){  
    $j(".banner").easySlider({
        auto: true,
        continuous: true,
        nextId: "slider1next",
        prevId: "slider1prev"
        });
          });   
   </script>

And, finally, some CSS code:


    .banner{
      width:100%;
      height:25em !important;
  } (more CSS rules) . . .

  

Apologies for the somewhat messy code and appreciate any help or suggestions!

Cris

Answer №1

To center the image, apply margin auto to both left and right sides.

.banner li img{
    width:100%;
    margin:0 auto 0 auto;
    text-align:center;
}

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

Looking for an xpath to target elements within a neighboring table

I am having trouble creating an xpath expression to find the text located in the span tag that contains text to locate in the second portion of the xpath. The text should be found by first locating an image inside a table row within a table data cell in a ...

Creating a straightforward game using node.js, socket.io, and jquery, where users can take turns participating

I am currently working on a game using node.js, socket.io, and jquery. The game involves two users logging in from different locations and browsers. When the first user logs in to play, they receive a message saying "Your Turn" and have 30 seconds to make ...

determine the actual height of the window taking into account the height of the vertical scroll

Is there a way to accurately get the window inner height while considering the x-scroll bar? It appears that window.innerHeight always returns the same height even when the x-scroll bar is present. Are there alternative methods to obtain the window height ...

Is there a way to navigate to a link with CasperJS without having to specify the CSS selector?

<a href="pss.exe?TRANSACTION=CGI_JUMP&amp;SESSDATA=randomstuff&amp;SKIN=default&amp;LANG=en-US"> Update your password </a> <a href="psk.exe?TRANSACTION=CGI_JUMP&amp;SESSDATA=randomstuff&amp;SKIN=default&amp;LANG=en ...

The mtree script in external JavaScript is failing to function properly after dynamically inserting elements using jQuery

Here are the images showing a list of data that appears in all rows after the page loads. However, when I add a row using jQuery, the data does not show up. Please refer to image 2. Image 1 https://i.sstatic.net/xzn2c.png Image 2 https://i.sstatic.net/ ...

The novice image slideshow script in JavaScript is causing all images to disappear and generating errors

Trying to create a simple image slider that pulls information from various sources. CSS and HTML are set up properly, but adding the JavaScript logic causes all images to disappear. The console displays an error saying "Uncaught TypeError: Cannot read prop ...

Validating clients with Bootstrap 4 before submitting via ajax

My project follows the guidelines of Bootstrap 4, so I aim to reuse existing code whenever possible instead of writing my own. I have a form (shown below) that triggers an AJAX post request upon pressing the Submit button. The response is a JSON object con ...

The header remains fixed while scrolling - troubleshooting the If Else statement

Check out this cool pen... http://codepen.io/jareko999/pen/bZXbWP The jQuery code adds a .fixed class to the #header when it reaches or goes below 0, but doesn't remove it when back above 0. I'm new to JS and struggling to understand what' ...

Troubles encountered when presenting arrays in PHP

I am currently exploring the world of PHP on my own and trying to grasp its concepts. One task I'm working on involves handling an array: <?php $age=array("A"=>"test", "Arating"=>"37", "B"=>"test2", "Brating"=>"40", " ...

Creating a multi-line graph with phpGraphlib is a breeze!

I've managed to generate a line graph using phpGraphlib, but now I'm stumped on how to create a multiline graph with this library. The x-y values are stored in arrays here. Here's my code: <?php include("phpgraphlib.php"); $graph ...

Guide on making a persistent sidebar using CSS and JavaScript

I'm in the process of developing a website that features a main content area and a sidebar, similar to what you see on Stack Overflow. The challenge I am facing is figuring out how to make the sidebar remain visible as a user scrolls down the page. T ...

Strange Behavior of SVG 'fill: url(#....)' in Firefox

I am struggling with an SVG graphic that I have created. Here is the code: <svg width='36' height='30'> <defs> <linearGradient id="normal-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" s ...

HTML documents do not show images

I'm having trouble displaying the same picture three times. It seems like a simple task, but for some reason, it's not working correctly. ...

What is the best method for style.scss to communicate with style.css - should it be through @import, --watch,

As I observe the use of @import with mixins and partials in the code, I find myself puzzled as to why the programmers did not simply write @import style.css. Instead, they imported Susy, bourbon, vendors, utilities, and bases. It's a bit confusing to ...

Press anywhere outside the container to conceal it along with the button

Utilizing an Angular directive to hide div elements when the user interacts outside of them has been effective. However, there is a specific issue that arises when clicking outside of a div on a button that toggles the visibility of the div. The 'ang ...

Utilizing Glyphish Icons within jQuery Mobile

As someone who is new to jQuery and jQuery Mobile, I've been working on a project that involves using glyphish icons in a navigation bar. The CSS code I'm utilizing in the header section adjusts these icons according to specific dimensions and st ...

Implementing a dialogue box within a tab using jQuery

I have successfully created a dialog and tabs. However, I am looking to enhance the functionality by displaying a specific dialog within each tab. For example, when tab1 is clicked, dialog1 should open within the tab, and the same for tab2 and dialog2. I w ...

What is the best way to prevent text-decoration from being applied to icons when utilizing font-awesome inside a hyperlink?

I recently began using FontAwesome and it's been going well. However, I have a question about using it with an anchor tag that has text-decoration:none, and on hover text-decoration:underline. Whenever I hover over the link, the icon also receives the ...

Using the window.setInterval() method to add jQuery/AJAX scripts to elements at regular intervals of 60 seconds

I'm having trouble with automatically updating a div. I have a script that refreshes the page content (similar to Facebook) every minute. The issue is that this div is newly added to the page and contains some ajax/jQuery elements for effects. functi ...

unable to add information into database using json syntax

I am looking to input my data using JSON. Here is the code I have: <head id="Head1" runat="server"> <title>Register</title> <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script> <script type="tex ...