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
-
9
votes2
answers3677
viewsHow to disable mouse scroll button?
I would like to know how to disable the central button of mouse who has the scroll? I don’t want to take the scroll just the button of scroll of mouse that features arrow to left up and down when…
-
9
votes4
answers455
viewsIs it appropriate to create a`CSS Sprite` with disparate images?
It is appropriate to create a CSS Sprite with images of different dimensions? Because I have exactly 20 images where their height and width are limited: Maximum image height is 60px; Maximum width…
-
9
votes2
answers5484
viewsApply css to all elements except some specific ones
How to apply padding to all a. button except those who have a span, I don’t know how to do it, but an example: a.button:not(span)
-
9
votes2
answers1164
viewsWhat are the differences between the "vw", "em" and "%" font sizes?
I’m having second thoughts about using the size units vw, em, %. Searching the Internet I always saw that some used some units of size, but I never really understood the difference between them. For…
-
9
votes2
answers392
viewsHow to make lines intersecting on an edge, with CSS?
someone knows how to make an edge that "leaks" out of the div just like in the picture? need this cross border of the lower corners , these "xiszinhos" or "cruzinhas" Thanks in advance…
cssasked 8 years, 7 months ago Alex Martins 103 -
9
votes2
answers203
viewsWhat does the "/" bar on the border-Radius mean?
In CSS, we have the attribute border-radius. Generally the use of the following forms: border-radius:10px; border-radius:10px 20px 20px 10px; But I came across the following code one of these days…
cssasked 8 years, 11 months ago Wallace Maxters 102,340 -
9
votes1
answer5066
viewshow to use last-Child for the penultimate as well?
I want to make a selection with css for last and penultimate item. I know I can use the dial last-child to the last, but the penultimate? how do I?
-
9
votes3
answers4722
viewsHow to make a border lower than 1px?
Can I make a border with CSS lower than 1px? Because in my layout it got too thick.
-
9
votes2
answers300
viewsIs it possible to do this effect with CSS?
Indeed demonstrated in the video below Sony Spherize makes it seem as if the photo character is "breathing", there is some way to do it the same, or simulate something similar to CSS? Link to the…
-
9
votes3
answers4539
viewsForce client-side update after site update
The scenario of my problem is this, I have a website that has been updated, but some customers are reporting that the update was not made for them, which are still in the old model of the site…
-
9
votes2
answers423
viewsAll property in CSS. What is it for and how does it work?
I was looking at the CSS properties and met the all, I just found her a little confused. I know it has 4 states. It is them: initial, inherit, revert and unset. But I don’t understand exactly how…
cssasked 6 years, 1 month ago João Pedro Schmitz 2,974 -
9
votes4
answers2928
viewsUppercase HTML vs CSS
I’d like to know the difference between using text-transform: uppercase in CSS and use uppercase letters directly in HTML. Is there any difference between the two? Which is the most recommended?…
-
9
votes2
answers211
views -
9
votes3
answers291
viewsIs it correct to write CSS with Javascript?
I see a focus on javascript frameworks, to write the css directly in javascript, example... new Vue({ el : "#style", data : { ctn : { display: "flex", alignItems: "center", justifyContent: "center",…
-
9
votes3
answers412
viewsHow to make a DIV with a crossed text. Type a text passing through a DIV
Is there any way to transpose a text div, like coming in from one side and coming out from the other? My idea would be something like these images. Where the text starts on one side and goes through…
-
9
votes1
answer205
viewsHow to make the button outline follow the curvature of the elements?
I know that the outline is very important for usability and especially for the accessibility of the page, including here is a very interesting Webaim article about it:…
-
9
votes2
answers687
viewsHow to make an Animation in CSS with drag effect. Place Blur in motion
I’m willing to put one loader animated in CSS with @keyframes on a page, but I would like to put a "drag effect" on it as if it gave a "blur" with a trace of Blur following the element when it…
-
9
votes2
answers813
viewsDraw circle in Html5
I’d like to draw that circle But that’s all I got here yet function draw() { var canvas = document.getElementById('circle'); if (canvas.getContext) { var ctx = canvas.getContext('2d'); var X =…
-
9
votes1
answer390
viewsHow does CSS media query prefers-color-Scheme work?
From what I understand, it can be used to apply different styles according to user preferences. .light, .dark { display: none; } @media (prefers-color-scheme: dark) { .dark { display: block; } }…
-
9
votes1
answer181
viewsCSS writing methodology using : in class name ( Tailwind CSS )
I know there are a multitude of CSS frameworks (Bootstrap, Materialize, Skeleton, Bulma, Foundation), as well as a multitude of methodologies for writing CSS (BEM, DRY, ITCSS, OOCSS) But I was doing…
-
8
votes2
answers570
viewsHandle 1-pixel edge to avoid double edge (1+1 pixels) with side-by-side elements
I have a grid created with a list ul whose internal elements to li contains a border. The idea is that when the elements are side by side the edges are manipulated so that only a single stroke with…
-
8
votes1
answer655
viewsProblem with printing HTML elements on the screen
I’m making a software (minigame) that works with a deck. In the administrative panel of the same I need to view and consult the game deck. I perform a query in the database and, with the results…
-
8
votes2
answers579
viewsWhy does setting a CSS property with the ! attribute not work in the . css() method?
I would like to know the real reason for the disability that the function jQuery.css() has, which would be the fact that when using the attribute !important in any assigned CSS property, the same is…
-
8
votes3
answers2494
viewsTable css type excel
I am creating a table for insertion/query of data that is the closest to the format of an excel sheet. My table: Problem: As the image above shows, when placing a input in a td, it does not occupy…
-
8
votes2
answers130
viewsDoubt about @media
made the front-end of a site, in which its main layout was at 1920px and I am adapting to other screens, using: @media (min-width: 0px) and (max-width: 1920px) {} I saw that in IE8 is not working,…
-
8
votes2
answers278
viewsHow to remove bug from antialising lines generated in Firefox and IE?
I’m creating a border on my website, with background image. Everything works perfectly in Chrome, but in Firefox and IE appear some unwanted lines. I have noticed that they are present in the CSS3…
-
8
votes2
answers14618
viewsSelect styling via CSS
I need to stylize the text inside the select, how to leave centered, put margins. I’m putting the class name more option and putting what I desire, but it is not working. I did so: HTML <h3…
-
8
votes2
answers27342
viewsSubmit form with <a href=""> instead of <input="Submit">
I was given a layout of a form: <form method="post" action="" id="mail_form"> <div id="newsletter"> <input type="text" name="email_newsletter" /> <div class="newslink">…
-
8
votes1
answer279
viewsHow to view/hide content from a page according to the "HTTP status" of the site?
I have the following problem... Scenario: A site with HTML-only pages (we cannot use a server-side language). We embed video from Youtube, but some companies, as we know, block their employees'…
-
8
votes4
answers2040
viewsProblem with height of Ivs that do not accompany each other’s content
I have a problem that I think is easy, but I can not understand how to solve. I have a structure like: <div class="conteudo"> <div class="esquerda"> </div> <div…
-
8
votes4
answers47612
viewsPin the footer of an html page and follow the page content
I need to pin the tag footer at the end of the html page, but when the content exceeds the page by tag footer should follow the content and not be fixed. See the CSS code is the HTML code I’m using…
-
8
votes1
answer14926
viewsPointed Buttons and Text Balloons
I would like to know some alternatives to use some button'custom s and also the famous text balloon. Currently I use a <div id="container-button"></div> that inside has the <span…
-
8
votes5
answers35403
viewsHow to align a footer element always at the bottom of the page?
I have a page on which there’s a div with various contents inside, which are modified according to the user’s wish. Below there is another div who is the Footer. In case I put one position:…
-
8
votes3
answers44043
viewsHow to put icon inside input using Font Awesome?
I’m trying to make a search field with an icon using Font Awesome, I want it to look like this: but he gets like this: What is the best way to put the button within the input? HTML: <form>…
-
8
votes2
answers390
viewsCan Missing semicolons in CSS and Javascript influence how code works?
I always leave my css code and javascript minified but had never noticed the output generated. Well, I noticed that the last rule of a selector (in css) and the last function (in javascript) always…
-
8
votes6
answers14224
viewsDistribute list of <li> in two columns
I’m trying to create a list with 4 blocks, but they don’t align side-by-side correctly, they’re like this: I wish they’d stay that way: HTML: <li></li> <li></li>…
-
8
votes1
answer1089
viewsdir, html or css attribute
The attribute dir is usually omitted for languages LTR (default) and used for RTL - which are written from right to left (Arabic and related), for the purpose of changing direction, but found…
-
8
votes4
answers19339
viewsHow to go to a link by clicking on a div without using <a href>
I need to redirect the page to a link specific by clicking on a div, without using the <a href> of HTML. I’m using HTML, CSS and jQuery and PHP. Follows an excerpt from the code: <div…
-
8
votes4
answers24849
viewsCSS DIV diagonal
I recently received a layout to develop, in which I have a specific part that I can not do, I need a div that is inclined, as in the example, more than its text flows normally, the text is not…
-
8
votes1
answer291
viewsHow to apply ! Important to a property with multiple values
I’m having some difficulties with the precedence of CSS selectors to create a dynamic background (image transition.) in the first/div section presented on the site. I currently have the following…
-
8
votes1
answer620
viewsHow to center a binary tree?
I need to correctly center this binary tree model. jQuery or JavaScript can be used. I’ll need to generate the code with PHP, then you have to have a certain logic in html. Another detail is that…
-
8
votes2
answers938
viewsCSS or Jquery for animation
When it comes to animation, which one should I use? Which one is the lightest? It is possible to do the same animations both in one and the other?
-
8
votes3
answers2534
viewsWhy doesn’t the height accept percentage?
I created this Fiddle as a test. Wanting me to have the screen split half green, half red, why is it on the property height I put the value followed by "%" to div disappears? Being here saying you…
-
8
votes2
answers6972
viewsLeave two Divs always at the same height
I’m using bootstrap, I’ve tried using display:table-cell and display:cell in divs children, however, nothing worked, I have two divs, and both have dynamic content, but I need the two always stay…
-
8
votes1
answer837
viewsWhat’s the difference between css and javascript animations?
Lately I’ve been studying some animations with CSS. However, researching more on the subject, I ended up verifying that it is possible to make animations also with javascript. What’s the difference?…
-
8
votes3
answers311
viewsHow to use a different logo if the pattern does not exist?
I would like to know if there is a solution to the following problem, if there is a logo_enterprise image to consider it and apply it to css, if there is no logo_default, that way I could control…
-
8
votes1
answer147
viewsShould license comments on CSS or Javascript files be maintained or not?
This question arises when I finalize a mechanism to realize a Bundle of CSS and JS files with consequent cache. In many projects we all use mechanisms that allow reducing the size of CSS and JS…
-
8
votes5
answers1153
viewsIf the image is large vertically, height: 100%, if it is large horizontally, width: 100%?
I have a question, as I do to insert images with different sizes inside a div, and if the image is too large vertically, it stays with height:100%, and if it is very large horizontally with…
-
8
votes2
answers17280
viewsHow to crop an image - HTML
I need to make an image inside a div be with a width of 600px and a time of 300px without distorting the image. I have a notion about css3 and Html5 and am working on the layout of a blog on the…
-
8
votes2
answers1988
viewsCSS Reset or Normalize?
I heard about the CSS reset and I am also aware of the Normalize CSS which is a kind of reset for browsers to render basic CSS in a standardized way. Looking for the best solution in CSS, I…