Skip to content

Commit a9f9440

Browse files
authored
Merge pull request #39 from codeharborhub/dev-1
Reformate Docs
2 parents a7e66bf + 38fc07d commit a9f9440

33 files changed

+111
-25
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ title: Background Color
44
sidebar_label: Background Color
55
sidebar_position: 1
66
tags: [background, color, css background, background color]
7-
description: Learn how to set the background color of an element in CSS using the background-color property.
7+
description: "Learn how to set the background color of an element in CSS using the background-color property."
88
keywords:
99
[
1010
background color,
1111
css background color,
1212
background-color property,
1313
css background-color,
1414
]
15+
hide_table_of_contents: true
1516
---
1617

1718
In CSS, the `background-color` property is used to set the background color of an element. The `background-color` property accepts a color value, which can be specified using various color formats such as hexadecimal, RGB, RGBA, HSL, and HSLA.
1819

1920
<AdsComponent />
21+
<br />
2022

2123
## Syntax
2224

@@ -53,6 +55,7 @@ In the HTML code below, the CSS rule will apply the light blue color to the back
5355
By using the `background-color` property, you can customize the background color of elements on your web page to create visually appealing designs.
5456

5557
<AdsComponent />
58+
<br />
5659

5760
:::info Additional Information
5861

docs/css/backgrounds/background-image/background-attachment.md renamed to docs/css/backgrounds/background-image/background-attachment.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ title: Background Attachment
44
sidebar_label: Background Attachment
55
sidebar_position: 4
66
tags: [background, css background, background attachment, background-attachment property]
7-
description: Learn how to set the background attachment behavior of an element in CSS using the background-attachment property.
7+
description: "Learn how to set the background attachment behavior of an element in CSS using the background-attachment property."
88
keywords:
99
[
1010
background attachment,
1111
css background attachment,
1212
background-attachment property,
1313
css background-attachment,
1414
]
15+
hide_table_of_contents: true
1516
---
1617

1718
In CSS, the `background-attachment` property is used to specify whether the background image of an element scrolls with the content or remains fixed as the content moves. This property is used to control the attachment behavior of the background image.
1819

1920
<AdsComponent />
21+
<br />
2022

2123
## Syntax
2224

@@ -57,6 +59,7 @@ In the HTML code below, the CSS rule will apply the `fixed` background attachmen
5759
By using the `background-attachment` property, you can control how the background image behaves when the content is scrolled, allowing you to create various visual effects on your web page.
5860

5961
<AdsComponent />
62+
<br />
6063

6164
:::info Additional Information
6265

@@ -128,6 +131,7 @@ Now, you can see the output of the above code in the Browser Window like this:
128131
In this example, the background image remains fixed within the viewport as the content is scrolled, creating a visually appealing effect on the web page.
129132

130133
<AdsComponent />
134+
<br />
131135

132136
## Conclusion
133137

docs/css/backgrounds/background-image/background-position.md renamed to docs/css/backgrounds/background-image/background-position.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ title: Background Position
44
sidebar_label: Background Position
55
sidebar_position: 3
66
tags: [background, css background, background position, background-position property]
7-
description: Learn how to set the position of the background image of an element in CSS using the background-position property.
7+
description: "Learn how to set the position of the background image of an element in CSS using the background-position property."
88
keywords:
99
[
1010
background position,
1111
css background position,
1212
background-position property,
1313
css background-position,
1414
]
15+
hide_table_of_contents: true
1516
---
1617

1718
In CSS, the `background-position` property is used to specify the position of the background image of an element. This property allows you to control the placement of the background image within the element's background area.
1819

1920
<AdsComponent />
21+
<br />
2022

2123
## Syntax
2224

@@ -67,6 +69,7 @@ In the HTML code below, the CSS rule will apply the `center` background position
6769
By using the `background-position` property, you can control the placement of the background image within the element's background area, allowing you to create visually appealing designs on your web page.
6870

6971
<AdsComponent />
72+
<br />
7073

7174
:::note Try it yourself
7275

docs/css/backgrounds/background-image/background-repeat.md renamed to docs/css/backgrounds/background-image/background-repeat.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ title: Background Repeat
44
sidebar_label: Background Repeat
55
sidebar_position: 2
66
tags: [background, css background, background repeat, background-repeat property]
7-
description: Learn how to control the repetition of a background image in CSS using the background-repeat property.
7+
description: "Learn how to control the repetition of a background image in CSS using the background-repeat property."
88
keywords:
99
[
1010
background repeat,
1111
css background repeat,
1212
background-repeat property,
1313
css background-repeat,
1414
]
15+
hide_table_of_contents: true
1516
---
1617

