-
-
Notifications
You must be signed in to change notification settings - Fork 620
NW6 | Bakhat Begum | HTML-CSS | HTML-CSS-Module-Project | Week 1 #644
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
Open
BakhatBegum
wants to merge
18
commits into
CodeYourFuture:master
Choose a base branch
from
BakhatBegum:NW6/Bakhat-Begum
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8286047
I edit html and css to re-create the design
a60b14f
I did change the first img size
07e850c
I added margine on my nav tag
55e66d7
This is for test
5201c8f
this is for test.
ca14859
used media screen for mobile
a26514e
this is for test
4f68dfc
media screen
5670e42
there was some code which i added
657e399
added changes
12eddc5
added changes into image section
7e75326
added changes
1278cbf
added new changes
a6218bb
added new code
60e2a20
added changes
3d90909
added changes on img width
0ac25fc
added changes
6f8672b
added width to pro-img
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 |
|---|---|---|
| @@ -1,19 +1,321 @@ | ||
| body { | ||
| font-family: "Roboto", sans-serif; | ||
| -webkit-font-smoothing: antialiased; | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
|
|
||
| /* We are using the 'Roboto' font from Google. This has already been added to your HTML header */ | ||
| body, | ||
| button { | ||
| font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif; | ||
| color: var(--grey-dark); | ||
| font-size: 1rem; | ||
| } | ||
|
|
||
| body { | ||
| font-family: 'Roboto', sans-serif; | ||
| -webkit-font-smoothing: antialiased; | ||
| h1, | ||
| p { | ||
| margin-top: 0; | ||
| margin-bottom: 0; | ||
| } | ||
|
|
||
| .header, | ||
| .content, | ||
| .footer { | ||
| padding: 0; | ||
| margin: 0; | ||
| } | ||
|
|
||
| /*Header*/ | ||
|
|
||
| .header { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| height: 5rem; | ||
| background-color: aliceblue; | ||
| } | ||
|
|
||
| .header__logo { | ||
| max-height: 70px; | ||
| width: 1.5rem; | ||
| padding-left: 100px; | ||
| } | ||
|
|
||
| #hamnav { | ||
| margin-left: 5em; | ||
| } | ||
|
|
||
| #hamnav label, | ||
| #hamburger { | ||
| display: none; | ||
| } | ||
|
|
||
| #hamitems { | ||
| margin-left: 3em; | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| gap: 2em; | ||
| padding: 10px; | ||
| font-weight: 600; | ||
| } | ||
| #hamitems a { | ||
| padding: 13px; | ||
| color: gray; | ||
| text-decoration: none; | ||
| text-align: center; | ||
| } | ||
|
|
||
| #hamitems a:hover { | ||
| color: orange; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's great to see the implementation of the hover effect. This small addition enhances the user experience by providing a visual response. Well done! |
||
|
|
||
| /** | ||
| * Add your custom styles below | ||
| * | ||
| * Remember: | ||
| * - Be organised, use comments and separate your styles into meaningful chunks | ||
| * for example: General styles, Navigation styles, Hero styles, Footer etc. | ||
| * | ||
| * - When using Flexbox, remember the items you want to move around need to be inside a parent container set to 'display: flex' | ||
| */ | ||
| /*Button*/ | ||
|
|
||
| button { | ||
| background-color: #c05326; | ||
| color: white; | ||
| border-radius: 3px; | ||
| border: none; | ||
| padding: 1rem 1.5rem; | ||
| } | ||
|
|
||
| /* INSERT BUTTON STYLES HERE */ | ||
|
|
||
| button:hover { | ||
| background-color: gray; | ||
| } | ||
|
|
||
| .btn { | ||
| padding-left: 45%; | ||
| padding-top: 2em; | ||
| padding-bottom: 5em; | ||
| } | ||
|
|
||
| /*Content*/ | ||
|
|
||
| .content { | ||
| display: flex; | ||
| flex-direction: column; | ||
| /* padding-right: 70px; */ | ||
| } | ||
|
|
||
| /*Promote*/ | ||
|
|
||
| .promote { | ||
| display: flex; | ||
| flex-direction: row; | ||
| padding-top: 2.5rem; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .color { | ||
| color: #c05326; | ||
| } | ||
|
|
||
| .pro { | ||
| margin: 0; | ||
| background-color: #ffb6c1; | ||
| height: 17rem; | ||
| font-weight: bold; | ||
| font-size: 1.6rem; | ||
| text-align: center; | ||
| padding-top: 6rem; | ||
| padding-left: 2rem; | ||
| color: rgb(52, 44, 44); | ||
| } | ||
|
|
||
| .pro__img { | ||
| height: 23rem; | ||
| width: 50%; | ||
| } | ||
|
|
||
| .pro__btn { | ||
| padding-top: 1em; | ||
| } | ||
|
|
||
| /*Introduction*/ | ||
|
|
||
| .introduction-img { | ||
| background-image: url("../img/first-background.jpg"); | ||
| height: 34em; | ||
| background-size: 100% 100%; | ||
| background-repeat: no-repeat; | ||
| } | ||
| .karma-introduction h1 { | ||
| padding-top: 100px; | ||
| font-size: 2.5rem; | ||
| color: white; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .karma-introduction p { | ||
| font-size: 2rem; | ||
| margin-bottom: 2rem; | ||
| padding-top: 80px; | ||
| color: white; | ||
| text-align: center; | ||
| position: relative; | ||
| } | ||
|
|
||
| .main { | ||
| position: static; | ||
| margin-bottom: 3rem; | ||
| padding: 4rem 20%; | ||
| font-size: 2rem; | ||
| font-weight: 50; | ||
| text-align: center; | ||
| display: flex; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| /*Caption*/ | ||
|
|
||
| .more__caption { | ||
| padding: 0 12rem; | ||
| display: flex; | ||
| flex-direction: row; | ||
| gap: 2rem; | ||
| flex-wrap: wrap; | ||
| align-content: space-around; | ||
| text-align: center; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| /*articles*/ | ||
|
|
||
| .art-text { | ||
| display: flex; | ||
| justify-content: center; | ||
| font-size: 1.6rem; | ||
| margin-bottom: 2rem; | ||
| padding-top: 30px; | ||
| } | ||
|
|
||
| .article__img { | ||
| padding-left: 2.5rem; | ||
| width: 8rem; | ||
| } | ||
|
|
||
| /*Footer*/ | ||
| hr.new { | ||
| border-top: 1px solid rgb(232, 224, 224); | ||
| width: 70%; | ||
| margin-top: 4rem; | ||
| } | ||
|
|
||
| .footer { | ||
| margin-top: 1rem; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .footer p { | ||
| padding: 1.5rem; | ||
| text-align: center; | ||
| font-size: 0.85rem; | ||
| } | ||
|
|
||
| .text { | ||
| color: gray; | ||
| padding-top: 0.5em; | ||
| } | ||
|
|
||
| .img__footer { | ||
| text-align: center; | ||
| width: 1rem; | ||
| border: 1px solid gray; | ||
| border-radius: 50%; | ||
| padding: 10px; | ||
| overflow: hidden; | ||
| } | ||
| @media screen and (max-width: 768px) { | ||
| .header, | ||
| .content, | ||
| .footer { | ||
| padding: 0; | ||
| } | ||
|
|
||
| .header__logo { | ||
| padding: 0; | ||
| } | ||
| #hamitems { | ||
| display: block; | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
| z-index: 1000; | ||
| gap: 0.3em; | ||
| } | ||
| #hamitems a { | ||
| border: 2px solid rgb(117, 105, 105); | ||
| border-radius: 3px; | ||
| } | ||
|
|
||
| .nav__link { | ||
| background-color: rgb(243, 233, 234); | ||
| font-weight: 600; | ||
| padding: 0.3em; | ||
| } | ||
|
|
||
| #hamnav label { | ||
| display: inline-block; | ||
| color: rgb(35, 26, 18); | ||
| font-size: 1.2em; | ||
| font-style: normal; | ||
| padding: 10px; | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
| z-index: 1000; | ||
| } | ||
|
|
||
| #hamburger { | ||
| display: none; | ||
| } | ||
|
|
||
| #hamitems { | ||
| display: none; | ||
| } | ||
|
|
||
| #hamnav input:checked ~ #hamitems { | ||
| display: flex; | ||
| flex-direction: column; | ||
| margin-top: 43px; | ||
| } | ||
|
|
||
| .introduction-img { | ||
| background-size: 100% 100%; | ||
| object-fit: cover; | ||
| } | ||
|
|
||
| .btn { | ||
| padding-left: 38%; | ||
| padding-bottom: 20%; | ||
| } | ||
|
|
||
| .article__img { | ||
| padding-left: 1rem; | ||
| width: 33%; | ||
| } | ||
|
|
||
| .more__caption { | ||
| padding: 0 3rem; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| .pro__img { | ||
| width: 100%; | ||
| } | ||
|
|
||
| .promote { | ||
| display: flex; | ||
| flex-direction: column; | ||
| padding-top: 3rem; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .pro { | ||
| width: 100%; | ||
| overflow: hidden; | ||
| padding-left: 0; | ||
| } | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's take a look at the styles here. You'll notice that they are exactly the same. Instead of repeating yourself, you can optimise your code by selecting both the
h1andpelements and applying the desired styling together. This approach is called DRY code, which stands for "Don't Repeat Yourself." It helps you keep your code simple, clear, and efficient. By following this practice, you can avoid unnecessary repetition, make your code easier to maintain, and achieve a more streamlined solution.