About the HTML-CSS category

About the HTML-CSS category

Hi people!
I need help understanding the behaviours of <div> when applying margin.

I have two <div>, both with {margin: 24px auto} .
When I inspect them I can see that the second it’s stacked after the previous one, but the bottom margin (24px top and bottom) it’s not affecting this second one, which is actually touching the first <div> with its “box content”.

Which CSS class could be affecting this behaviour? What it could be wrong in my code?


Hello RaniFloat, I’m currently trying to solve this problem as well. How were you able to get through this please?

dont know what to do for Nest the existing img element within an a element.

Posting the actual code would help others evaluate what you have going on. When you reply, simply press the button in the tool bar that looks like “</>” then paste your code in the highlighted area.

Excellent coding.and can i start html,css and java script with online and study online.


@DJB24 please make sure the spelling of “color” in background attribute.

i want help
basic html and html5

hey there, i have a bit of problem understanding my mistake in introduction to html5 elements. it says that the main element should have 2 para. elements as children. sooo, i need help

Freecodecamp. Introduction to the Applied Visual Design Challenges: Create a Graphic Using CSS exercise. You are asked to change the background-color of an element to transparent. I’m out of ideas. Please Help.

include one main element before p element and /main after p element

img element is self closing so there is no need to put a / . if you see the description about every tag in the box aside of your output page! then it is written there.

i can’t what you want to ask please provide codes you have written so far.

Hi, I am not sure I understood your problem but maybe the “a” flag can help you, for instance:

<a href="www.myImageUrl.com">
    <div class="myButton"> Click here </div>

It will open the url whenever you click on the element you will put inside it.

Sir i am going through the Responsive web design course on freecodeCamp and the compiler is showing error .

Hello, it looks like you should only have one .red-box class. Try adding the padding property below the red-box margin element. Also remove the space between padding and the :
Hope that helps :slight_smile:

Tell us what’s happening:

I am unable to copy and paste the text
Your code so far


<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run
	catnip eat the grass sniff.</p>


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 YaBrowser/ Yowser/2.5 Safari/537.36.

Link to the challenge:

the video tutorial tells me to copy and paste the needed text. I am able to copy, not able to paste. WHen i right click tbhe mnouse there is not even the option to paste. Wondering if it has to do with browser incompatability? (Yandex)

I’m new. I just started today. I’m having so much trouble with the “your image should have a src attribute that points to the kitty image”


I think have done exactly how it was to be done.Am getting error
.// running tests

The strong tag should wrap around the words “Stanford University”.

// tests completed

Think is better if you could wright the padding in the red-box containing background- color and margin.