Skip to content

Commit 716babf

Browse files
Refactor background CSS properties and remove redundancy
1 parent 2558e5e commit 716babf

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

CSS Background/style.css

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
* {
32
margin: 0;
43
padding: 0;
@@ -638,10 +637,7 @@ h3 { padding: 10px 0; }
638637

639638
/* *********************************** Background (shorthand) Property *********************************** */
640639

641-
.Background_Shorthand {
642-
padding: 20px;
643-
height: auto;
644-
}
640+
.Background_Shorthand { padding: 20px; height: auto; }
645641

646642
.main7 {
647643
display: flex;
@@ -669,7 +665,6 @@ h3 { padding: 10px 0; }
669665
text-align: center;
670666
}
671667

672-
.background {
673-
Background: lightblue url("tree.jpeg") no-repeat fixed center;
668+
.background { Background: lightblue url("tree.jpeg") no-repeat fixed center;
674669
/*In the we have used background-color, background-image, background-repeat, background-attachment, background-position, properties. */
675670
}

0 commit comments

Comments
 (0)