Having difficulties with CSS issues on jCarousel - struggling to figure it out

Before we proceed, take a look at this jsfiddle that I have prepared:

I am aware of the importance of not relying on externally hosted code, so I will include it at the end of this question.

My goal is to recreate the demonstration of the plugin available here.

The challenge I am facing is aligning the avatars of authors from my WordPress site in a carousel layout. While the HTML output displays correctly on the page, for some reason, the avatars are not positioned side by side horizontally within the carousel to span the full width of my page.

I have attempted adjusting the widths of

.jcarousel-skin-tango .jcarousel-container-horizontal
and
.jcarousel-skin-tango .jcarousel-clip-horizontal
, which did make the carousel wider. However, it also increased the spacing between the avatars, causing them to appear too distant from each other when navigating using the buttons instead of being displayed in a horizontal line with a small gap between them.

If I modify the width, it affects the alignment of the next and previous buttons, but that can be easily adjusted to match the new carousel width.

I cannot figure out why the display does not mirror the demo version, as I only made changes to the CSS for the buttons.

Any assistance would be GREATLY appreciated.

CODE

jCarousel Initialization

jQuery(document).ready(function() {

    jQuery('#authorcarousel').jcarousel({
        scroll: 1,
        visible: 1,
        animation: 1000,
        auto: 0,
        wrap: 'circular',
        itemFallbackDimension: 75
    });
});​

HTML

<ul id="authorcarousel" class="jcarousel-skin-tango">
    <li>
        <img src="http://cdn2.iconfinder.com/data/icons/humano2/128x128/apps/comix.png" alt="" width="128" height="128" class="photo" />
    </li>
    <li>
        <img src="http://cdn5.iconfinder.com/data/icons/iconshock_guys/128/andrew.png" alt="" width="128" height="128" class="photo" />
    </li>
    <li>
        <img src="http://cdn4.iconfinder.com/data/icons/STROKE/communications/png/128/avatar.png" alt="" width="128" height="128" class="photo" /></li>
    <li>
        <img src="http://cdn2.iconfinder.com/data/icons/holloweenavatars/PNG/Frankenstein.png" alt="" width="128" height="128" class="photo" />
    </li>
    <li>
        <img src="http://cdn5.iconfinder.com/data/icons/iconshock_guys/128/matthew.png" alt="" width="128" height="128" class="photo" />
    </li>
</ul>

CSS

(preformatted text block containing CSS styles)

Answer №1

After experimenting with the fiddle for a while, I stumbled upon this solution: http://jsfiddle.net/QRtGH/

To address your issue, pay attention to the javascript line that reads: visible: 6 in jcarousel settings.

Additionally, some unnecessary CSS can be removed to streamline the appearance. Use this class to customize the display:

.jcarousel-skin-tango .jcarousel-clip-horizontal

Answer №2

Have you downloaded the jcarousel plugin yet?

There seems to be an issue with the plugin as the JavaScript is not functioning properly. You can check this URL

Their example isn't working either:

Visit this link

Download the project from there and make sure to use the local 'js' files.

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

What are some practical applications for jQuery.data and how can I access this data from the server side?

Is it possible to utilize the jQuery.data(this, "isDirty", "very") function on the server side in order to implement specific processing for textBox controls after a page postback? ...

Scheduling tasks for jQuery/Javascript like a Cronjob

I'm currently working on a web application that predominantly uses PHP, however, I am incorporating jQuery/Javascript to retrieve Tweets from users' URLs at http://twitter.com/status/user_timeline/joebloggs.json?count=1&callback=. My aim is ...

Utilize the outcome of one variable to label another variable

I am attempting to generate a variable name by using the id value of another variable. Here is my approach: Upon clicking one of the 4 tables, I get the id of the table. For instance, let's say it's 676. Next, I want to create a variable using ...

What is the best way to retrieve a response from a modal dialog using jQuery?

Is there a way to utilize an add-in such as simple-modal or the dialog add-in in the UI kit to achieve AJAX interaction with the server? I am looking for a solution that allows the modal to communicate with the server and return the result back to the ca ...

