October 22, 2024
Chicago 12, Melborne City, USA

CSS

CSS (Cascading Style Sheets) is a representation style sheet language used for describing the look and formatting of HTML

CSS

Why is that even after giving the container 100% width, im getting a horizontal scrollbar in the desktop view

I know to make the container not to overflow but I’m still getting the horizontal scrollbar. For the context I have used flex for the parent here (i.e .container) I checked if the child elements are the one causing the overflow but that wasn’t true. When I reduce the .container class width to 98% the

Read More
CSS

“Issue with Swiper.js: Cards Disappearing When Swiping Right

I am experiencing an issue while implementing Swiper.js in my project. When I swipe to the right, the cards disappear, and they only reappear when I swipe to the left. I can’t understand what might be causing this problem. Here is the html, css and JS: html: <!-- Slider main container --> <div class="swiper flex

Read More
CSS

How can I use css grid and subgrid layout correctly for lists?

How can li contain other children such as strong, without them breaking the layout? ol { counter-reset: Nr; padding: 0; list-style: none; display: grid; grid-template-columns: min-content 1fr; grid-column: subgrid; li { counter-increment: Nr; grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin-top: var(--listsep); &::before { content: counter(Nr) "."; text-align: end; margin-right: 0.85rem; } ol {

Read More
CSS

How to add Gap / Space in SubMenu

I’m not at all familiar with editing code and have had a hard time building this WordPress site (https://danielpainter.at) for myself (feel free to join the site). How is it possible to create a distance (gap/spacae) between the buttons in the sub-menu? Now: now Should be: should be The affected code should be <ul class="sub-menu">

Read More
CSS

Override external css class added by external script in Astro and Tailwind

I am using Astro and Tailwind CSS. From an Astro component an external script is added which create some HTML dom elements (and its styling). // MyComponent.astro <script is:inline src={import.meta.env.PUBLIC_MY_SCRIPT}></script> In the dom it renders like: <div class"my-ui-uicontainer"> // More code.. </div> I need to override the applied styling of .my-ui-uicontainer. What is the best

Read More
CSS

Black Outline Issue Around Text with CSS Gradient

I’m trying to create text with a gradient effect using CSS, but I’m noticing that there’s a black outline around the letters, which is not the desired effect. Here’s the CSS I’m using: div.marge { height: 100vh; } * { font-size: 50px; color: black; } span.white { text-decoration: none; background: linear-gradient(27deg, rgba(255, 0, 255, 1)

Read More
CSS

Does flexbox center absolute positioned div if no bottom/top/right/left attrs provided?

Why is my menu (position: absolute) affected by align-items: center? Using top: 0 solves the problem, but I’d like to find out why this fixes the issue. .navbar { padding-top: 50px; display: flex; justify-content: space-between; align-items: center; /* WHY DOES THIS AFFECTS absolute positioned menu? */ } .links { list-style: none; margin: 0; padding: 0;

Read More
CSS

Kendo UI for Angular – filterable DropDownList – Search icon misaligned

I have the following code: <kendo-dropdownlist formControlName="documentType" [data]="filteredDocumentTypes" [filterable]="true" [valuePrimitive]="true" textField="name" valueField="code" (filterChange)="filterDocumentTypes($event)" [class.is-invalid]="uploadDocumentType.invalid && isUploadInvalid"> </kendo-dropdownlist> The built-in Search icon is misaligned (see screenshot below). It was ok before. The screenshot also shows the automatic kendo-popup tag in the Browser Developer tools, seen when a user clicks in Choose Document Type dropdown. As this

Read More
CSS

Why don't flex items shrink past content size?

Let’s assume having the following HTML: <div class="main"> <div class="header">Header</div> <div class="middle"> <div class="inner"> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> <p>Lorem Ipsum</p> </div> </div> </div> Let’s assume having the following CSS: .main {

Read More
CSS

CSS-only masonry layout

I am trying to achieve a dashboard grid witch has variable number of elements based on fetch result in marked elements ( red boxes on image ). I want to fit content on vieport with min height of items. if any item hits its min height then overflow grid. See image below: Group Dashboard Most

Read More