23
Advanced HTML / CSS

HTML Bootstrap Workshop

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: HTML Bootstrap Workshop

Advanced HTML / CSS

Page 2: HTML Bootstrap Workshop

Recap from last time

Page 3: HTML Bootstrap Workshop

HTML CSS<p class=“foo”>Hello</p> .foo {

background: white; color: blue; margin-left: 20px; }

HTML objects are styled using CSS!

Page 4: HTML Bootstrap Workshop

HTML CSS• Markup language • .html file extension • Contains actual content

• Style sheets • .css file extension • Contains no content, only styling

Page 5: HTML Bootstrap Workshop

1. Create a project folder 2. Create a file called index.html 3. Write a basic “Hello World” page (don’t forget title, header and body!)

Page 6: HTML Bootstrap Workshop

1. Create a stylesheet style.css 2. Link to your stylesheet <link href=“” rel=“stylesheet”>

3. Give your title a color.

Page 7: HTML Bootstrap Workshop

1. Create two more files about.html & contact.html

2. Create a list of links from index.html 3. Copy the content from index to the

other two pages

Page 8: HTML Bootstrap Workshop

We have a basic website!

Page 9: HTML Bootstrap Workshop

Now let’s add some styling…

Page 10: HTML Bootstrap Workshop

http://www.getbootstrap.com

Page 11: HTML Bootstrap Workshop

Navbar

• Copy-paste Basic Navbar into top of HMTL body • Inspect element with Chrome or Firefox Firebug!• Remove stuff we don’t need • Put a paragraph ( <p>! ) below the header

Page 12: HTML Bootstrap Workshop

Grid• Skeleton for modern Websites • 12 columns with total span width of 960px (width container) • Should be placed within container ( <div class=“container”> ) • Coluns should be placed within row !=> Make two rows; 1 with 2 columns and one with 3

Page 13: HTML Bootstrap Workshop

Lorem ipsum

http://www.lipsum.com

Page 14: HTML Bootstrap Workshop

Buttons

• Bootstrap gives several colours AND sizes! • They are classes, so they an be applied to links too! • Add a large “succcess” button below your tagline

Page 15: HTML Bootstrap Workshop

Icons• Used as span class: <span class="glyphicon glyphicon-star”></span> !

• They size with the element they span! • Add a large “succcess” button below your tagline • Put a star icon before all your three banner elements

Page 16: HTML Bootstrap Workshop

Overruling Bootstrap styling

• The lowest css file gets priority over the ones declared before • Good site for colors: flatuicolors.com • Nested elements get priority:

<div class=“jumbotron”>!! <h1>Foo</h1>!</div>

h1 {!! color: green;!}

.jumbotron h1 {!! color: blue;!}

You can change this by using !important

Page 17: HTML Bootstrap Workshop

Patterns

http://www.subtlepatterns.com

Page 18: HTML Bootstrap Workshop
Page 19: HTML Bootstrap Workshop

Javascript• Introduced in 1996 by Netscape • Originally meant to manipulate Document Object Model (DOM) !!!!• Always activate JS itself and JS libraries you use at the bottom

of your Webpage for better performance:

• Let’s activate a Javascript Modal / Layover

Page 20: HTML Bootstrap Workshop

Final Result

Page 21: HTML Bootstrap Workshop

http://www.knownly.net

Deploy

Page 22: HTML Bootstrap Workshop

We have a live website!

Page 23: HTML Bootstrap Workshop

http://getbootstrap.com/getting-started/#examples

Some nice examples