Questions tagged as 'css'

2
answers

Get backgroundColor of a div when you click (JavaScript)

I'm doing a little game of a drawing palette working with the JavaScript DOM. I want to click on each div with a background color, select that color. I do not know what I'm doing wrong, because when I access the property style.backgroundCo...
asked by 12.02.2018 / 12:31
4
answers

Scroll modify the scroll, how to do it?

I did this, what it basically does is hide the scroll, is there another way to do it? div { overflow: hidden; width: 188px; } .barra { height: 80px; overflow: auto; width: 208px; border: 1px solid gray; } <div&...
asked by 15.04.2017 / 14:39
4
answers

Change color a png image with transparent background

I have an image of a sky blue star, I would like to change the color to the star only. #estrella img{ height: 35px; } </html> <head> <title>Cambiar el color de la imagen</title> </head> <div id="...
asked by 15.10.2016 / 23:20
3
answers

Have a text appear centered, with space above and below

I was solving a very simple exercise and I ran into a problem in the alignment of the elements. I want the h1 to be centered. But the author of the tutorial uses *{ padding:0; margin: 0;} so that everything in the document is ce...
asked by 12.05.2017 / 21:19
2
answers

Save classes in CSS

It turns out that I'm doing some outline, normal, and clean buttons. Normal have background-color , outlines only border, and clean only color, I also have color attributes, my intention is that this attribute is only used in html , for...
asked by 23.04.2018 / 20:09
3
answers

Flex boxes at 50% of the screen

Using divs with display:flex I would like the two elements that are going to have to occupy 50% of the screen respectively, but I do not get it by modifying the property flex-grow . I have tried to play a bit with the values of that...
asked by 20.02.2017 / 10:21
3
answers

Nest selectors in CSS

Good, a doubt that I have. Is it possible, using CSS, to nest selectors? In my project, I have several styles that I have dependent on some selectors that are common in different places, for example: .menu1 { declaracion menu1 ... } .menu1...
asked by 01.02.2018 / 16:48
3
answers

Is there any way to align this perfectly using CSS or something else?

I'm currently producing an HTML text that I'm trying to align, I'm doing it raw, using &nbsp; . This is an example (do not pay attention to the <font color ... that I plan to improve for CSS): <div class="page_b...
asked by 11.10.2018 / 21:10
2
answers

Fill effect on image with Css Canvas or Svg

I need to know if there is any way to generate a "wave" filling effect ON A PNG IMAGE. It does not matter if it's with CSS, SVG, Canvas or some external javascript library. With a small example, they help me a lot. It would be something like...
asked by 30.10.2018 / 14:03
1
answer

Bootstrap 4 Center vertically and horizontally

With the bootstrap classes, I achieve to center both div horizontally, but nevertheless I also wish that they are centered vertically, that they remain in the center of the screen, I attach the code that I have ... <!doctype ht...
asked by 29.06.2018 / 21:19