Posts by Felipe Carriel • 182 points
14 posts
-
1
votes3
answers279
viewsA: Is there any way to replace these ifs?
I noticed a pattern yes. I’d be more or less like that logic: function adaptar(value) { // tratar exceções if (value >= 16 && value < 16.15) { return "16.15"; } const inteiro = (value…
-
7
votes0
answers56
viewsQ: Why is the color GREY darker than DARKGREY?
When we use keywords to define a CSS property, we can choose colors by name. What often irritates me is that the color Grey/Gray is noticeably darker than the color Darkgrey/darkgray, which makes no…
cssasked Felipe Carriel 182 -
0
votes1
answer28
viewsA: Modifications made to my style tab are not updating on the page
Hello. You put the tag <link> within the tag <title>. Leave it at that: <head> <title>Título</title> <link rel="stylesheet" href="style.css"> </head>…
-
0
votes1
answer55
viewsA: Decrease and improve code
I can’t understand what you’re doing, but it’s possible to reduce code. You can create image tags dynamically, reduce functions to a single function with parameter, use CSS selectors, and use a CSS…
-
1
votes3
answers201
viewsA: How to change colors dynamically with Javascript and pure CSS?
In Javascript, a (s) class(s) of an HTML element is obtained through the attribute classList an object of the Domtokenlist type that can be manipulated as an array of strings. The classList…
-
0
votes1
answer95
viewsA: Calculate Telefonic rate per minute with Javascript
Maybe it’s better to have a leaner html and leave the information in the script. I tried to help. const PLANOS = [{ descricao: "Liga 10", minutos: 10 }, { descricao: "Liga 20", minutos: 20 }, {…
-
2
votes1
answer21
viewsA: Display different images of <div>, at a time of 2s each
Perhaps the simplest way to do this is by changing the background-image within an animation. I hope I’ve helped .azul{ width:300px; height: 250px; background-color:blue; background-position: center;…
-
0
votes1
answer40
viewsA: Problem opening burger menu with icon
Hello. Removing the class from the element does not remove the class attribute. This is because it may be that the element has several css classes and when removing a class the class attribute is…
-
0
votes1
answer18
viewsA: I needed help with flexbox positioning
Hello. I suggest searching a little about the property justify-content. From what I understand you want something like this: header { width: 100%; display: flex; justify-content: space-around; }…
-
0
votes1
answer51
viewsA: fetch receiving http status 0
304 isn’t exactly a mistake. It usually occurs when the browser realizes that the requested resource exists in cache, so it "does not" the request and returns the data that already existed in cache.…
-
0
votes1
answer23
viewsA: A href no innerHTML
I believe you can solve this by using a template string (`between`crases) and interpolation (`Hello ${name}`). I didn’t quite understand your code, but it would look something like this: <a href=…
-
0
votes2
answers52
viewsA: I cannot create an image in DOM with javascript
You stated resultado as a constant and is trying to modify. Also check if it is not necessary to change the relative path as for example './filename' in the src of each image.…
-
1
votes2
answers1405
viewsA: How to make an image divide the text from within a bounded width div?
It is necessary to apply the attribute shape-outside: border-box; in the image so that the text is fluid around the image. For exact two lines to be set above the image, it is necessary to define…
-
0
votes1
answer101
viewsA: I calculate javascript
I hope to help. I believe your mistake is in ParseInt, that rounds its floating point values. I created some functions to try to improve your code. var inputs; var medidas = [ { value: 1, amount: 0…
javascriptanswered Felipe Carriel 182