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
-
3
votes1
answer81
viewsHow to run a Javascript Hide from one side of the page to the other:
Sorry for the confusing question, I’ll try to explain it better: I’m making a website, and I’ve used pages that take up the entire screen, and center the content, one below the other. There is also…
-
3
votes1
answer338
viewsProblems with the font-face
I’m finalizing a website using Twitter-Bootstrap. I’m using the @font-face right in the css style. and I’m pulling the font-family also in the css style., in div footer and applying directly to…
-
3
votes2
answers226
viewsHTML5 Dynamic Drawer
Good morning! I rode several blocks with a div that through Javascript, it interacts as if it were opening a drawer (block) with a click and closing it with two clicks through a function. But when…
-
3
votes2
answers278
viewsChange the size of a chart with JS
I have the following chart: window.onload = function() { var can = document.getElementById('canvas'), spanProcent = document.getElementById('procent'), c = can.getContext('2d'); var posX = can.width…
-
3
votes1
answer648
viewsIn Flexbox why does Justify-self not work on the children of a parent with display:flex?
I have a question about flexbox and individual child alignments. I wonder why the justify-self does not work when applied on the child of a parent with flex, however the align-self works normally...…
-
3
votes1
answer113
viewsDoes my Select custom with Fontawesome not open when you click the arrow?
I made that select customized using FontAwesome, but it doesn’t open when you click on the arrow. Follows code referring to image above: .x { width: 50%; background-color: #fefefe; border-radius:…
-
3
votes3
answers228
viewsHow to move a cursor as user type?
I’m creating a web game where a user types a code in HTML and the result is shown beside. I want to change the cursor that appears in the text area or make it look like a rectangle (like the Linux…
-
3
votes1
answer877
viewsPaging with Owl Carousel
I’m trying to do with a pagination format with Owl Carousel, I did as per this answer, but I couldn’t get past it. <link rel="stylesheet" type="text/css"…
-
3
votes1
answer320
viewsHow to align the content of a Nav Bar so that it is in the center of the screen?
I have a Nav bar that I need to put your content in the center of the screen, I’ve tried several codes but it always stays to the left, follow my current code <nav class="navbar navbar-inverse…
-
3
votes2
answers94
viewsJquery event in the first input runs on all others
Hello, I have a problem with inputs, see the code below: // fixar descrição do campo var campo = $('.campo-formulario'); var descricao = $('.descricao-campo'); campo.on('input',function(){…
-
3
votes1
answer58
viewsRotate spans in the LI
I have the code down that works normally. But it contains a flaw. If you’ll notice, the first and the third div’s are without class. Does that mean that don’t want rotate your spans. But, not…
-
3
votes1
answer220
viewsHelp with centering grid items
I cannot vertically center my grid items in the middle of the div #grid-container. The funny thing about Justify-items:center; works ! however align-items:center; Not =( #grid-container{ width: 50%;…
-
3
votes1
answer2422
viewsHow to move a button in CSS?
Good morning! I am facing problems with positioning a CSS button. I wanted to move each of these four buttons to a specific side, but I don’t know how. .button { background-color: #4CAF50; /* Green…
-
3
votes2
answers186
viewsHow to place zigzag edge on an image using css?
I would like to add a zig-zag edge transparent for images on my website. In this image I made a mere demo in Photoshop: Note: the pink border of the image I want it to be transparent. For now this…
-
3
votes2
answers688
viewsCreation of buttons with bootstrap
I need to create buttons with the bootstrap style similar to the image below. You can find the buttons: https://fontawesome.com/ However I can arrive only in this result: I use the following code:…
-
3
votes1
answer616
viewsTextarea with lines of text size
Can you help me? I have a Javascript function that increases the textarea size as we type the text and give ENTER. So far, everything ok. However, when pulling this information from the database,…
-
3
votes2
answers1765
viewsPosition an image correctly within a div
Good morning, I’m trying to solve a problem: I have a circular div and when I insert an image it gets cropped: html <div class="side-menu-user-info"> <div class="side-menu-user-photo">…
-
3
votes2
answers90
viewsVertical alignment of a div
Hello, I’m mounting a screen that for now is as follows: However, for this "vertical alignment" this div is, I am using a margin-top with percentage to help, but I believe that is not the right way…
-
3
votes1
answer90
viewsposition Fixed only horizontal
I’m having a question, I was wondering if it’s possible to leave my div with position: fixed only horizontally and vertically... It’s possible to do that? .body{ height: 1500px; width: 1500px;…
cssasked 5 years, 7 months ago OtavioCapel 1,513 -
3
votes1
answer1038
viewsHow to insert this "burger" menu into my already made retractable menu
I’m having trouble inserting an animated hamburger side menu on my already ready site. I have the base of a site with a fixed header and a retractable menu that opens laterally, and the icon to open…
-
3
votes1
answer864
viewsChange the position of text only in html
I would like to do something like a media screen in html, I would like on the phone the button to appear the filters appear below the whistle but not on computer, how can I do this? CELL PHONE:…
-
3
votes1
answer389
viewsGeometric shape with css
I have researched on the subject, but I don’t know much about css and I’m having doubts about how to make this way. One of the ways I found it was this way HTML and CSS .coracao { position:…
-
3
votes2
answers851
viewsKeep changing font color with CSS only
I have this link that shows/hides the menu of the site, I want to draw the attention of the users for it changing the color of the font, it is possible to do only with CSS? setInterval(function(){…
-
3
votes1
answer1548
viewsHow do I place Text inside a Shape made with CSS? Is it possible to place text inside a circle?
I know CSS evolves slowly, but I’ve seen a lot of new things out there, especially with the more modern browsers that accept very new properties. My question is whether there is already any way to…
-
3
votes3
answers93
viewsAlignment of photons
I’m trying to align my form this way: But I can’t get the inputs Yes and No to line up on the right. I tried to use bootstrap and split it into cols but unsuccessfully as well. Follows html and css…
-
3
votes1
answer47
viewsWhat is the difference between 'CSS Filter Effects' and 'CSS filter() Function'?
I’m researching about browser support for the property filter of CSS and the tag <filter> of SVG. My search link: https://caniuse.com/#search=filter What’s the difference between CSS Filter…
-
3
votes2
answers83
viewsFit li:Dropdown Menu
I got a CSS code from Dropdown Menu and I’m adapting it. So far it has worked but has a problem for now. When you mouse one of the main links, a dropdown menu appears below, with the red color and a…
-
3
votes1
answer618
viewsBootstrap div navbar overlay image
I need to put the logo of a company on the navbar div of Bootstrap, making the half stay on this div and the other half off (gray part) and follow the top when the user descends the screen. Look at:…
-
3
votes1
answer195
viewsReturn element to initial position in Hover css
I am making an animation in a logo, where each letter goes to one side and when I pass the mouse in the div where it is, all the letters must return to the initial value, thus forming the logo. So…
-
3
votes1
answer46
viewsCan someone help me get on board?
function Somar() { var somaN1 = window.document.querySelector('input#somaN1') var somaN2 = window.document.querySelector('input#somaN2') var somaRes = window.document.querySelector('span#somaRes')…
-
3
votes1
answer54
viewsMultiple Choice Fade Effect Quiz
In a multiple choice questionnaire (options 1 to 10), I’m trying to make the effect that the question gets low opacity at first, but when it receives the Focus or click, regardless of the question,…
-
3
votes2
answers255
viewsHow to make a horizontal line between two <td>?
I have a <table> divided into two columns, and I need that in the vertical middle of each column have a line starting from the <td> from the left to the <td> right, in this format:…
-
3
votes1
answer164
viewsHow to center one div under another, exceeding the limit of the first?
Hello, I’m learning about CSS3 and I’m trying to center one div underneath the other so it’s more or less like this: Yet mine has remained so: I tried using margin-bottom: -150px It didn’t work. And…
-
3
votes3
answers65
viewsvertical menu with select
Could someone give me a north on how to display a vertical menu when the first items select is selected, I’m doing it in a very crude way, as they will notice that I put margin-top to move the…
-
3
votes1
answer746
viewsHow to Dropdown Menu Overlay Div Content
I am trying to make a Dropdown Menu, the problem is that I would like this menu to overlap the contents of the div. I have tried using the position: absolute, works, Entering the div of the dropdown…
-
3
votes2
answers211
viewsChild element exceeding parent element
I have a child element that is mounted dynamically, the contents of this element can sometimes be long, it makes such element exceed the parent as in the following example: Parent Element: margin:…
cssasked 5 years, 2 months ago Victor Henrique 111 -
3
votes3
answers57
viewsHow to make the text inside the button not be tilted?
<!doctype html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta…
-
3
votes1
answer53
viewsHow do the width and height of an element start from the center and expand to the left and right?
<!doctype html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta…
-
3
votes1
answer1037
viewsLoad HTML file into another HTML file
I have a file index.html: <body> <div class="application"> <header class="header"></header> <main class="content"></main> <footer…
-
3
votes1
answer122
viewsHow to avoid distortion of pixels in HTML elements in various screen/screen settings?
I noticed in a simple situation that elements with pixel are not always rendered as you imagine, a simple example is when one adjusts the browser zoom to more or less than 100%, making it appear…
-
3
votes4
answers5284
viewsHow to center the elements within a div?
I’m trying to align the elements that are three circles with their respective descriptions within my div center using the following class: .center { margin:auto; } However, I did not succeed in this…
-
3
votes3
answers986
views -
3
votes1
answer65
viewsMessage from the validate datetimepicker
Good morning, everyone, I’m having a problem with my form validate() with the datetimepicker in a modal, the message is showing up to the right of the input and before the button, I need it to…
-
3
votes1
answer59
viewsIs there any way to style the resize button?
Example: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">…
-
3
votes1
answer41
viewsWhat does it mean and how to use the value (Number)n+(Number) in the Nth-Child() property?
I’ve seen several examples using the property nth-child() with values such as a number to select a particular element or select even and odd elements with values even and odd, but I saw that you can…
-
3
votes1
answer88
viewsHow does it work and how do I use the Aspect-ratio property?
I don’t know how this property works or how to use it because I’ve tried to research more about it and only found two sites that mentions a little bit about it: CSS Tricks Smashing magazine But in…
cssasked 4 years, 9 months ago joão batista 161 -
3
votes0
answers122
viewsHow to add/remove shadows from an element with "position: Sticky" as scrolled?
I made a table with the header and the last fixed column using position: sticky. To give an impression that it is above other columns/rows, I used box-shadow, but it gets weird to leave the…
-
3
votes1
answer119
viewsCSS: Shading of "triangle" created using ::after
I created a box by css and created a "triangle" using ::after to give that effect of the top bigger than the bottom, just to improve the same aesthetics.. I simplified the code to study character:…
-
3
votes1
answer56
viewsCreate bar with CSS
A client asked to create a menu based on the image below: How could I make these bars with CSS? I’m using Bootstrap for development. <div class="collapse navbar-collapse"…
cssasked 4 years, 3 months ago user24136 -
3
votes2
answers59
viewsWith CSS is there any way to put opacity in the currentColor?
I’m trying to do the box-shadow inherit the shade color in a "dynamic" way, taking the color set in the color through the currentColor. So far so good, only the color is "solid", I’m not being able…