1718
In CSS, the `background-repeat` property is used to specify how a background image is repeated within the background area of an element. This property allows you to control the repetition of the background image in both the horizontal and vertical directions.
1819

1920
<AdsComponent />
21+
<br />
2022

2123
## Syntax
2224

@@ -64,6 +66,7 @@ In the HTML code below, the CSS rule will apply the `repeat` background repeat t
6466
In this example, the background image will be repeated in both the horizontal and vertical directions to fill the background area of the `<div>` element. You can adjust the `background-repeat` property to control how the background image is repeated based on your design requirements.
6567

6668
<AdsComponent />
69+
<br />
6770

6871
:::note Try it yourself
6972

docs/css/backgrounds/background-image/background-size.md renamed to docs/css/backgrounds/background-image/background-size.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ title: Background Size
44
sidebar_label: Background Size
55
sidebar_position: 1
66
tags: [background, css background, background size, background-size property]
7-
description: Learn how to set the size of the background image of an element in CSS using the background-size property.
7+
description: "Learn how to set the size of the background image of an element in CSS using the background-size property."
88
keywords:
99
[
1010
background size,
1111
css background size,
1212
background-size property,
1313
css background-size,
1414
]
15+
hide_table_of_contents: true
1516
---
1617

1718
In CSS, the `background-size` property is used to specify the size of the background image of an element. This property allows you to control how the background image is displayed within the element's background area.
1819

1920
<AdsComponent />
21+
<br />
2022

2123
## Syntax
2224

@@ -63,6 +65,7 @@ In the HTML code below, the CSS rule will apply the `cover` background size to t
6365
By using the `background-size` property, you can control how the background image is displayed within the element's background area, allowing you to create visually appealing designs on your web page.
6466

6567
<AdsComponent />
68+
<br />
6669

6770
:::tip additional information
6871

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ keywords:
1212
css border radius values,
1313
css border radius shorthand,
1414
]
15-
description: Learn how to use the CSS border-radius property to create rounded corners for elements in your web page layout.
15+
description: "Learn how to use the CSS border-radius property to create rounded corners for elements in your web page layout."
1616
tags: [css, border radius, css border radius, border radius property, css border radius property]
17+
hide_table_of_contents: true
1718
---
1819

1920
In CSS, the `border-radius` property is used to create rounded corners for elements in your web page layout. Rounded corners soften the appearance of elements and can make your web page design more visually appealing. By adjusting the `border-radius` values, you can control the curvature of the corners and create different styles for your elements.
2021

2122
<AdsComponent />
23+
<br />
2224

2325
## Syntax
2426

@@ -71,6 +73,7 @@ In the HTML code above, the CSS rule will apply the specified `border-radius` va
7173
By using the `border-radius` property, you can create visually appealing designs with rounded corners for elements in your web page layout. Rounded corners can help soften the appearance of elements and add a touch of elegance to your web page design.
7274

7375
<AdsComponent />
76+
<br />
7477

7578
:::note Try it yourself
7679
Experiment with different values of the `border-radius` property to see how the curvature of the corners changes based on the specified radius values.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ keywords:
1414
css border shorthand,
1515
border values,
1616
]
17-
description: Learn how to use the CSS border property to create borders around elements in your web page layout.
17+
description: "Learn how to use the CSS border property to create borders around elements in your web page layout."
1818
tags: [css, border, css border, border property, css border property]
19+
hide_table_of_contents: true
1920
---
2021

2122
In CSS, the `border` property is used to create borders around elements in your web page layout. Borders are the lines that surround the content of an element and separate it from other elements on the page. By adjusting the border properties, you can control the appearance, style, width, and color of the borders to create visually appealing layouts.
2223

2324
<AdsComponent />
25+
<br />
2426

2527
## Syntax
2628

