no irrevalent answer
Attachments:
Answers
Answered by
3
Required Answer:-
Question:
Write CSS code to display border like this,
Top border - 10 pixels.
Bottom border - 5 pixels.
Left border - 20 pixels.
Right border - 1 pixels.
Solution:
This is a one line code, Here is the code.
element {
border-style: solid;
border-width: 10px, 5px, 20px, 1px;
}
Note: The element is the tag to which you want to apply the border. It is necessary to use border-style property so as to make the border visible.
Example code,
<!DOCTYPE html>
<html>
<head>
<style>
div {
border-style: solid;
border-width: 10px, 5px, 20px, 1px;
}
</style>
</head>
<body>
<div>
<h1 align="center">Hello Brainlians!!! </h1>
</body>
</html>
Output is given.
Attachments:
Similar questions