Skip to content

Branch1 #681

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
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2e4891a
changed div1 and div3 padding argument's first value to 32px. (First …
Prateek14b Feb 3, 2025
534272e
changed div1's margin to 12 px to address second bullet point in the …
Prateek14b Feb 3, 2025
1fa6ec8
changed margin-bottom to 48px for div2, to address 3rd bullet point i…
Prateek14b Feb 3, 2025
0b8d51b
idk how, but changing margin-left from 0px to 'auto'(for the div 3) a…
Prateek14b Feb 3, 2025
b100e95
crated external stylesheet; linked it to html; addded type selector f…
Prateek14b Feb 3, 2025
77d11ef
Added internal CSS style to p element. Addresses second requirement.
Prateek14b Feb 3, 2025
a77eee4
Addressed third requirement; added inline styling to button element.
Prateek14b Feb 3, 2025
4fd35ff
created oddnumber class, and added style rules to it. Then, applied i…
Prateek14b Feb 4, 2025
db1f615
created appropriate style rules for classes second-element and fourth…
Prateek14b Feb 4, 2025
eb57350
third element should have two classes, so created new class and appli…
Prateek14b Feb 4, 2025
9b36318
fixed a minor error in .oddnumber class; replaced declaration that sp…
Prateek14b Feb 4, 2025
d1ccb24
started exercise 3; created common-style class, and added the style r…
Prateek14b Feb 4, 2025
94c127f
Reverting the change from previous commit. Why? Because I made a mist…
Prateek14b Feb 4, 2025
bf535e1
created two classes ('first-element' and 'second-element') and applie…
Prateek14b Feb 4, 2025
be73444
fixed typo in index.html. now, classnames are matching.
Prateek14b Feb 4, 2025
bf46fd4
used grouping selector to add common styles that apply to both elemen…
Prateek14b Feb 4, 2025
bf076ed
easy-peasy. Just understand when you got to use the chaining selector…
Prateek14b Feb 4, 2025
9e6d11f
EASY-PEASY. Just learned descendant combinator, and applied its knowl…
Prateek14b Feb 4, 2025
1e4dd61
given the description of the commit in comments on CSS! just did some…
Prateek14b Feb 10, 2025
09ea754
commit description provided in comments. JUst used chaining selector …
Prateek14b Feb 10, 2025
23a4de4
chained 3 selectors div.text.child to get precedence over pre-existin…
Prateek14b Feb 10, 2025
a5815d0
yeah, i just wanna call it a day, but i don't wanna leave without pus…
Prateek14b May 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions foundations/block-and-inline/01-margin-and-padding-1/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ body {
background: pink;
border: 3px solid blue;
/* CHANGE ME */
padding: 0px;
margin: 0px;
padding: 32px;
margin: 12px;
}

.two {
background: lightblue;
border: 3px solid purple;
/* CHANGE ME */
margin-bottom: 0px;
margin-bottom: 48px;
}

.three {
background: peachpuff;
border: 3px solid brown;
width: 200px;
/* CHANGE ME */
padding: 0px;
margin-left: 0px;
padding: 32px;
margin-left: auto;

}
1 change: 1 addition & 0 deletions foundations/cascade/01-cascade-fix/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
</div>
</body>
</html>
<!--yeah, im calling it a day. woohoo-->
19 changes: 10 additions & 9 deletions foundations/cascade/01-cascade-fix/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ body {
font-weight: 800;
}

.small-para {
font-size: 14px;
font-weight: 800;
}

/* just repositioned this .para class selector above .small-para. This ensures this class property gets overruled by the one below it. */
.para {
font-size: 22px;
}

.confirm {
background: green;
.small-para {
font-size: 14px;
font-weight: 800;
}
/*changed background to background-color as error correction. Also, chained classes together to get precedence.*/
.confirm.button {
background-color: green;
color: white;
font-weight: bold;
}
Expand All @@ -28,8 +29,8 @@ body {
color: rgb(0, 0, 0);
font-size: 20px;
}

.child {
/*chained three selectors to target the child div element, and give this precedence over the 2-chained selector below. */
div.child.text {
color: rgb(0, 0, 0);
font-weight: 800;
font-size: 14px;
Expand Down
10 changes: 9 additions & 1 deletion foundations/intro-to-css/01-css-methods/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Methods for Adding CSS</title>
<link rel="stylesheet" href="styles/style.css">
<style>
p{
background-color: green;
color:white;
font-size: 18px;
}
</style>
</head>
<body>
<div>Style me via the external method!</div>
<p>I would like to be styled with the internal method, please.</p>
<button>Inline Method</button>
<button style="background-color: orange; font-size: 18px;">Inline Method</button>
</body>
</html>
7 changes: 7 additions & 0 deletions foundations/intro-to-css/01-css-methods/styles/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
div{
background-color: red;
color: white;
font-size: 32px;
text-align: center;
font-weight: bold;
}
10 changes: 5 additions & 5 deletions foundations/intro-to-css/02-class-id-selectors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<link rel="stylesheet" href="style.css">
</head>
<body>
<p>Number 1 - I'm a class!</p>
<div>Number 2 - I'm one ID.</div>
<p>Number 3 - I'm a class, but cooler!</p>
<div>Number 4 - I'm another ID.</div>
<p>Number 5 - I'm a class!</p>
<p class="oddnumber">Number 1 - I'm a class!</p>
<div id="second-element">Number 2 - I'm one ID.</div>
<p class="oddnumber largerfont">Number 3 - I'm a class, but cooler!</p>
<div id="fourth-element">Number 4 - I'm another ID.</div>
<p class="oddnumber">Number 5 - I'm a class!</p>
</body>
</html>
16 changes: 16 additions & 0 deletions foundations/intro-to-css/02-class-id-selectors/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.oddnumber{
background-color: rgb(244, 119, 119);
font-family: 'Verdana', 'DejaVu Sans', 'sans-serif';
}
#second-element{
color: rgb(0,0,256);
font-size: 36px;
}
#fourth-element{
background-color: rgb(96, 244, 96);
font-size: 24px;
font-weight: bold;
}
.largerfont{
font-size: 24px;
}
4 changes: 2 additions & 2 deletions foundations/intro-to-css/03-grouping-selectors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="style.css">
</head>
<body>
<button>Click Me!</button>
<button>No, Click Me!</button>
<button class="first-element">Click Me!</button>
<button class="second-element">No, Click Me!</button>
</body>
</html>
11 changes: 11 additions & 0 deletions foundations/intro-to-css/03-grouping-selectors/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.first-element{
background-color:black;
color:white;
}
.second-element{
background-color:yellow;
}
.first-element, .second-element{
font-size:28px;
font-family: Helvetica, 'Times New Roman',sans-serif;
}
9 changes: 8 additions & 1 deletion foundations/intro-to-css/04-chaining-selectors/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/* Add CSS Styling */
.proportioned.avatar{
width: 300px;
height: auto;
}
.avatar.distorted{
width: 200px;
height: 400px;
}
6 changes: 6 additions & 0 deletions foundations/intro-to-css/05-descendant-combinator/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
div p{
background-color:yellow;
color:red;
font-size: 20px;
text-align: center;
}