@@ -72,6 +74,7 @@ div {
7274
In this example, the border around the `<div>` element will have a solid style, a width of `2px`, and a color of `red`. You can customize the border style, width, and color to achieve the desired visual effect for your web page layout.
7375

7476
<AdsComponent />
77+
<br />
7578

7679
:::note Note
7780
The `border` property can be combined with other border-related properties such as `border-radius` to create more complex border effects like rounded corners.
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ title: CSS Box Sizing
44
sidebar_label: Box Sizing
55
sidebar_position: 2
66
keywords: [css box sizing, box sizing, css box model, css box model box sizing]
7-
description: Learn how the CSS `box-sizing` property can be used to control the sizing behavior of elements in the CSS box model.
7+
description: "Learn how the CSS `box-sizing` property can be used to control the sizing behavior of elements in the CSS box model."
88
tags: [css, box sizing, css box model, css box model box sizing]
9+
hide_table_of_contents: true
910
---
1011

1112
In CSS, the `box-sizing` property is used to control the sizing behavior of elements in the CSS box model. By default, the size of an element is calculated based on its content area, padding, and border. However, the `box-sizing` property allows you to change this behavior and include the padding and border in the total width and height of the element.
1213

1314
<AdsComponent />
15+
<br />
1416

1517
## Syntax
1618

@@ -52,6 +54,7 @@ In the HTML code below, the CSS rule will apply the `border-box` sizing behavior
5254
In this example, the total width of the `<div>` element will be `200px`, including the padding and border, due to the `border-box` value of the `box-sizing` property.
5355

5456
<AdsComponent />
57+
<br />
5558

5659
:::note Try it yourself
5760
Experiment with different values of the `box-sizing` property to see how the sizing behavior of elements changes based on the box model.
@@ -104,6 +107,7 @@ Now, you can see the output of the above code in the Browser Window like this:
104107
In this example, the total width of the `<div>` element will be `242px`, calculated as `200px` for the width, `20px` for the left padding, `20px` for the right padding, and `1px` for the left and right borders, due to the `content-box` value of the `box-sizing` property.
105108

106109
<AdsComponent />
110+
<br />
107111

108112
### Example 2: Using `border-box`
109113

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ title: Introduction to the CSS Box Model
44
sidebar_label: Introduction
55
sidebar_position: 1
66
keywords: [css box model, box model, css layout, css box model introduction]
7-
description: Learn about the CSS box model and how it is used to layout elements on a web page.
7+
description: "Learn about the CSS box model and how it is used to layout elements on a web page."
88
tags: [css, box model, css layout, css box model introduction]
9+
hide_table_of_contents: true
910
---
1011

1112
import BoxModelDiagram from './script/BoxModelDiagram';
1213

1314
In CSS, the **Box Model** is a fundamental concept that describes how elements are laid out on a web page. It consists of four main components: **content**, **padding**, **border**, and **margin**. Understanding the box model is essential for creating well-structured and visually appealing web layouts.
1415

1516
<AdsComponent />
17+
<br />
1618

1719
The box model is used to calculate the size of an element, including its content area, padding, border, and margin. Each of these components plays a specific role in defining the layout and appearance of an element on the page.
1820

@@ -65,6 +67,7 @@ By understanding the box model and how it works, you can create more effective a
6567
In the next sections, we will explore each component of the box model in more detail and learn how to use them effectively in your CSS layouts.
6668

6769
<AdsComponent />
70+
<br />
6871

6972
:::info Key Points
7073

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ tags:
1515
- css margin collapse
1616
- css box model
1717
- css box model margin collapse
18+
hide_table_of_contents: true
1819
---
1920

2021
In CSS, margin collapse is a phenomenon where the vertical margins of adjacent elements collapse into a single margin. This can lead to unexpected spacing between elements and affect the layout of your web page. Understanding how margin collapse works and how to prevent it is essential for creating consistent and visually appealing layouts.
2122

2223
<AdsComponent />
24+
<br />
2325

2426
## How Margin Collapse Works
2527

@@ -72,6 +74,7 @@ You can also prevent margin collapse by using the `overflow: hidden` property on
7274
By using these techniques, you can prevent margin collapse and control the spacing between elements in your web page layout. This allows you to create more consistent and visually appealing designs by managing the margins of adjacent elements effectively.
7375

7476
<AdsComponent />
77+
<br />
7578

7679
:::note Try it yourself
7780
Compare this snippet from [CSS Width and Height](/tutorial/css/box-model/width-height) to learn how to use the CSS `width` and `height` properties to control the dimensions of elements in your web page layout.

0 commit comments

Comments
 (0)