Center items horizontally using CSS and restrict the scrolling space

Within a panel containing items, there is a horizontal arrangement of logos and labels. When there is an overflow-x, a scroll bar appears. The alignment of elements is maintained when only labels are included, but once an image is inserted, vertical alignment is lost. Why does this happen?

CSS code:

body {
  font-family: "Open Sans", Helvetica, sans-serif; 
color: #89867e;
background: #f9f9f9;
}
.wrapper {
margin: 20px;
padding: 2em;
list-style: none;
font-size: 1.5em;
font-weight: 300;
max-height: 388px; 
white-space: nowrap;
overflow-y: hidden;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch; 
    background-color: #ccc;
    margin-bottom:25px;
}

.internal {
display: inline; 
height: 164px;
padding: .4em 1em;
border: 2px solid rgba(255,255,255,0.1);
-webkit-border: 2px solid rgba(255,255,255,0.1);
-moz-border: 2px solid rgba(255,255,255,0.1);
-o-border: 2px solid rgba(255,255,255,0.1);
color: rgba(249, 249, 249, .9);
text-decoration: none;
font-size: 1.5em;
font-weight: 300;
margin-right: 18px;
}
 

.wrapper a:nth-child(6n+1) { background: #e87352; }

.wrapper a:nth-child(6n+2) { background: #ebc85e; }

.wrapper a:nth-child(6n+3) { background: #3bbec0; }

.wrapper a:nth-child(6n+4) { background: #4ad585; }

.wrapper a:nth-child(6n+5) { background: rgb(27, 54, 71); }

.wrapper a:nth-child(6n+6) { background: rgb(21, 40, 54); }
 

.wrapper:nth-child(6n+1) { background: rgb(208, 101, 3); }

.wrapper:nth-child(6n+2) { background: rgb(233, 147, 26); }

.wrapper:nth-child(6n+3) { background: rgb(22, 145, 190); }

.wrapper:nth-child(6n+4) { background: rgb(22, 107, 162); }

.wrapper:nth-child(6n+5) { background: rgb(27, 54, 71); }

.wrapper:nth-child(6n+6) { background: rgb(21, 40, 54); }

.transparent {
background: transparent !important;
padding: 0;
border:none;
}

.logo {
max-width: 318px;
vertical-align: middle;
margin-right: 18px;
}
<div class="wrapper">
  <a href="#" class="internal trasparente"><img src="https://upload.wikimedia.org/wikipedia/bar/8/86/744px-Siemens-logo_svg.png" class="logo" style="margin-top:20px" alt="logo"></a>
  <a href="" class="internal">item 1</a>
  <a href="" class="internal">item 2</a>
   [....] // shortened for brevity
 <a href="" class="internal">item 29</a>
  <a href="" class="internal">item 30</a>
</div>

Is it possible to limit the length of the scroll-x and add a right arrow (or any other element) at the end of each "wrapper" panel in the space that was removed due to scrolling?

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

React Redux has encountered an error as mapStateToProps and a variable are not defined in the code

I encountered the following error message: ./src/components/Playing.jsx Line 15: 'aaa' is not defined no-undef within my Playing.jsx file: import React, { Component } from 'react' console.log(aaa); Referencing Token.jsx: i ...

Customizing Dropdown Icon in Bootstrap

Previously in Bootstrap 3, changing the dropdown icon was straightforward by adjusting the span and inserting the desired icon. However, it appears to be a bit trickier with Bootstrap 4. Am I overlooking something? Regardless, here is the basic code snipp ...

On my WordPress Elementor website, I am looking to have the button on my product card linked to a specific

I found a product card design on codepen.io and tried to customize it by changing the colors. However, I'm struggling to get the button to work. Here is the product card code snippet: <div class="card"> <div class="imgBox&q ...

Object C UIWebView adapting to HTML

How can I get a responsive HTML page to display correctly in a UIWebView in Xcode? The page adjusts properly in other iPhone browsers, but not in the UIWebView. I would prefer not to use PhoneGap for this. Any suggestions for making the HTML responsive i ...

Performing calculations using jQuery and organizing sub-totals into groups

I am currently developing a web application and aiming to incorporate an invoice calculation feature with sub-groups. My goal is to have the total result of both group-totals and sub-totals at the end. Here is my progress so far: Check it out here $(func ...

Struggling to remove background image in WP CSS causing overlapping menus in submenu

I recently followed a tutorial on "Overlapping Tabs" for a WordPress project and found it to be quite helpful and functional. The tutorial can be viewed at After implementing the tabs from the tutorial, I decided to add dropdown submenus to enhance the fu ...

The Chart.js donut chart is not displaying as expected on the HTML page when using

My HTML code is set up to display a donut chart with database records retrieved through a PHP script. The data is successfully fetched and visible in the browser console, but the chart itself is not showing up. How can I resolve this issue? console.lo ...

Pressing the button will not have any effect unless the textarea is unfocused

I am having an issue with my HTML textarea that expands on focus. Below the textarea, I have a button for users to submit their input. However, when the textarea is expanded and the button is clicked, it does not fire the onclick event. Instead, it causes ...

Make all cells in bootstrap table appear in bold font

Is it possible to have normal text in the cells of a Bootstrap 4 table without bold formatting? Using font-weight doesn't seem to be working for me. <div class="row col-md-10 px-4 py-3 "> <table id="ServiceTable" class="table table-hover ...

Error encountered while trying to execute Javascript code

I am encountering an uncaught JavaScript error that is giving me trouble in finding a solution. Uncaught TypeError: undefined is not a function games.html:37 event.returnValue is deprecated. Please use the standard event.preventDefault() instead. HTML & ...

Can a button be validated if it is located outside of a form?

I'm currently in the process of developing a website to practice my coding skills and I have a query. Can I implement button validation when the button is not within a form using HTML, CSS, and Bootstrap? Check out the following code snippet: & ...

Having difficulty shifting checkboxes to the right side

I'm struggling to align all checkboxes in a single vertical line. I can't figure out how to do it without moving all the content to the right when using float:right on .checkbox. If you want to see the issue in action, visit the site (please not ...

The error message "invalid module name" is preventing Phoenix from creating an HTML template

Encountering issues while trying to run the phx.gen.html templates. Below is the command that I am attempting: mix phx.gen.html Shipments shipmentroutes shipmentroute address:string date:string groups_involved:string An error message is displayed as fol ...

What is the correct way to pass parameters to Angular components?

I've been struggling with a problem in Angular for days now as I'm new to it. The issue is related to passing parameters in a component where the values are not displaying correctly. Initially, I attempted to pass parameters like this: <app-p ...

Application utilizing electron technology featuring various tabbed browsing windows connecting to secure websites

Currently, I am in the process of developing my own unique version of a platform similar to using Electron technology. The objective for this app is to provide users with the ability to view multiple URLs simultaneously, such as and , through a tabbed i ...

The Unexpected Mishaps of CSS Grid Layout

I attempted to create a grid using CSS, but I seem to have made an error somewhere in my code. Can someone please take a look at my jsFiddle link and provide some guidance? jsFiddle /*Grid*/ .container { width: 100%; max-width: 1200px; } .row:before, ...

Pressing the reset button on a basic calculator

I am experiencing an issue with my calculator. It works fine initially, but after using the reset button, it stops functioning properly. Currently, I only have the multiplication set up as I debug this problem. I am new to JavaScript and would appreciate a ...

Attempting to insert a line break tag within the text using React

Having trouble inserting line breaks in text using React. Can anyone guide me on how to achieve this? I've attempted adding the br tag, but it is displaying as in the browser. Here's a snippet of my code. Appreciate any help or advice. let sp ...

A sporadic glitch in IE10 appears while attempting to translate text with a border-radius feature

I need some advice regarding a rendering issue I am experiencing in IE10. I have created an animated-flip effect that works perfectly in all the browsers I need it to. However, during testing, I noticed random border-like lines appearing for no apparent re ...

Utilize @font-face when saving a webpage

I've been experimenting with @font-face to embed a custom font, but I've noticed that when saving the page locally on my computer, the font is not being saved along with it. This issue has occurred consistently across Firefox, Chrome, and Safari. ...