List of pictures displaying solely the initial image

While working on a jQuery sliding list to display a series of images one after the other, I encountered an issue. When manually testing the movement of an image to reveal the next one, it wasn't displaying correctly and the reason behind this is eluding me. Below is the HTML snippet for reference:

<div id="slider">
<ul class="pages">
    <li class="page">
        <a href="article.html" >
            <img src="images/iphone-5s2.jpg" alt="an iPhone 5S">
        </a>
    </li>
    <li class="page">
        <a href="#" >
            <img src"images/network-cables2.jpg" alt="Network cables">
        </a>
    </li>
    <li class="page">
        <a href="#" >
            <img src"images/black-keyboard2.jpg" alt="Close up of a black keyboard">
        </a>
    </li>
</ul>

Here are the relevant CSS styles:

    #slider{
    width:900px;
    height:500px;
    overflow:hidden;
}

#slider .pages {
    display: block;
    width: 5000px;
    height: 500px;
    margin: 0;
    padding: 0;
}

#slider .page {
    float: left;
    list-style-type: none;
    width: 900px;
    height: 500px;
}

Attached is a screenshot showing the issue with displaying the second image:1

All images mentioned are stored in the same folder, and even when altering their order, only the first one loads correctly every time.

Answer №1

After the attribute src, an equal sign = is missing, causing this attribute to be ignored and resulting in images without a valid source.

<img src="images/network-cables2.jpg" alt="Network cables">
<img src="images/black-keyboard2.jpg" alt="Close up of a black keyboard">
       ^^

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

The animation is disrupted by multiple clicks in jQuery

Here is a basic form example: <form id="form" action="file.php" method="POST"> <input class="form-control" type="number" name="p" value="0"> <label for="p">Text</label> <input class="form-control" type="number" name=" ...

Attempting to troubleshoot a CSS grid layout for optimal functionality

I'm looking to achieve a unique layout where the image is on the left, but the content (title above meta, meta above text) is displayed on the right in a blog list style. With the limitation of not being able to change the HTML structure, I am wonder ...

BeautifulSoup is throwing an AttributeError because it cannot find the attribute 'h3' in the list object

I am a newcomer to the world of Web-scraping and I am currently working my way through this tutorial ( ) in order to collect movie data. However, I believe I have made a mistake in defining the variable "first_movie". This is the code I have: from reque ...

How to perfectly center a dropdown menu using CSS across different web browsers

I am dealing with a dropdown menu that is auto-generated by WordPress, so altering the HTML structure is not an option. However, I have the flexibility to adjust the CSS styling to correct an alignment issue in my dropdown menu. Currently, I'm facing ...

Dialogue Inventory System

I am in the process of developing a conversation system that includes a page where users can view all of their conversations and select which one they want to reply to. The layout is structured as follows: You can view an image of the layout here. The co ...

Displaying JSON formatted dates using AngularJS

There is a JSON file with a "DataIscr" field structured like this: "DataIscr": "1969-6-17T00:00:00+01:00". A filter has been created for DataIscr: <label for="DataIscr">DataIscr:</label> <select style="width:200px" data-ng-options="Person.D ...

Using HTML and JavaScript allows for the video URL to seamlessly open in the default video player app on the device

Working on my mediaplayer website, I want to give users the option to choose which app to play their uploaded videos with. So far, I've attempted to implement a button that triggers this action: window.open("video.mkv", '_blank'); Howeve ...

Dynamic backdrop featuring engaging content

I am currently working on a WordPress website that features a dynamic background. While I have successfully implemented movement to the background, the content on the site remains static and unaffected by scrolling. The background does not move alongside t ...

Is there a way to apply an active class when any of the Option buttons are chosen?

I'm attempting to assign an active class to a Submit button once any of the options from a button group are selected. However, I'm encountering difficulties in getting it to work properly. View code on jsFiddle $('#optionbut ...

jQuery issue with hover and mousedown

Hello everyone, I have a little challenge that I believe shouldn't be too complicated. What I want to achieve is displaying an image in a cell when the mouse hovers over it. Here's the setup: <table id="selectable"> <tr> ...

The <h1> element is not responding to the style attribute

Exploring HTML as a beginner has led me to an interesting issue. I've been practicing my newfound skills on W3Schools' platform and everything was running smoothly until I encountered a discrepancy in how the code is rendered on Wordpress. The s ...

How can I incorporate multiple quality sources into a flowplayer using Angular?

Is there a way to add multiple sources with different qualities like 1080p, 720p etc.? Thank you in advance. flowplayer('#my_player', { src: '../assets/videos/video_1080p.mp4', // title: 'This is just demo&apo ...

Issue with backdrop-filter blur effect not functioning correctly

I'm currently utilizing SCSS and within my _header.scss file, I am importing it into my main.scss like so: @use "header"; Here is the snippet of code from my header file (I've removed some less important details such as borders, margin ...

Methods for anchoring an element at the bottom of a square container div

* { box-sizing: border-box; } .publication { display: flex; width: 100%; margin-top: 6%; } .bottom1, .bottom2 { display: flex; flex-direction: column; ...

"Enhancing User Experience with Stylish Drop-down Menu Hover

I'm working on a CSS drop-down menu that has a hover effect, but I'm facing an issue where the a element within the li is not taking up the full width of the li. I want it to utilize the entire width of the li, especially on hover. Does anyone ha ...

What are some tips for customizing the NavBar Bootstrap 4 Layout to fit a unique design?

Good evening everyone, I am currently working on a website project for a client who has provided me with specific requirements for the Navbar design. While it seemed straightforward at first, I have spent several hours trying to perfect the layout. I am ...

button click event blocked due to unforeseen circumstances

Recently, I've been attempting to change the CSS properties of a div by triggering a click event. However, no matter what I do, it doesn't seem to be working and it's starting to frustrate me. Can anyone shed some light on why this might be ...

What is the best way to ensure that text within an inline-block div is completely isolated and independent from any surrounding text?

I'm a bit confused by this situation. I've posted it on CodePen. Essentially, I'm utilizing block-inline to create a centrally aligned grid of square divs that wrap if the screen is too small. .outer{ width: 100%; text-align: center ...

Using require to access an Immediately Invoked Function Expression variable from another file in Node.js

File 1 - Monitor.js var MONITOR = (function () { // Code for Monitoring return { doThing: function() { doThing(); } }; })(); File 2 - Test.js var monitor = require('../public/js/monitor.js'); I am trying to access the doThing() funct ...

Transforming text strings into Base64-encoded images

Is there a way to create an image from a text string like 1 or 2323? I'm interested in generating a simple placeholder image using the text as the background. I haven't found any tools that can do this, only base64 generators for existing images. ...