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
-
2
votes1
answer38
viewsI can’t make the log button
I’m not getting the record button the way I want it. I have my normal login button but when I click on the register it gives the same login fields. It also has a bit of Javascript. <!---- Botão…
-
2
votes2
answers276
viewsLine break control does not work "white-space: nowrap:"
I don’t know where I’m going wrong, but at 5° numerical sequence bar, you don’t want to line up linear, even if you give it a float:left; and a "nowrap" because I want to add a lower scroll bar to…
-
2
votes1
answer31
viewsScreen fit is not doing its function "@media screen and() { }"
The screen fit is not responding to the defined attributes, it seems to be right, but the width and height of the object when the browser screen is reduced in (max-width:400px) it has no effect,…
-
2
votes1
answer152
viewsHow to use a Google font when printing?
I’m using this source: <link href="https://fonts.googleapis.com/css?family=Meie+Script" rel="stylesheet"> font-family: 'Meie Script', cursive; It works normally on the page. But when printing…
-
2
votes1
answer63
viewsEdit an image through a content:url ( )' attribute of the ::after tag
I added an image url to a content:url(); however, I intend to edit the size of this image, straight from the tag. sub::after, after adding a 'width:;' the image continues to the same size, as I do…
-
2
votes2
answers225
viewsCenter text according to length
I’m having difficulty putting together a logic, where will write the user name on a certificate. In order to always leave centered according to the length of the name, I have to keep adjusting to…
-
2
votes1
answer307
viewsHow to make my menu work on all pages
In my system, I have a menu, which works perfectly, but I’m trying to include a dropdown, with more links, the dropdown works only when I’m on the menu page, when I’m on other pages, the dropdown…
-
2
votes1
answer92
viewsDrop-down menu with bootstrap
I’m studying bootstrap. Precisely, a menu. and I was confused because it is not repeating the dropdown again. However only in 1 "LI" specific. Thank you! CSS HTML: <div id="sidebar-nav"…
-
2
votes2
answers77
viewsFloat:; not working CSS
I intend to align these blocks in a horizontal line, but the use of the float:; is not meeting the expected, what mistake I am making? .fl > div{ float:left; } div:nth-child(1){…
-
2
votes1
answer72
viewsMedia queries not applying the css according to device width
I’m trying to create a responsive layout. Some elements he’s applying css as quoted in media queries, some others are picking up web css. How can I fix it to get the corresponding css of what I…
-
2
votes1
answer456
viewsDuplicate inputs with bootstrap
I’m creating a form with tabs and I have to duplicate a set of inputs to another line and wanted help to do this. I’m using bootstrap and there’s the code snippet to be duplicated. <form…
-
2
votes1
answer64
viewsDivs has width at 33%, why don’t they line up?
Very specific question! Follow the code line. .container {width: 80%;margin: 0 auto;} #servicos {width: 100%} #servicos .services {width: 33%;padding: 20px;display: inline-block;} #servicos…
-
2
votes1
answer1524
viewsModal that opens only the first time
I’m new here, I have a modal that opens automatically, I wanted to make it open only the first time for the user. I see you have a way with cookies. It’s just that I’m pretty layabout with jquery…
-
2
votes1
answer1093
viewsDecrease tables to fit on a page
I have a page that features four tables and a button so the user can print them. The problem is that these tables have a lot of columns and when I try to print, they are cut. I wish I could decrease…
-
2
votes2
answers757
viewsResponsive Font-Awesome icon - How to replace icons when clicked?
So I’m trying to make those responsive headers that, when clicked, organize the column and change the "arrow" up or down. Currently I already have my Sorts working, but still missing this…
-
2
votes2
answers278
viewsHow to fix menu with fadein effect?
I have the following code that fixes the menu using bootstrap: $(window).scroll(function(){ scroll = $(window).scrollTop(); if(scroll > 500) { $('.navbar').addClass('sticky-top') } else {…
-
2
votes2
answers66
viewsCSS/HTML Writing around an image
Good morning, I have a "square" image, but in the format of Paul, I need to write on the edges of it: Imagery: I need to write in Pentagono format too, as in the example: Another requirement is…
-
2
votes1
answer67
viewsJavascript function breaking the image
Hello; I am having a project of the Coach, and in it has a list of games, I want to make that when you pass the mouse over the image increase, with that I have the following: foreach ($lista as…
-
2
votes1
answer354
viewsProblem with the basics of creating a sidenav using Materializecss
I’m learning to materializecss and I’m trying to create a sidenav, but I’m having problems, I wonder where, follow the little code: <!DOCTYPE html> <html> <head>…
-
2
votes2
answers46
viewsHow to break lines between links without them occupying the entire width of the parent element?
I’ve been looking at these two topics that deal with line breaking between tags: Break lines in CSS without using extra elements How to break line between CSS tags Both would solve my problem if it…
-
2
votes1
answer122
viewsSynchronization of 2 html/css animations
I need to make my burger menu that has an animation totally made by html and css is synchronized, IE, when I press on it both animations will happen... The code I’m using is this HTML <nav>…
-
2
votes1
answer117
viewsCut image pixels without distorting it
Good morning! I want to cut the sides of a photo without distorting it, it’s possible? For example, I have this image here: <img src="https://i.stack.imgur.com/4oeoT.jpg" name="Foto Teste"…
-
2
votes3
answers1116
viewsIncrease and Decrease Font, how to apply on a large site?
I have to apply the accessibility feature to increase and decrease font. I currently have 3 buttons: Small Font, Normal Font and Large Font. The idea is that when you click on each button, the…
-
2
votes2
answers175
viewsInput does not track col-Md-8 size
I’m training in creating Forms, and I’m making use of bootstrap in it, mainly from <div class="row"> and <div class="col-md-4">. However, when I put only two elements on the same line,…
-
2
votes1
answer33
viewsI cannot click on the - jquery link
Hello, someone can help me posted the code also in codepen, can’t click the link and opened the PDF file, what happens is the slideup of div. Thanks for your attention! (function($) {…
-
2
votes1
answer137
viewsCss in all options except one
I am trying to apply a css to an option tag. In case I would like only the options that have value starting with 2 stay in blue, as the example below: $('.select-user option').each(function(){…
-
2
votes1
answer515
viewsNavigation using arrow keys
I need to navigate the DOM through the arrow keys. I can accomplish it when it goes only in two directions (up or down, front or back), but to move in the four directions I did not find a way. I…
-
2
votes3
answers126
viewscreating note/observation field
I would like to know how these fields are created, I created an example, but I do not know if this is really how it is created. Follow an example of what I created: .nota { background-color: #CCC;…
-
2
votes1
answer46
viewsAutomatic br in mobile version
Hello, I have a question, I have a page that stays in a provider that when the user depletes the internet it is presented! But I wanted the images and buttons to buy new packages in the mobile…
-
2
votes1
answer76
viewsHow to change the background of wordpress posts and leave each one with a different color?
Hello, I’m having a problem. I’m trying to make each post have a different background color. I tried using this code below in css but it leaves all posts one color. div.postagem >…
-
2
votes2
answers110
viewsCreate navbar with centralized search field
are trying to make a Nav bar with a centralized search field.. I even managed to do more I believe I’m not in the best way, because when I open on a smartphone everything gets weird... Follow my…
-
2
votes1
answer119
viewsHow to rotate a 90º IMG occupying 100% of the element?
I have the following image for example: The black line is the container of the page(mobile) and the red one the image, In example 1 is what I have today, and the 2 the result I’m trying to get, I’m…
cssasked 6 years, 2 months ago Lennon S. Bueno 2,182 -
2
votes1
answer3203
viewsHow to put an Icone/Lookup Button inside an input with Bootstrap?
<form class="form-inline my-2 my-lg-0 pl-3-lg"> <input class="form-control" type="search" placeholder="Pesquisar" aria-label="Search"> <button class="btn btn-dark ml-1"…
-
2
votes1
answer156
viewsArrow function in slide
I wonder if it is possible to make this slide that I adapted from "w3school", work with arrows, and every time it jumps image, the site rise to the top again. HTML: <!DOCTYPE html>…
-
2
votes4
answers9348
viewsPut an IF in CSS
I have a CSS that shows and hides a div. But I want this to happen only if this field below is filled, that is, if it is different from empty. <input type="text" onkeypress="return…
-
2
votes1
answer43
viewsDiv’s overlapping in cell phone
I have a menu made with CSS that has a certain header spacing as can be seen below: However, when I open the phone, the same align in a way that end up being on top of the header: And without…
-
2
votes1
answer194
viewsHow to inherit a value from a given attribute in CSS?
Hello, everybody. How do I inherit a value from a given attribute in CSS? Example: <div class="flex" id="1" style="line-height: 100px; height: 100px; background-color: red;">1</div>…
-
2
votes1
answer306
views<fieldset> flex-wrap does not work properly in Chrome
I’m using the CSS property flex-wrap in some <div> so that I can show them or hide them without breaking the fluidity of the layout. However I noticed that when my container is a…
-
2
votes0
answers21
viewsClasses named with emoji characters
I was sailing in the web and suddenly I’m faced with it: Yes, it is a "named" class with emoji characters. I was curious and decided to perform some tests to see how it worked, after all, it’s not…
-
2
votes2
answers6101
viewsHow to border images using Html5+css?
The code developed until fractionated group is here if you need the complete code will be in Pastebin HTML: https://pastebin.com/9k1Xd9MC <!DOCTYPE html> <html lang="pt-br"> <head>…
-
2
votes2
answers15167
viewsElement superimposing the other CSS
My website consists of a header and below it a container-fluid with screen information. The problem is that mine header is superimposing part of mine container-fluid: HTML: <h3 class="card-header…
-
2
votes2
answers60
viewsproblem leaving a text on the left and 2 items on the right
.col-item { border: 1px solid #E1E1E1; border-radius: 5px; background: #000; } .col-item .photo img { margin: 0 auto; width: 100%; } .col-item .info { padding: 10px; border-radius: 0 0 5px 5px;…
-
2
votes1
answer279
viewsHow to change the color of a div via javascript with one condition
I’m trying to change the color of a div if the following condition is true, if( @ViewBag == "reservado" ), but I’m not succeeding, could someone tell me how the code would look with this condition…
-
2
votes1
answer231
viewsText accompany the div
I have a chart that returns to me as follows: I would like the product name to follow the chart regardless of its size, but it is at the top. See below the code: <td style='text-align:…
cssasked 6 years, 1 month ago user24136 -
2
votes2
answers634
viewsHover the mouse over the image and change the color of the caption
Good morning dear friends, I wanted to know how to move the mouse over an image, and the background of the legend change color, in the example below I can only change the color when I pass…
-
2
votes1
answer1671
viewsHow to change the image displayed in the Desktop and Mobile versions of a website
I needed the desktop version of a website to display an image and the mobile version another image. Since on the desktop the counter would be on top of the image (as it already is) and in mobile…
-
2
votes2
answers1015
viewsWhy margin-top affects the father div
Because when I give a margin-top on the child element it affects the parent element? See example below: body{ background-color: #aaaaaa; } .topo{ width: calc(100% - 20px); max-width: 1200px; height:…
-
2
votes1
answer44
viewsProblem with HTML Manipulation with PHP
People in the part of echo <p class="play">$row[/"email/"] </p> gives a syntax error Parse error: syntax error, Unexpected 'play' (T_STRING), expecting ',' or ';' in C: xampp htdocs a…
-
2
votes1
answer398
viewsFlexbox leaving empty spacing
I’m studying flexbox and decided to create a menu, everything works well, but this getting a spacing without me having given, so I know the flex: 1 takes up all the space, but that’s not what is…
-
2
votes2
answers1090
viewsborder Radius color in 2 colors
I’m trying to put 2 border colors with Radius but I can’t. The goal is to stay like this: But I can only make it so: Follow code where . Detail is the image: .detail { width: 170px; height: 170px;…