There are multiple ways to do this exercise I’m sure. What are some possible ways to go about it? I don’t entirely grasp how the various positioning attributes interact with each other. I think being able to see a few examples would help me understand them better. I finished this exercise but I feel like it ‘just kind of worked’, but that it wasn’t the right way.
If you compare the HTML to CSS it’s a bit confusing as the stylesheet is written red/blue but the document is written blue/red!
Anyways, in watercolour we call these things ‘happy accidents’ and I feel the same as I go through the series on CodeAcademy - no testing framework can account for all eventualities but when learning I accept these inconsistencies as it reflects real-world situations and often makes me think more deeply about how to solve the challenge in hand.
Ok, I used #blue {
background-color: rgb(0, 0, 255);
position: absolute;
top: 100px;
}
I got them to overlap. I fully grasp why this works the way it did. Afterwards I was just playing around and moved the circle to the right with: #blue {
background-color: rgb(0, 0, 255);
position: absolute;
top: 100px;
left:100px;
}
It did what I expected it too moved it to the side 100px.
Here is where my confusion comes in, I then changed it to “relative” #blue {
background-color: rgb(0, 0, 255);
position: relative;
top: 100px;
left:100px;
}
and the red circle moved down the page, blue stayed in the same place…why does the red circle move when I set the blue circles position as relative?
thanks! what a quick response. I did try that already. My problem was that I didn’t understand from the question that codecademy expected the circles to FULLY overlap. I liked them half overlapped, so that they could be seen in their original and mixed states. I cheated to get the “answer” and continue.
I didn’t realise they expected the circles on top of each other so I used position: relative and then moved each respectively with bottom: px and top: px
I’m attending the Full-Stack-Course. Are you sure that the Code Challenge: CSS Design is in the right place? It seems to me that topics like Positioning are not yet introduced at this point.
The career path modules are a number of old and new modules lumped together, one supposes on the assumption that many learners will gloss over the HTML, CSS and JavaScript units and jump right into the projects and advanced lessons.
If a lot of this is new, then suggest step back from that path for a week and pour yourself into the Learn HTML, Learn CSS, and Learn JavaScript courses. This will equip you to breeze through those units of the career path.
I’m exactly at the same point than arc04…
Souldn’t Codecademy work a bit on that? I mean, they are teaching us to code but apparently they are a bit lazy to correcct these thing?
I just don’t understand it