Most voted "css" questions
Cascading Style Sheets (or simply CSS) is a style language used to define the presentation of documents written in a markup language, such as HTML or XML. Its main benefit is to provide the separation between the format and content of a document.
Learn more…8,314 questions
Sort by count of
-
5
votes1
answer884
viewsHow to decrease the space between Carousel bootstrap 4 images?
Good evening guys, I would like to know how I can decrease this white space between the images of Carousel. Can someone help me, please? my code: <!DOCTYPE html> <html lang="en">…
-
5
votes4
answers5632
viewsIs there any way to use :Focus in div?
I have a div who holds my input and Submit, I wanted to put an effect to make it cooler, only I tried to use it like this .search:Focus and it didn’t work, someone would know how I could put a Focus…
-
5
votes4
answers4799
viewsHow to turn a rectangular image into a circle (without distorting it)
As shown in the image below, I can make the picture rectangular turn round, but it gets distorted: .posts .posts-item img { max-width: 100%; height: auto; display: block; margin: 0 auto;…
-
5
votes2
answers154
viewsWhat to do so that when the user hovers over an image, it expands a little? ( preferably using only HTML and CSS)
I wanted that when the user passed the cursor over a given image, the image would zoom in a little bit, and that’s all.
-
5
votes2
answers2823
viewsMargins of the child element leaking to the parent element
I didn’t find in the community something that would clear my doubt, so let’s go! In the example below, I don’t know why water loads, the property margin of the elements p and h1 exceed the parent…
-
5
votes1
answer75
viewsWhy is :first-Child a pseudo class?
I’m giving a training in CSS, and even after reading and listening on the topic I’m still having some difficulty understanding why :first-Child is a pseudo class and not a pseudo element, like…
-
5
votes2
answers260
viewsWhat is the difference between Cssclass="example" and class="example"
I came across the following piece of code: <asp:Label ID="lblStatus" CssClass="labelFiltro" runat="server" Text="Status:"></asp:Label> Until then I didn’t know CssClass, would like to…
-
5
votes2
answers477
viewsCalculation of . scss for . Sass
I am creating a dynamic grid system using Sass and Gulp-Sass to compile. I have this code: $col-margin: 15px .row width: 100% max-width: 1170px margin: 0 auto display: flex flex-wrap: wrap // cols…
-
5
votes1
answer247
viewsWhat is Atomic web design?
Superficially I found very interesting this approach, but before going deeper I would like to know exactly what it is about, too, if it is possible to use it in short scale projects, or even in a…
css pattern-design software-engineering methodology uiasked 6 years, 11 months ago Felipe Duarte 6,284 -
5
votes1
answer4785
viewsCSS - Hide a part of text
Good, I have a column in MYSQL called decryption. When I’m going to echo it, it appears in full text, what I wanted was just to show a part of the text and not everything. How I do in css?…
-
5
votes3
answers41543
viewsAlignment from side to side
I want to put both divs (green and red) aligned side by side as they are, but the green should be fixed aligned on the right, while the red line is aligned on the left, so I put the margin-left:0vw;…
-
5
votes1
answer368
viewsBroken layout Safari8
Hello! I’m starting at frontend and I’m having some problems with compiling code on different browsers. Developing a header and a Canvas style menu I came across the totally broken layout in…
-
5
votes4
answers9132
viewsHow to change the color of a select when selecting an option
I have a select and I’m trying to change the color of it by selecting an option (for example I’m changing the color to red). Using some attributes like hover, focus, active and checked i can even do…
-
5
votes2
answers4177
viewsHow does hierarchy elements work in css?
I would like to know how the hierarchy works in css, I explain: Let’s say in mine style.css i set to h1, h2, h3, h4, etc. by default font-size: 12px;, hitherto beauty... Now, if for example I insert…
-
5
votes2
answers2049
viewsSort CSS DIV positioning
Is there any chance I could position the .divdois above the .divum only with CSS without having to change the HTML position? <style> .divum { width: 100%; height: 200px; background: black; }…
-
5
votes1
answer1195
viewsHow to adjust the printing of an HTML in two columns?
Dear colleagues, I’m developing a PHP program with zend Framework2. In this program I have generate a stylized PDF containing the header, body and footer (I am using DOMPDF). The basic structure of…
-
5
votes2
answers1889
viewsScript to select only a checkbox?
I have the following code with a menu like Menu Accordion: function marca() {} body {font-family: Trebuchet MS;margin: 0px;} nav {width: 100%;} p {font-size: 14px;text-align: justify;} .item label…
-
5
votes1
answer817
viewsDarken background by hovering the mouse on the link
Hello, How to make a darkening effect on the bottom of the site by hovering the mouse over the main title? Like this site: https://www.santander.com.br/ I tried this addClass but it didn’t work :(…
-
5
votes5
answers721
viewsElement with different end size than width and height definition in CSS?
Code: div { width: 300px; height: 100px; border: 1px solid red; padding: 50px; } <div> Contéudo da div. </div> I would like to understand why while inspecting the div that’s in the code…
-
5
votes2
answers700
viewsDropdownlist quantity Items
Good morning, I’m using dropdownlist in the asp.net to load some data coming from the database, however I do not know the amount that will be shown, because it depends on the fill in the database. I…
-
5
votes1
answer349
viewsWhat is Reduced Motion Media Query?
I recently saw that there is the concept of Reduced Motion Media Query in the CSS, which apparently is a response to the animation settings in the client’s browser and is used in code primarily by…
-
5
votes4
answers3500
viewsHow to increase the space between text and underline in CSS?
When we’re using a text-decoration: underline we have an underlining applied to it. However my doubt is the following: It is possible to change the distance between text and underline? If yes, it…
cssasked 6 years, 1 month ago João Pedro Schmitz 2,974 -
5
votes2
answers240
viewsHow to make a sequence of boxes with the triangular border on the right, on top of the other, box with CSS?
I didn’t know a better title to describe my need, but in fact, I would like to be able to make a sequence of boxes whose right edge was in a triangular shape, superimposed on the subsequent box.…
-
5
votes2
answers193
viewsColumn that fills the screen according to width
I’m trying to do something that should be simple, but my CSS skills are lame. I would like to make a login screen with a fixed column on the right, as in the image below, but I would like the right…
cssasked 6 years ago itamarluiz 59 -
5
votes1
answer4890
viewsIs there any way to remove CSS and JS codes not used by the application?
I wonder if there are any transpilator analysing the classes and ids used in an HTML page and removes all classes and ids not used in CSS and Javascript. This would be interesting to further…
-
5
votes1
answer1030
viewsWhat is the difference between :first-Child and :first-of-type in CSS?
I was writing a line of code and I was ready to type :first-of-type to change a certain element. That’s when I got the doubt: I must use first-of-type or first-child? Since both present the same…
-
5
votes1
answer173
viewsWhat is the pseudo-class :lang for?
I’ve already turned the internet upside down and always find the same thing as on the site w3schools saying it is to set special rules for languages. I know it has to put characters around the…
cssasked 5 years, 8 months ago user139915 -
5
votes3
answers1225
viewsHow to distribute images horizontally equally within a Section element?
I have the situation below: I need the 04 images to be distributed horizontally equally within the space bounded by section, independent of the width of the browser. Not to be left empty as can be…
-
5
votes3
answers1419
viewsClicking on <li> the <a> link also work
I always have that question, look at that: I have a menu, with ul and li: <ul> <li><a href="/inicio">Inicio</a></li> <li><a…
-
5
votes2
answers37
viewsPut my email to receive the contact messages
Where I add my email to receive the contact form messages? <form name='contact-form'> <div class='fm_namer'> <input class='contact-form-name' id='ContactForm1_contact-form-name'…
-
5
votes4
answers3300
viewsHow to make Youtube embed responsive on the site, when opening want Width appear 100%
I already have several embed on my site but do not want to go there and change 1 by 1. what I want is a code to change all Iframes, with 100% width and height adjust responsively. .conteudo{…
-
5
votes5
answers47771
viewsCentralize a table (HTML)
I made a table in mine HTML, but I couldn’t center it in the middle of the screen. She’s vertical and I’ve tried putting the text-align:center but it didn’t help. td, th { padding: .7em; margin: 0;…
-
5
votes1
answer853
viewsHow to add an external source in an SVG?
I have a logo that I made in SVG, on file .svgexternal, which uses has a text with the name of the company, whose source is Open Sans Light. On my machine works normally due to the fact that I have…
-
5
votes3
answers1217
viewsFloat half of the Dropdown Menu list to another position
How to do for in the sixth cell of Dropdown menu float left as in the image example below: I tried unsuccessfully something like: <style> #main-navigation-2 .dropdown-menu :nth-child(6),…
-
5
votes2
answers1483
viewsHow to create a toggle button with input=checkbox without using the <label> element?
Is to create/transform a <input type="checkbox"> on a toggle button without needing the element <label> as in these examples: How to create a toggle on and toggle off button? An example…
-
5
votes2
answers2147
viewsZoom effect with CSS
I have a div with an image in which I applied a zoom effect and a slight rotation! but this image must zoom and rotate within the limits of the DIV without overflowing but hide the parts that exceed…
-
5
votes1
answer134
viewsLarger bass padding than defined in CSS
I have a situation where I define the padding of a div within the header with: #header_inn{ padding: 5px 2%; width: 96%; } I want them to paddings top and bottom have exact 5px, but the bottom gets…
-
5
votes1
answer574
viewsLoading animation
I have a code that makes a loading animation before starting a page. css. .preload{ position: fixed; z-index:99999; top:0; left:0; width:100%; height:100%; opacity:1; background-color:#fff;…
-
5
votes1
answer261
viewsCSS: Border Radius
I’m doing a project where I’m using the border radius to make a vertical menu. I would like the Menu to have the border Radius straight, this rounded shape : And it’s actually getting this way:…
-
5
votes3
answers190
viewsCSS catch siblings before element?
Well basically, I have the following structure, where when the hover is activated in an element, the brothers on the right must receive an exclusive style, while those on the left must receive…
-
5
votes3
answers555
viewsCreate an "opacity" on top of a <tr>
I have a dynamically generated table: I would like to create a class in CSS to make a "layer" on top, with transparency. Example: If I use the background-color, it will only change the background,…
-
5
votes2
answers544
viewsIs there any way to access a CSS value?
I’m trying to adjust a css image on my site, and I want to extend the image on the whole screen, only for that I have to assign to my image: margin-left, to correct the positioning of the screen.…
cssasked 6 years, 3 months ago Vinicius Morais 1,293 -
5
votes2
answers6999
viewsLink href to id div
Well I know we can make links by directing the click href for a page id using #. #content1, #content2, #content3, #content4 { height: 50vh; border: 1px solid red; } <a href="#content1">…
-
5
votes1
answer122
viewsIs there any way to use a "custom-attribute" as the value of a CSS property?
I would like to know if there is a possibility of using a custom-attribute of the kind data-*=" " as value for a CSS style or even use this custom date as a value for a variable in the CSS. To…
-
5
votes1
answer1383
viewsIn HTML how to increase the space between Tds without using cellspacing cellpadding?
My idea is to make a table where it has a spacing between cells, as in the image: But according to the Mozilla documentation for example, it is possible to confirm that the attributes cellspacing=""…
-
5
votes2
answers259
viewsThe UL LI losing formatting after I put it on line... Why did the "balls" of my LI disappear?
I have an unordered list <ul><li> I wish it to stay horizontal, not vertical, but when I put it to stay in line with display: inline-block my indicative "balls" are gone! Note that the…
-
5
votes2
answers215
views"Leak" text behind <th> using Sticky CSS position
I’m using position: sticky; in the <thead> of a table where I assign a background color to <th>. My intention is that, when scrolling the page, the header remains visible because the…
-
5
votes4
answers844
viewsHow to Make Material Design Style Button Only with CSS
On Android and on design system Material Design is common to see this button they call Ripple Buttom. https://material-components.github.io/material-components-web-catalog/#/Component/ripple But it…
-
5
votes1
answer98
viewsMount CSS from Image
I have the image below that shows a form HTML. I wanted to make that effect in the form but I couldn’t. Can someone help me? Follow my lead. body { font-family: 'Roboto', sans-serif;…
-
5
votes1
answer279
viewsRadar effect with CSS
I’m trying to make an animation like "radar" around an image using only CSS with @keyframes. I even managed to reach a result, except for the fact that I can not synchronize the two "waves" of the…