Brunkz34
KPCKevin Powell - Community
•Created by Brunkz34 on 7/6/2023 in #front-end
Can't select with nth-child
Hi, I just started a project and I'm having a problem with the following code:
HTML
CSS
The problem is that the nth-child pseudoclass does not select neither the h1, nor the h2. This is because (for some reason) h1 has position 2 (i.e. I can select it by typing nth-child(2)) and h2 has position 3 (same thing). It's like there's a ghost element with the class "title" that there's breaking my styles. If someone knows what's going on here plz explain me, I would appreciate it a lot!
5 replies
KPCKevin Powell - Community
•Created by Brunkz34 on 6/24/2023 in #front-end
Strange pixels showing up D:
Hello! I was doing a project by myself and something strange is going on with this code:
HTML
CSS
I changed the background-color just to see that there are (exactly) 7 pixels below my image, and I honestly don't know where are those coming from. Maybe is some default setting of the page which generates the image on my HTML, but I'm not sure. Does someone know what's going on??
14 replies
KPCKevin Powell - Community
•Created by Brunkz34 on 3/17/2023 in #front-end
How to center a div without flexbox or grid
10 replies