Adjust the width of the first image on the slider

On my homepage, I am trying to set a fixed width for the first image in my slider code. Is it possible to achieve this using CSS or HTML? I have attempted to make it work but haven't had any success so far. Below is the current CSS code for my slider:

#slider {
    background-attachment: scroll;
    background-color: #FFFFFF;
    background-image: url("http://silverharmony.in/wp-content/uploads/2012/10/Slider_bg.png");
    background-position: 50% 0;
    background-repeat: repeat;
    display: block;
    float: left;
    width: 100%;
}

.inner, .wrapper {
    display: block;
    height: 100%;
    margin: 0 auto;
    position: relative;
    width: 960px;
    z-index: 0;
}

ul.kwicks {
    background-color: #333333;
    border-radius: 3px;
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
}

ul.kwicks li {
    background: url("../images/icons/ajax_loader.gif") no-repeat center center transparent;
    display: block;
    overflow: hidden;
    padding: 0;
}

.kw_img {
    display: block;
}

.kw_img img {
    vertical-align: middle;
}

.kw_shadow {
    background: url("../images/icons/overlay.png") repeat-y 0 0 transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    height: 100%;
    position: absolute;
    right: 0;
    width: 40px;
    z-index: 2;
}

.last .kw_shadow {
    background: none !important;
    border-right: 0;
}

Here's the HTML code for my current slider:

<div id="slider">
<div class="inner">
    <ul style="width:960px; height:400px; margin:15px 0;" data-width="960" data-max="660" class="kwicks" id="kwicks-1">
        <li class="kwick" style="left: 0px; width: 192px; margin: 0px; position: absolute;">
            <div class="kw_shadow"></div>
            <div class="kw_img">
                <img width="960" height="400" alt="" src="http://silverharmony.in/wp-content/themes/cstardesign/cache/timthumb.php?src=http://silverharmony.in/wp-content/uploads/2012/10/2.jpg&amp;h=400&amp;w=960&amp;zc=1&amp;q=100">
            </div>
        </li>
        ... 
    </ul>
</div>

You can view how the current slider looks at . I aim to make it look similar to the example shown here: .

Answer №1

The slider on this page utilizes the Kwicks jQuery plugin, with the first list item having the class ".kwicks-selected" added to achieve a particular effect.

You can see an example of this setup in action on this jsFiddle

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

Navigating through ajax requests on a Leaflet map

Currently, I have a leaflet map set up with the leaflet-panel-layers plugin to create a visually appealing layer control. To create my layers and overlays, I have two functions in place. The issue arises when trying to access external geoJSON files, as lea ...

Issue with React Ref: Invariant Violation when trying to addComponentAsRefTo

I'm encountering an issue while attempting to add a ref to a React component. The error message I'm seeing is as follows: invariant.js:39Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding ...

What about nested elements with percentages, set positions, and fixed placements?

Picture: https://i.sstatic.net/KFNR1.png I am working on a design with a yellow container div that I want to keep at 50% width of the window. Inside this container is a purple image div that stretches to 100% of the parent container's width, and ther ...

Determine whether a div contains any child elements

I am working on a piece of code that checks for the presence of the class "wrong" in any of my divs, and if found, displays a jQuery UI dialog box. My goal now is to enhance this code by adding a condition where it also checks for empty divs before showing ...

Error encountered: AngularJS routes causing 500 internal server error

I am struggling with organizing my directory structure. Here is how it currently looks - -project -public -app -app.js ( angular app module ) -server -server.js ( node root js file ) -includes -layout.jade - ...

[ERROR_HTTP_HEADERS_ALREADY_SENT]: Headers can't be set once they have been sent to the client, expressjs

Whenever I attempt to insert data into my MySQL database using the express router function, I encounter an error. It appears that my server is trying to send a response twice, but I am unsure of where the issue lies. Here is the error message: throw err; / ...

How can I retrieve the name of a React component in the most effective way?

My current challenge is figuring out how to retrieve the name of a React component. I initially attempted using the this.constructor.name property, but discovered that it doesn't function properly in production mode due to code minification by Webpack ...

Tips for creating Card-Title responsiveness across various screen dimensions with Bootstrap 4

I'm a beginner in web design and I'm wondering if it's possible to adjust the font-size of the card-title and the size of the card image based on different screen sizes using bootstrap 4. When viewed on small screens, they appear too large. ...

Is React the ideal choice for implementing a shared state subscription mechanism in your project?

Trying to determine if this falls under the "pub/sub" pattern or a variation of it. The goal is to establish a shared state where different components can subscribe to it and only receive updates when the state changes. const useForceUpdate = () => useR ...

The following working day with Moment.js

I'm having an issue trying to retrieve the next business day with my code. Currently, it is only displaying the day immediately following. Despite looking into similar questions for a solution, I have yet to identify the error. While this question is ...

``There was an issue with the connection while fetching data using Nextjs middleware

I've encountered an issue where this code works perfectly fine in dev mode but fails when switched to production mode. Can anyone help me figure out what's causing the fetch failure? export default async function middleware(req: NextRequest) { ...

Transforming Exposed components (jQuery Tools)

I need to toggle between two elements, exposing one while hiding the other with a single onClick event. Can this be achieved? My current JavaScript code does not seem to work as intended. Here is my existing script: function tutStep1(){ jQuery(' ...

Order of execution and loading of JavaScript files in Webkit threading

I'm currently working on creating an XSS widget and I'm encountering some issues specifically with Webkit browsers when loading external JavaScript files that I'm appending to the DOM. Here's how it's set up: Widget.js appends 3 ...

Is there a way to schedule a function to run every 6 hours in node.js based on actual time instead of the device's time?

var currentTime = new Date().getHours(); if(currentTime == 6){ //function Do stuff } if(currentTime == 12){ //function Do stuff } if(currentTime == 18){ //function Do stuff } if(currentTime == 24){ //function ...

Tips for extracting header ID from the HTML/DOM using react and typescript

I developed a unique app that utilizes marked.js to convert markdown files into HTML and then showcases the converted content on a webpage. In the following code snippet, I go through text nodes to extract all raw text values that are displayed and store t ...

Assurance of retrieving information

I am looking to extract specific information from the following website . I have implemented Promises in order to retrieve data about planets, then films associated with a particular planet object. My next goal is to access data within the species array ne ...

Ways to place the footer in the middle of 2 divs?

Hey there! I'm currently experimenting with creating a 3 column layout and running into an issue with the footer placement. I want the footer to go between the two sidebars at the bottom, but my middle column isn't extending all the way down like ...

Is it possible that React.createElement does not accept objects as valid react children?

I am working on a simple text component: import * as React from 'react' interface IProps { level: 't1' | 't2' | 't3', size: 's' | 'm' | 'l' | 'xl' | 'xxl', sub ...

Error: Unable to locate module - The specified file cannot be resolved when utilizing an external JavaScript library

I am currently integrating a WYSIWYG editor (TUI Editor) into my Angular2+ application. Since there is no official Angular wrapper available, I have decided to create my own based on an existing wrapper. Due to some installation issues with npm, I saved t ...

Instructions on utilizing jQuery to compare individual numbers within an array and hiding a div tag if the number is less than the specified range input

I have encountered an issue with Array manipulation in jQuery. Below is the code snippet that I am working with: Within my HTML structure, I have div tags with the same class but different values in their span tags. I am using an input range bar to dyna ...