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
-
21
votes6
answers8730
viewsHow to create geometric shapes using CSS?
How can I make the geometric shapes below using preferably CSS? If not possible using CSS only I also accept answers with other methods.…
-
21
votes1
answer3524
viewsWhat does the asterisk in "* {}" mean in CSS?
Sometimes I take sites ready to edit and realize that the console appears: * { /* código aqui */ } What does that asterisk mean?
cssasked 7 years, 6 months ago Lucas de Carvalho 6,427 -
20
votes3
answers4043
viewsHow to add a CSS class to images that didn’t load?
I have an HTML page with numerous images presented as follows: <img alt="img1" width="50" height="120" src="my_image.jpg" /> <img alt="img2" width="50" height="120" src="another_image.jpg"…
-
20
votes2
answers791
viewsHow to do Tilt button?
I am using img but it is not a good practice, so I would like to use a button with some css attribute. It is possible?…
-
20
votes2
answers710
viewsHow could you make a Pacman by moving your mouth with pure CSS?
In order to go deeper into the CSS, I would like to know different ways of making animations. My goal is to know some new properties and features that CSS has been implementing. In the specific…
-
19
votes2
answers3101
viewsWhat does "region above the fold" mean?
On the page of google developers there are several citations to this term: "Structure your HTML to first load only critical content, from region above the fold" What would this region above the fold…
-
19
votes4
answers10808
viewsIs it possible to create a desktop application using only PHP, HTML, CSS and jQuery?
Although I know that PHP is a language for the web, I would like to know one thing. It is possible in any situation to create an application, system or application with only PHP+HTML+CSS+jQuery that…
-
19
votes4
answers1629
viewsUse color, RGB or hexa names?
In this MDN documentation I find a huge list of color names which can be used in the CSS with their respective hexadecimal values. For example: -------------------------------------- | nome em En |…
-
19
votes3
answers1712
viewsWhy is it considered wrong/bad to repeat an HTML ID?
I think the title says it all, why is it considered wrong to repeat HTML Ids? I notice a lot of people doing things like: <div id="foo">bar</div> <div id="foo">baz</div> To…
-
18
votes2
answers1120
viewsWhat is the use and when to use version in . js and . css files?
What it’s for and when to use js? v=123(example) css file? v=123(example) What benefits and how the browser interprets this
-
18
votes4
answers2297
viewsIs it correct to use a table in the page layout?
I made a data table for a colleague of mine here at work and used a table, only it had no header, it had only 2 columns. And he told me that the staff hates table, which was for me to read about…
-
18
votes1
answer4514
viewsHow does "position: Sticky" work?
The sticky is a new property value position and I read a little bit and understood that with it it is possible to create HTML elements that behave at a time like position: fixed and in another as…
-
18
votes4
answers31300
viewsHow to disable resize from textarea?
How do I disable resize of a textarea ? <textarea></textarea> I wish I couldn’t change the size of the box...…
-
18
votes2
answers429
viewsWhat is CSS Aural?
The CSS we know formats the information delivered by HTML. This information can be anything for example: image, text, video, audio or any other element created, that is, the CSS formats the…
-
18
votes3
answers1673
viewsWhen should I use the </img> tag or the background CSS property?
When should I use a tag </img> HTML to display an image? And background-image CSS? Factors such as accessibility and browser support can influence choice?…
-
18
votes2
answers2025
viewsWhat is the maximum and minimum value for z-index?
I was arguing with some friends about putting 99999 in the z-index to ensure that the element has the highest priority of overlapping over another element. But when I thought about it, I got a…
cssasked 6 years, 5 months ago Wallace Maxters 102,340 -
17
votes3
answers1314
viewsHow to get around bad rendering of a font in Internet Explorer?
I’m using a font-kit generated on Font Squirrel and am getting different results on Mac OS X and Windows environment. Would there be some way around the bad or different rendering of the Internet…
-
17
votes8
answers45427
viewsHow to disable the scroll of a web page?
I’ve been trying to disable one-page scrolling. All I have found are type solutions: #container{ overflow: hidden; } But that’s just occult scroll bar. How I would disable scrolling, even with it…
-
17
votes4
answers7742
viewsHow does grid system work?
I’m using Bootstrap in a project, but so far I do not understand how the structure of it works. It uses grids but the documentation is not very clear on how it works and how to use. I want to put…
-
17
votes3
answers4757
viewsHow do I make a Marquee without the <Marquee> tag?
I need to wear one Marquee, but as everyone is saying Marquee is a prehistoric thing and should not be used anymore, I am in doubt as to what to use in his place. On the site of MDN says this: This…
-
17
votes5
answers15911
viewsHow to make a circle in CSS without Border-Radius 100%?
I can make a circle in css with border-radius. .circle{ border-radius:100%; border:10px solid red; width:100px; height:100px; background-color:purple; } <div class="circle"></div> But I…
-
17
votes2
answers738
viewsWhy use/not use * box-Sizing?
I’ve read a lot about debates between using or not using the property box-sizing: border-box; as follows: * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } I…
-
17
votes4
answers1235
viewsDoes the order of CSS styles influence the render tree?
During the Paint from the document by the browser the order of the properties of the CSS classes may interfere in how we perceive the page’s "assembly"? Especially in slower connections, we…
-
16
votes3
answers1404
viewsHow to compare HTML elements by real z-index?
Given two arbitrary HTML elements A and B on the same page, how can I find out which one is "closest" to the user (i.e. if they overlapped, which one would obscure the other)? To css specification…
-
16
votes2
answers2406
views"margin-top" and "margin-bottom" overlapping, why?
I have three elements div: HTML <div class="wrapper"> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> CSS .box {…
-
16
votes3
answers4980
viewsWhat is the usefulness of the til operator in CSS?
When reading some codes I see that it is common to use the tilde (~) in the selector setting. Ex.: .effeckt-show.effeckt-modal-wrap ~ .effeckt-modal-overlay { ... } Code taken from Effeckt.css.…
-
16
votes1
answer8375
viewsWhat’s the difference between Less and Sass?
What is the difference of each and advantages and disadvantages?
-
16
votes4
answers3955
viewsDifferent style sheet for each page or only one?
I’m developing a website and came up with a question regarding a somewhat boring situation... When you’re developing a web project you use just one style sheet for the whole site or you make a style…
cssasked 9 years, 6 months ago Israel Sousa 1,362 -
16
votes3
answers2341
viewsGood practices using CSS
What are the best practices in CSS to maintain código limpo, compacto and manutenível? Should a simpler and less rigid form of selectors be used? (Scenario: There’s a div with an image inside)…
-
16
votes1
answer7765
viewsShow image under another with css Hover
How do I make when I hover under an image, another image appears on top with opacity... For example: I have a div with the cover image of a movie, when I move the mouse under the div, I would like…
-
16
votes1
answer880
viewsHow do >, + , ~ selectors work in CSS?
Selector + Takes the first element found after your declaration. div + p { font-size: 20px; } <div> </div> <p>Este é um paragrafo</p> <p>Este é outro…
-
16
votes3
answers4406
viewsUse @media, @media screen and or @media only screen and Have a difference?
I was wondering if there is any difference in css when using one of these media queries, Example A: @media(max-width:770px) { .texto{ color:red } } Example B: @media screen and (max-width: 770px) {…
-
16
votes2
answers319
viewsHow do CSS ignore if the attribute is capitalized or lowercase?
Imagine I have a situation where I need to style multiple links from my page, but only the links that end in .html, but I noticed that when trying to get the attribute href, I can only catch the…
-
15
votes2
answers1705
viewsHide widget if empty
I have a div which is used to display alerts to the user: <div id="page-alerts" style="margin:25px 0;"></div> Problem Example in Jsfiddle For reasons of formatting, it contains margins…
-
15
votes3
answers973
views -
15
votes1
answer17504
viewsHow to smooth the scroll of a page?
How do you make the scroll (scroll bar) of a page smooth? And if you can, how to customize it. Example: http://themenectar.com/demo/salient/blog/…
-
15
votes1
answer433
viewsWhat are logical properties in CSS?
Recently I found the concept of "logical properties in CSS". It seems to me, is a new system to create CSS in a logical way, not physical (direction and fixed positions, let’s say so). However, this…
-
15
votes2
answers567
viewsWhat would CSS Injection Attacks be? Does CSS have security holes?
I was reading a documentation from Mozilla and came across this term CSS Injection Attacks I tried to do some research, but I couldn’t get any information that would make it clear what this type of…
-
14
votes1
answer23562
viewsShow GIF while page loads
I need a GIF to stay working while the page loads. I’ve tried a few ways but none worked. And when the page loads, the Completed!. More or less as it happens on this website.…
-
14
votes1
answer7883
viewsMap of Brazil - what is the best way to do it?
I have the following map: When the customer hovers the mouse over a state, it has to change color. I thought to do several Ivs, to assemble the map. Only this will generate a problem, as the Divs…
-
14
votes3
answers4398
viewsHow to force load JS and CSS files with each new published version?
Every time I publish a new version of my web application (a multienterprise system) that has changes in JS and CSS files, some clients complain of errors and I end up finding that is the cache of…
-
14
votes4
answers14426
viewsWhat is the difference between "margin: 0 auto;" and "margin: auto;"?
As the title already says: What exactly is the difference between margin: 0 auto; and margin: auto;? margin: 0 auto; margin: auto; Why can you only use 0? What would be the unit of that 0? px? %?…
-
14
votes3
answers919
viewsHow to make a pure css spinner?
It is possible to make a spinner with pure CSS, without Javascript ? <div class="main spinner"> O que é Lorem Ipsum? Lorem Ipsum é simplesmente uma simulação de texto da indústria tipográfica…
-
14
votes2
answers1129
viewsWhat is the purpose and how to use the "display: Contents" of the CSS?
I recently saw that there is a new kind of display in the CSS the display: contents, but I didn’t quite understand the intention of using it? https://developer.mozilla.org/en-US/docs/Web/CSS/display…
-
13
votes1
answer865
viewsHow do I increase the brightness of an element with Javascript/jQuery?
On my page I have several elements with different background colors. I wonder how I could do to when clicking a button increase the brightness of the color, make it lighter. It is possible to do…
-
13
votes3
answers14931
viewsHow to style <select> tag
How do I style the tag select, like that arrow at the end of the field. The pseudo-classes :hover, :focus, work with this element?
-
13
votes3
answers4991
viewsBack to Top of page
I need to have a fixed icon on the page in the right corner below the screen. By clicking this icon he goes back to the top of the page, doing the Scroll scroll to the top of the page. Could someone…
-
13
votes4
answers2383
viewsMore important than important
My style sheets declare formatting for a class more or less like this: .foo div label { width: 100px !important; } This comes from a plugin. I would not like to change the plugin’s style sheets, but…
cssasked 10 years, 1 month ago Oralista de Sistemas 23,115 -
13
votes4
answers2486
viewsHow to make this arrow in CSS
I have this next arrow in a layout, but I don’t want to make an image, but only with CSS. How do I do? I have to wear edges?…
cssasked 10 years ago Felipe Viero Goulart 3,693 -
13
votes3
answers13657
viewsHow to make a column occupy the rest of the available space?
I would like to put two blocks inside a div of parallel size, one with fixed size, and the other that fits exactly in the remaining space. For example : div#container { width: 50%; /* este tamanho…