0

I can't make a box

I am trying to imitate the creation of boxes from my FreeCodeCamp excerise to learn about margin and padding adjustments. what am I doing incorrectly?

6th Sep 2019, 11:24 PM
coolperson69
coolperson69 - avatar
7 odpowiedzi
7th Sep 2019, 8:03 AM
Jella
Jella - avatar
+ 5
I don't know what you're doing incorrectly cuz I don't see no code. Try providing a link to it.
7th Sep 2019, 12:07 AM
Jella
Jella - avatar
+ 5
I reduced the padding from 300px to 30px
7th Sep 2019, 8:15 AM
Jella
Jella - avatar
+ 2
Do not set html comments inside css codes. Erase all html comments: <!--we think of the box idea first. literally just a border--> <!--clockwise notation: top right bottom left --> https://code.sololearn.com/WSooWlQmlShs/?ref=app
7th Sep 2019, 4:18 AM
Calviղ
Calviղ - avatar
0
oh my b. i wish I could upload a pic but oh well here's the link: `<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <style> <!--we think of the box idea first. literally just a border--> .box { border-style: solid; border-color: black; border-width: 5px; text-align: center; } .red-box { background-color: crimson; color: #fff; padding: 20px 300px 20px 300px; <!--clockwise notation: top right bottom left --> } </style> <!--we treat the boxes like h5 headings--> <main> <h5 class="box red-box">element</h5> </main> </body> </html> `
7th Sep 2019, 2:59 AM
coolperson69
coolperson69 - avatar
0
Ok now how to I make the box smaller
7th Sep 2019, 7:31 AM
coolperson69
coolperson69 - avatar
0
Yeah like that. What did you do differently to mine? I don't see it
7th Sep 2019, 8:11 AM
coolperson69
coolperson69 - avatar