askcss: eli5 of why this code works, but these 2 other codes do not - purpose is to learn a tiny bit of css

So in summary, we have created a 100px margin above

  1. why basically cant 'margin-top: 100px' be written on top of '#bodyContent'?

  2. after its on top, why couldnt 'margin-top' be called' 'margin' instead? would be more concise

  3. what is 'margin'? do you always need to create a 'margin' on top of '#bodyContent'? what does 'margin' do? what's a more descriptive wording of 'margin' based on what it actually does?

  4. why is it 100px? why not more or less, and how do we know/? what number to actually put?

  5. do you always need 'px'? can you use something else?

100px tall #catlinks

  1. what is 'catlinks'?

in that margin

  1. so 'catlinks' is top of a 'margin'

  2. why cant you just put it on top (or inside of) without a 'margin'?

sit in that margin

  1. how do we know that this is in the 'margin'

  2. what in the code is saying that?

grows to 800px

  1. does it always 'grows/expand' to 800px? why not more or less, why not infinite? what's the infiinte, i rather it be infinte

new hover rule

  1. so there was no 'hover rule' in the old/original code? then how does wiki originally do it?

  2. can we make anything else 'hover' that's actaully pretty cool, if all sites were liek that, that would be great

any other helpful important info that isnt asked above but that would be helpful good to know?

is there something else besides css to do the goal in a simplier and easier and better way? btw

broken code snippets don't work

because they are not remotely trying to do any of the above.

They're not even acting on the correct elements.

they kinda work, they're just misplaced, and they dont have the background that the original wiki has, was misplaced on all zooms also i tested

/r/css Thread Parent