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?
7 Respuestas
+ 6
lord_of_hotwheels
It's this what you mean?
https://code.sololearn.com/WJqMkE6WicId/?ref=app
+ 5
I don't know what you're doing incorrectly cuz I don't see no code.
Try providing a link to it.
+ 5
I reduced the padding from 300px to 30px
+ 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
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> `
0
Ok now how to I make the box smaller
0
Yeah like that. What did you do differently to mine? I don't see it