+ 2
How to create border to the page?
Using html code
13 ответов
+ 7
Katkar Shekhar Tanaji Delete everything in your css code and add these :
body {
border: 2px solid red;
padding: 5px;
}
It will add a red border to the body. You can change the color for different border color.
+ 7
Katkar Shekhar Tanaji
Your code is correct, just remove that <style> from style section.
You already gave border to the body{} so it will give border to whole page.
+ 2
Katkar Shekhar Tanaji remove the <style></style> in css code playground and make P in lowercase
the code should be
p{
border-style: solid;
}
+ 2
...@ will be possible
Use Add to css
....
p.one {
border-style: solid;
border-width: 5px 20px; /* 5px top and bottom, 20px on the sides */
}
Or
p.two {
border-style: solid;
border-width: 20px 5px; /* 20px top and bottom, 5px on the sides */
}
Or
p.three {
border-style: solid;
border-width: 25px 10px 4px 35px; /* 25px top, 10px right, 4px bottom and 35px left */
}
+ 1
you can create border using css. To make border around element you can use border-style, border-width to sets the width of the border and border-color to sets color. Just search border properties of css.
+ 1
https://code.sololearn.com/WPyG3RWVP5Jm/?ref=app
Check my code but border doesnt work.
+ 1
Thanks bro.. 😊😊
+ 1
Katkar Shekhar Tanaji However, you can change that '2px' to any value like '3px' or '5px' for a thick border.
+ 1
border:1px solid palegreen;
even can be used = border-left, border-right, border-bottom, border-top.
+ 1
You can do it without deleting everything in your css just to ckeck if the body tag have any css wrote already and if there is any *{ } css code in your css file *{ } this refers to add to complete css code .
You can the add your body code
body{
border:2px solid red;
}
Or add inline code in html if it suits your arrangements
<body style=" border:2px solid red";>
Like this Katkar Shekhar Tanaji
0
Lean - No it gives border to only paragraphs i want border for whole page. Will it happens..... 🙄
0
Rick Grimes i have did as u said but this wont work plss cheak it again...