-
-
Notifications
You must be signed in to change notification settings - Fork 157
4 section added in css #502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,257 @@ | ||
# CSS Borders | ||
|
||
```css | ||
div.all-borders { | ||
border: 1px solid black; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<div class="all-borders" style={{border: "1px solid black", padding: "10px"}}> | ||
I have borders on all sides. | ||
</div> | ||
|
||
```css | ||
div.bottom-border { | ||
border-bottom: 1px solid red; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div class="bottom-border" style={{borderBottom: "1px solid red", padding: "10px"}}> | ||
I have a red bottom border. | ||
</div> | ||
|
||
```css | ||
div.rounded-borders { | ||
border: 1px solid black; | ||
border-radius: 10px; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<div class="rounded-borders" style={{border: "1px solid black", borderRadius: "10px", padding: "10px"}}> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
I have rounded borders. | ||
</div> | ||
|
||
```css | ||
div.left-border { | ||
border-left: 1px solid blue; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div class="left-border" style={{borderLeft: "1px solid blue", padding: "10px"}}> | ||
I have a blue left border. | ||
</div> | ||
|
||
### CSS Border Style | ||
|
||
```css | ||
p.dotted { border-style: dotted; } | ||
p.dashed { border-style: dashed; } | ||
p.solid { border-style: solid; } | ||
p.double { border-style: double; } | ||
p.groove { border-style: groove; } | ||
p.ridge { border-style: ridge; } | ||
p.inset { border-style: inset; } | ||
p.outset { border-style: outset; } | ||
p.none { border-style: none; } | ||
p.hidden { border-style: hidden; } | ||
p.mix { border-style: dotted dashed solid double; } | ||
``` | ||
|
||
#### Output | ||
|
||
<p class="dotted" style={{borderStyle: "dotted"}}>A dotted border.</p> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p class="dashed" style={{borderStyle: "dashed"}}>A dashed border.</p> | ||
<p class="solid" style={{borderStyle: "solid"}}>A solid border.</p> | ||
<p class="double" style={{borderStyle: "double"}}>A double border.</p> | ||
<p class="groove" style={{borderStyle: "groove"}}>A groove border. The effect depends on the border-color value.</p> | ||
<p class="ridge" style={{borderStyle: "ridge"}}>A ridge border. The effect depends on the border-color value.</p> | ||
<p class="inset" style={{borderStyle: "inset"}}>An inset border. The effect depends on the border-color value.</p> | ||
<p class="outset" style={{borderStyle: "outset"}}>An outset border. The effect depends on the border-color value.</p> | ||
<p class="none" style={{borderStyle: "none"}}>No border.</p> | ||
<p class="hidden" style={{borderStyle: "hidden"}}>A hidden border.</p> | ||
<p class="mix" style={{borderStyle: "dotted dashed solid double"}}>A mixed border.</p> | ||
|
||
### CSS Border Width | ||
|
||
```css | ||
p.one { | ||
border-style: solid; | ||
border-width: 5px; | ||
} | ||
|
||
p.two { | ||
border-style: solid; | ||
border-width: medium; | ||
} | ||
|
||
p.three { | ||
border-style: dotted; | ||
border-width: 2px; | ||
} | ||
|
||
p.four { | ||
border-style: dotted; | ||
border-width: thick; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p class="one" style={{borderStyle: "solid", borderWidth: "5px"}}>5px border-width</p> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p class="two" style={{borderStyle: "solid", borderWidth: "medium"}}>Medium border-width</p> | ||
<p class="three" style={{borderStyle: "dotted", borderWidth: "2px"}}>2px border-width</p> | ||
<p class="four" style={{borderStyle: "dotted", borderWidth: "thick"}}>Thick border-width</p> | ||
|
||
### CSS Border Color | ||
|
||
```css | ||
p.one { | ||
border-style: solid; | ||
border-color: red; | ||
} | ||
|
||
p.two { | ||
border-style: solid; | ||
border-color: green; | ||
} | ||
|
||
p.three { | ||
border-style: dotted; | ||
border-color: blue; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p class="one" style={{borderStyle: "solid", borderColor: "red"}}>Red border</p> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p class="two" style={{borderStyle: "solid", borderColor: "green"}}>Green border</p> | ||
<p class="three" style={{borderStyle: "dotted", borderColor: "blue"}}>Blue border</p> | ||
|
||
### CSS Border - Individual Sides | ||
|
||
```css | ||
p { | ||
border-top-style: dotted; | ||
border-right-style: solid; | ||
border-bottom-style: dotted; | ||
border-left-style: solid; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p style={{borderTopStyle: "dotted", borderRightStyle: "solid", borderBottomStyle: "dotted", borderLeftStyle: "solid"}}> | ||
Different Border Styles | ||
</p> | ||
|
||
```css | ||
p { | ||
border-style: dotted solid; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p style={{borderStyle: "dotted solid"}}> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Different Border Styles | ||
</p> | ||
|
||
### CSS Border - Shorthand Property | ||
|
||
```css | ||
p { | ||
border: 5px solid red; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p style={{border: "5px solid red"}}> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Some text | ||
</p> | ||
|
||
```css | ||
p { | ||
border-left: 6px solid red; | ||
} | ||
``` | ||
|
||
#### Output | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<p style={{borderLeft: "6px solid red"}}> | ||
Some text | ||
</p> | ||
|
||
```css | ||
p { | ||
border-bottom: 6px solid red; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p style={{borderBottom: "6px solid red"}}> | ||
Some text | ||
</p> | ||
|
||
### CSS Rounded Borders | ||
|
||
```css | ||
p { | ||
border: 2px solidred; | ||
border-radius: 5px; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p style={{border: "2px solid red", borderRadius: "5px"}}> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Normal border | ||
</p> | ||
|
||
```css | ||
p { | ||
border: 2px solid red; | ||
border-radius: 15px; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p style={{border: "2px solid red", borderRadius: "15px"}}> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Round border | ||
</p> | ||
|
||
```css | ||
p { | ||
border: 2px solid red; | ||
border-radius: 25px; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p style={{border: "2px solid red", borderRadius: "25px"}}> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Rounder border | ||
</p> | ||
|
||
```css | ||
p { | ||
border: 2px solid red; | ||
border-radius: 50px; | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
<p style={{border: "2px solid red", borderRadius: "50px"}}> | ||
Yashgabani845 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Roundest border | ||
</p> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.