Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
124 changes: 124 additions & 0 deletions Lab3CSS.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Ronell Baptiste</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style>
p:hover{outline: 2px double lightblue;}

div{/*margin left and right:auto can center texts
div>h2{}; applies styles to elements within the div*/
width: 400px;
height: 300px;
/*margin:auto;*/
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
background-color: white;
color: black;
text-align: center;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
border-radius:4px;
padding: 5px;
}

div> h2{
text-decoration: none;
}
.bold{
font-weight: bold;
}

h2{
text-align: center;
text-decoration: underline overline solid black;
}

p{
text-align: justify;
width:50vw;
margin-left: auto;
margin-right: auto;
}

section{
border-bottom: 5px solid black;
height: 40vh;
overflow-y:scroll
}

#section1::before{
background-image: url("https://images.unsplash.com/reserve/LJIZlzHgQ7WPSh5KVTCB_Typewriter.jpg?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80");
background-size: stretch;
background-position: center;
content: "";
position: absolute;
width:100%;
height: 40vh;
z-index: -2;
opacity: 0.3;
}

#section2{
padding: 2em;
color: white;
background: rgb(131,58,180);
background: linear-gradient(90deg, rgba(131,58,180,1) 0%, rgba(29,211,253,1) 50%, rgba(252,176,69,1) 100%);
}
p span{font-weight: bold;}/*stops the styling from being overrided with other styles*/

</style>
</head>
<body>
<section id="section1">


<h1>Sample content</h1>
<h2>Shakespearean Plays</h2>

<p> <span >Why </span>won't students come to labs? This is something I always ponder. After unprepared students write exams, They watch their marks in wonder.</p>

<p><span >Why </span>won't students come to labs? What is more important than class? How can you be a student if you don't even try to pass?</p>

<p> <span>Why</span> won't students come to labs? It happens all the time. If you came to labs, you'd know what to do. But you would rather duck and go lime.</p>

<p> <span >Why</span> won't students come to labs? I see them all now stressing. If you only learned this basic programming, You would surely now be zessing.</p>


</section>
<section id="section2">
<div>Notice we must select the h2 child element and apply a text decoration of none so that it overrides the other h2 style written in task 4.
This should produce the following result.

This should apply an image background to section 1 and a gradient background to section 2.
The selector '::' is used to specify pseudo elements. We use the pseudo element "before" to write a background image to the dom before the section 1 element. The styles within the selector is just a recipe we follow for displaying background images while keeping the text readable.
</div>
<h1>Section 2

</h1>
</section>
<ol>
<li>Height: Uses :hover psuedo class to hide elements of an ordered list when the mouse hovers over them </li>
<li>Width</li>
<li>Padding:Spacing within an element</li>
<li>Border:the edges of the element</li>
<li> Margin: Spacing outside the element</li>
</ol>


<img src="BorderProperty.png" alt="Box model">
<img src="BorderStyling.png">
<img src="BorderCustom.png">
<img src="ExampleBorder.png" >
<img src="Display.png" >
<img src="TextEditStyles.png" >
<img src="Font.png">
<img src="Borders.png">
<img src="Overflow.png">
<img src="Shadows.png">
</body>

</html>
114 changes: 112 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,122 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<title>DocumentRonellBaptiste</title>
<link rel="stylesheet" href="https://firebasestorage.googleapis.com/v0/b/dcit-web.appspot.com/o/a2main.css.css?alt=media&token=372ab3f9-ae18-4058-83ce-2253593a0555">

<style>
body{color: #fafafa; /*number 4*/
padding:0;
border: 0;
margin: 0;
box-sizing: border-box;
line-height: 1;
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-spacing: 0vw;
width: 100vw;
height: 100vh;}


section{height: 90px; /*number 1*/
width: 70vw; /*number 2*/
border-top: -5px; /*number 3*/
border-left: auto; /*number 4*/
border-right: auto/*number 5*/ ;
border: 1px solid #b5b5b5; /*number 6*/
border-radius: 2px; /*number 7*/
padding: 0 0 0 30px; /*number 8*/
display: flex;align-items: center;
}
.user{display: inline-block; width: 18%; text-align: center;}

.user p {margin: 0;padding: 0;text-align: center;
font-family: 'Lucida Sans Unicode';
font-weight: 100;
font-size: smaller;
}
.post-header img{width: 40px; height: 40px;border-radius: 50%;margin-right: 10px;}
/* Post-header class */
.post-header {
background-color: white;
height: 50px;
width: inherit;
padding: 5px;
border-bottom: 1px solid #b5b5b5;
box-sizing: border-box;
align-items: center;
display: flex;
box-sizing: border-box;
}

/* Navbar */
.navbar {
display: inline-block; /* number 1*/
background-color: white; /*number 2*/
width: 100%; /* number3 */
height: 54px; /* number4*/
border-bottom: 1px solid #e5e5e5; /* number5 */
box-sizing: border-box; /* number5 */
}

/* Instagram Image */
.instagram-image {
height: 40px; /* number1 */
position: relative; /* number2 */
}

/* Search Box */
.search-box {
height: 25px; /* number1 */
width: 30vw; /* number3 */
position: relative; /* number2*/
display: block;
margin: auto;
left: 35vw; /* number4 */
right: 35vw; /* number5 */
background-color: #fafafa; /* number6*/
text-align: center; /* number7 */
border: 1px solid #b5b5b5; /* number8 */
border-radius: 3px; /* number9*/
}

/* Actions Image */
.actions-image {
height: 40px; /* number1 */
position: relative; /* number2 */
right: 0; /* number3 */
}

/* Test Suite 1: Image Descendants of the User Class */
.user img {
margin-top: 5px; /*number1 */
border-radius: 50%; /* number2 */
border: double 4px #b5b5b5; /*number3 */
width: 56px; /* number4 */
height: 56px; /* number5*/
display: block; /* number6 */
margin-left: auto; /* number7 */
margin-right: auto; /* number8 */
}


.post-image{width: 100%; max-height: 400px; object-fit: cover;}
.post {
border: 1px solid #b5b5b5;
border-radius: 2px;
height: 60vh;
width: 560px;
margin: 10px auto;
padding: 10px;
display: flex;
flex-direction: column;
align-items: center;
margin-left: 119px;
margin-right: 119px;
margin-top: 10px;

}
</style>
</head>
<body>
Expand Down