Always keep your phone in landscape orientation for optimal website viewing

Currently, I am facing an issue with my website where it functions perfectly on mobile devices in landscape orientation but elements get distorted when viewed in portrait mode. Is there a method to ensure that the website is always displayed in landscape ...

Utilize PHP to import an HTML file with JavaScript code into MySQL database

I've been attempting to use JavaScript to retrieve my location, but I'm facing an issue where when I click submit, the data is not getting entered into the page action.php. geolocation.php <form action="action.php" method="post"> < ...

The event is being triggered on two separate occasions

Hey there! I'm trying to bind the onclick event to both a parent and child element using the same method. However, I'm running into an issue where the event is being fired twice. Any suggestions on how to prevent this from happening? <div id= ...

Top method for constructing a link in JQuery with specific parameters

As someone who is new to JQuery, MVC, and web development in general, I am currently working on a project where I need some advice. My goal is to create a filter with four input elements and one output. I have four drop-down select elements on my page. W ...

What is the best way to decrease the width of one of the four columns?

I trust all is well with you. I'm having trouble adjusting the width of one of my table data cells. In the image attached below, you'll notice that my + icon is the same size as the other columns. I'd like to make it much narrower and posit ...

Locating the top 3 largest values in an HTML data table and highlighting them in red

Issue Description: I am working with data that displays the electricity consumption of different buildings in HTML tables. There is a possibility that these tables may contain duplicate values. With the use of jQuery, I am seeking a method to identify an ...

What is the best way to serialize the file from a form for uploading and storing in a MongoDB database, utilizing Backbone.js, jQuery, and Node.js?

I'm currently working on implementing a file uploader feature that allows applicants to upload their resumes for specific job posts. I've managed to capture all the form values except for the file upload input. How can I successfully upload, seri ...

Turn on/off the button click functionality on a jQuery smart wizard control

I am currently utilizing this particular control, which happens to be version 3 of jQuery Smart Wizard. Here is the code snippet for the smart wizard: $('#wizard').smartWizard({transitionEffect:'slide'}); These are some helper functi ...

Sending a variable using the onchange function in jQuery

I have written a script to toggle the visibility of different divs based on selection var folder; $(function() { $('#teamleag').change(function() { if ($('#teamleag').val() == 'footballal') { $('# ...

What is the best way to ensure that my search box is responsive in HTML and CSS while also horizontally centering the search_box div?

Question 1: I need assistance in making this search box responsive. Every time I try to adjust the screen width, the button ends up below the input field. How can I resolve this issue? Question 2: Is there a way to horizontally center the div class=" ...

Customizing WordPress: Adjusting Tab Text Color and Header Height

I'm currently working on a WordPress Page and facing some issues. I need to adjust the header height and change the color of the active page text. Attached is a screenshot for reference: Can anyone provide me with the necessary code to make these ch ...

Stopping form submission on a jQuery form

I am in the process of implementing a password control feature on a login form using jQuery and ajax. This is the current script I have: $(document).ready(function() { $("#login-form").submit(function(e) { var csrftoken = getCookie('csr ...

Tips for aligning a form in the center of a webpage

I have a code snippet using material-ui that I want to center on the page, but it's not working. Can someone please help me fix this issue? Thank you in advance. import React from 'react'; import { makeStyles } from '@material-ui/core ...

Customizing the appearance of default UI elements in asp.net

Recently, I was tasked with creating an image uploading function for a web application using asp.net. To start off, I utilized the standard input asp.net button along with the browse and filename label. The implementation of this code is quite straightforw ...

Help needed with CSS menu dropdown problem

Hello everyone, I am currently working on creating a menu for the top navigation of my website. My goal is to have a list of items appear below the menu when hovering over it with the mouse. Right now, I am testing this on a local HTML file before impleme ...

I am unable to display the content even after setting `display: block` using the `.show()`

Hello there, I have attached my javascript and html code. While in debug mode, I can see that the CSS property 'display: none' changes to 'display: block', but for some reason, the popupEventForm does not open up. Any suggestions on why ...