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
-
7
votes3
answers14141
viewsFix first row table
I need to fix the first line of my table always at the top of the page. I have read several questions about this same problem, but I could not solve... My code: <table border="2px"> <tr…
-
7
votes2
answers579
viewsIs it possible to use stylesheet in an app?
I’m starting a development in Eclipse, however the style is very ugly, borders, letters etc. You can use CSS on Android?
-
7
votes2
answers4809
viewsHow to leave a text centered between two horizontal lines?
I need to use text centered on the page and between two horizontal lines in all project titles, as below: The title text has magin: 0 35px, is dynamic and horizontal lines shall increase or decrease…
-
7
votes1
answer3635
viewsHas Marquee been discontinued in HTML5?
If yes, what the tag that I can use to enjoy its functions? How can I limit the beginning and its end, for example: When using the tag Marquee, in the transition of images or texts there is always a…
-
7
votes1
answer2407
viewsHow to increase select with css proportionally
I have on a page in select that shows the stores that I have registered in my BD, I got a css that changed the layout of the same leaving it more pleasant, but I have a problem, I need this select…
cssasked 10 years, 2 months ago adventistapr 5,498 -
7
votes2
answers284
viewsProblem with Nth-Child
I have the following scenario: HTML: <div class='linha visivel'>Visivel</div> <div class='linha visivel'>Visivel</div> <div class='linha oculto'…
cssasked 10 years, 2 months ago Joao Paulo 11,760 -
7
votes1
answer2355
viewsFloating banner sidebar with Jquery accompanies scroll
is the following.. i have a floating banner on my blog using the following JS $(function(){ var jElement = $('.element'); $(window).scroll(function(){ if ( $(this).scrollTop() > 2000 ){…
-
7
votes1
answer5624
viewsChange selected item color - select > option
I got the following select. It is possible to change his blue color to one I want to apply, red for example?…
-
7
votes3
answers23448
viewsFooter "glued" at the bottom of the page and responsive (variable height - using bootstrap)
I’ve been following similar issues here on stackoverflow and other web sites, in addition to tutorials on the internet, but the vast majority of solutions do not work as I need, or even are…
-
7
votes3
answers13303
viewsStar voting with radio input, javascript/css
I am creating a registration form, in it I will insert a voting system, I wanted to do that when clicking on some star, the previous ones will change color too. (Follows the code I created) <div…
-
7
votes2
answers1906
viewsHow to leave a responsive . svg image inserted directly into html
I have an image of the map of Brazil in svg all mapped and when resizing my page the same does not follow this resizing, I have read some articles and tried some solutions and in none of them I was…
-
7
votes3
answers2716
viewsChange class with javascript when resizing the screen
I need a javascript code to change the class menu for the class responsivemenu when the screen resolution is less than 750px.
-
7
votes2
answers2249
viewsWhat is the purpose of the pseudo-elements "::before" and "::after"?
I find many codes that use these pseudo-elements and I "fly" when I see them. The few tutorials I found on the Internet did not explain clearly and I was left with more doubts. After all, what is…
-
7
votes1
answer1164
viewsDropdown containing image on the right
I am using Bootstrap to make a bar at the top of the page, and I have a problem: What I need is to open the dropdown, have a list of options, and an image next to it that always has the same size of…
-
7
votes4
answers2128
viewsHow to create a custom context menu?
When right-clicking on certain areas of the page appears the Popup browser default: I’d like to show my own Popups customized! It is possible to intercept the click and open a different menu? Note:…
-
7
votes1
answer234
viewsMy CSS file is very large and it is difficult to maintain readability
My CSS File is close to 10,000 lines. It’s getting too complicated to maintain this file. in its Development version the file "weighs" 170kb and in its minified version, "only" 128kb Some points to…
-
7
votes3
answers212
viewsWhat Does This CSS Code Do ?
This is looking at some snippets of code on the Internet for a deeper learning of CSS, and I saw this code contained in a menu and I would like to know its functionality. .nav:before, .nav:after {…
-
7
votes1
answer150
viewsWhat are the rules for building an HTML email?
I’m about to build an HTML email, but I see there are differences for a common website page. I want the HTML email to have css and appear both on desktop access and tablet and mobile, and should…
-
7
votes3
answers4002
viewsDiv one on top of the other
I have a sequence of Divs being generated by a script. I would like them to be below each other and when I reached the maximum height of the father, they would enter the side . Currently putting…
cssasked 9 years, 6 months ago Pedro Augusto 2,392 -
7
votes3
answers1977
viewsHow to attach events to dynamically created elements and pass parameters?
I have a table that is generated via ajax and a certain column generates a link. As it has been implemented, currently, it writes a code html with javascript intrusive. Something like below: return…
-
7
votes2
answers455
viewsFont Responsiva
I’m making a theme for wordpress and put the font with the size of 5em what’s around 80px, but when I test on my cell phone with 320px wide, the font gets broken and ugly, I wanted something that…
-
7
votes1
answer4727
viewsHow to display asterisk in fields with required css?
I have a form with some required fields and some not. How can I automatically insert an asterisk on the label of each field with required through css? <div class="form-group col-md-4">…
-
7
votes1
answer259
viewsHide Divs with similar ID
I have several tags div with the similar id, they all start with cn-, example: <div id="cn-name">...</div> <div id="cn-email">...</div> <div…
-
7
votes2
answers5915
viewsHow to leave a span in the center of a div both vertically and horizontally
I have a text that I wish to manipulate with effect, but I need the structure of it to be correct. The structure I need to do, is that each letter is exactly in the middle of a div (a div for each…
-
7
votes1
answer118
viewsHow to use the first-Child selector for a specific class
Hello, I have several Ivs and some of them have a 'test' class, I would like the first-Hild selector to highlight only the first DIV that has the 'test' class, but it only works if the 'test' class…
-
7
votes2
answers8300
viewsHow to create a toggle on and toggle off button?
I have seen that in some registers, they are using the button a lot toggle. Someone would know how to do it?…
-
7
votes2
answers544
viewsdot width index 100%
In CSS you can do an index equal to Word by picking 100% of the container width and using dots to separate the "title" from the "page number"? Type: Introduction - - - - - - - - - - - - - - - - - -…
cssasked 8 years, 5 months ago Nilson Rodrigues 83 -
7
votes3
answers1464
viewsHow to change the text of a link after clicked?
How do I do in HTML (or CSS if you have how) the text of a link where it is written "show more" change to "show less" and vice versa after clicked?
-
7
votes2
answers216
viewsMenu Centralized
I’m having many difficulties to align the text from my menu to the center, I’m now starting to learn how to develop websites. Screenshot: The code is like this: <center> <h1>Meu…
-
7
votes4
answers18311
viewsHow to flip (mirror/flip) an image
Well, I need to invert an image preferably if possible with CSS. I don’t know if it’s possible. I wanted to point the arrow to the left. Thank you…
-
7
votes1
answer171
viewsElement Rotation With Arrow
As you see in this image, inside the dark gray ball is a number. It’s 100. That means the pointer has to hit 100. If it’s 0, it has to be in the middle of the pointer. The issue is that this value…
-
7
votes3
answers590
viewsNever use inline styles is never really?
For example the tag canvas: I saw some tutorials on Youtube, and almost all of them used it like this: <canvas height="" width=""></canvas>. Then I should use it in HTML, inline, as…
-
7
votes4
answers2632
viewsWhat is the equivalent of CSS media queries in Javascript?
When I want to apply certain style according to screen size, I usually use CSS media queries. Example: @media only screen and (max-width : 768px) { .container { width:960px; } } I wonder if in…
-
7
votes3
answers1368
viewsHow to make a burger menu open from right to left?
I have a menu hamburguer which opens from left to right however, I would like it to open backwards, from right to left, as I do this? Next down my code: /* * Open the drawer when the menu ison is…
-
7
votes1
answer126
viewsWhy are the padding and margin properties calculated in relation to the width of the parent element?
The declared percentage values are calculated, for the four sides, relative to the width (width) of the parent element. See the following HTML: <div class="pai"> <div…
cssasked 8 years, 4 months ago Filipe Moraes 8,737 -
7
votes2
answers542
viewsMove div while hovering
How I create the effect similar to this site: http://www.amgrconstrucoes.com.br/lancamento When passing the mouse over the div that contains the image of the enterprise appears another div on it by…
-
7
votes2
answers56156
viewsHow to center all content of a div - Bootstrap
Hello. I am learning how to use the bootstrap. In my studies I had a question. If there’s any way to centralize the entire contents of a div. I have sample codes... <!DOCTYPE html>…
-
7
votes2
answers310
viewsFloat vs. inline-block. What are the advantages and disadvantages of each?
I would like to know the advantages and disadvantages of using the properties float and display with the value inline-block. I know that both work to align elements, but I try to know the pros and…
-
7
votes3
answers1068
viewsHow to implement a "scroll Hijacking"
I have noticed in several modern pages a scroll behavior that goes up to certain interest part of the content, researching, I found that this type of behavior is called "Hijacking". The term…
-
7
votes3
answers340
viewsPosition caption above div
I am using the bootstrap Carousel with caption. Between the slide image and the caption there is a div with the image of an orange triangle. I need the caption to be above the triangle. I’ve used…
-
7
votes3
answers1969
viewsWhat’s the difference of using background to background-color?
I have that code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta…
cssasked 5 years, 9 months ago Dom Domdomdom 192 -
7
votes1
answer82
viewsHow important is it really to validate codes by W3C?
I understand that validating code can be important and mainly help those who are starting to correct errors and be more informed about obsolete elements in current language versions. But how much…
-
7
votes6
answers1015
viewsHow could I highlight the radio button that is selected?
I own this radio group which serves to specify the severity level of a given occurrence, using the colors to classify the level. Behold: <html lang="en"> <head> <meta…
-
7
votes1
answer3418
viewsphoto album with HTML and CSS
I have a folder on the site called PHOTOS , by clicking on the folder PHOTOS I thought I’d put several < article > splitting each photo album type: < article > album de fotos 01 <…
-
7
votes1
answer132
viewsHow to prevent pseudo-element (:before or ::after) within a <a> tag from being clickable?
Is there any way to prevent pseudo-element ::after or ::before one-link <a> become part of the link itself? My idea was to use one ::after in a link tag <a>, that ::after would be used…
-
7
votes1
answer570
viewsHow to prevent an Input Required from starting with the CSS style :invalid
When I have a input required that has some CSS style when it is :invalid, even before the user interacts with the input it is already stylized as invalid. How can I avoid this? Take the example:…
-
7
votes1
answer1825
viewsIs there any way to bend a text with CSS or leave the text curved in a row?
Is there any way to put a text in this format without using an image? Or I’d like to do a kind of curved text, but I couldn’t do it. The idea would be to do something close to this image, but only…
-
7
votes1
answer399
viewsHow do you make Scroll center on the elements inside the container?
Imagine that I have an image gallery that is inside a container. But each image in the gallery has a size according to the image: What I’d like to do is a snap, so that at the time of scroll at a…
-
7
votes2
answers672
viewsHow to make a reflected text with CSS ? (like a mirrored text)
I would like to make a reflected text effect or mirrored text effect with CSS only Like this picture: Does anyone have any hints, or knows if it is possible to make this effect mirrored only with…
-
7
votes1
answer481
viewsIn CSS, how do I align Numbers with Text in Classic Fonts?
I’m wearing a Font-Face that has the old typographical style in the numerals is want to align them with the text. Note that the numbers of this source follow the old pattern, where the digit is…