logo white

Web Design & Development

Lecture 1

Who am I

Dr. Fania Raczinski

fania.raczinski@uca.ac.uk

fania portrait

CSS Box Model

width, height, margin, padding, and border

These can be adjusted using various units:

  • px: 1/96 inch
  • vw/vh: width/height of viewport
  • em: inherits font-size from parent element
  • rem: inherits font-size from root document
  • %: relative to parent element

CSS Box Model Demo

See: Interactive box-model demo

CSS Borders & Border-Radius


      div.cyan.first {
        border-radius: 50%;     /* 50% all around */
        border: 4px solid blue;
      }
      div.magenta.second {
        border-radius: 100% 0 0 0; /* border-top-left-radius */
        border: 4px dotted red;
      }
      div.yellow.third {            /* border-bottom-left-radius */
        border-radius: 50% 0 0 50%; /* border-top-left-radius */
        border: 4px ridge orange;   
      }
    
## References [The birth of the Web](https://home.cern/topics/birth-web), [A history of HTML](https://www.w3.org/People/Raggett/book4/ch02.html), [A Brief History of CSS](http://www.css-class.com/a-brief-history-of-css/), [W3C CSS Syntax Module Level 3](https://www.w3.org/TR/css-syntax-3/), [Learn HTML](https://www.codecademy.com/learn/learn-html), [Learn CSS](https://www.codecademy.com/learn/learn-css), [Learn how to build websites](https://www.codecademy.com/learn/paths/learn-how-to-build-websites), [Introduction to JavaScript](https://www.codecademy.com/learn/introduction-to-javascript), [Introduction to HTML](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML), [Introduction to CSS](https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS), [JavaScript basics](https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics), [W3Schools HTML](http://www.w3schools.com/html/), [W3Schools CSS](http://www.w3schools.com/css/), [W3Schools Borders](https://www.w3schools.com/css/css_border.asp), [W3Schools: Position Property](https://www.w3schools.com/css/css_positioning.asp), [MDN: Positioning](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning), [Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox)