Lecture 14 - Document Object Model
Dynamic Webpages
SWE 432, Fall 2017
Design and Implementation of Software for the Web
Today
LaToza
?
How to layout elements using CSS
?
How to interact with HTML and CSS using frontend
JavaScript
?
Next time: making and responding to HTTP requests
GMU SWE 432 Fall 2017
2
CSS "Box" Model
margin
padding
width
?
Boxes, by default, are sized just large enough to fit their contents.
?
Can specify sizes using px or %
?
border-radius
% values are relative to the container dimensions
?
margin: 10px 5px 10px 5px; (clockwise order - [top] [right] [bottom] [left])
?
border: 3px dotted #0088dd; ([width] [style] [color])
?
LaToza
height
style may be solid, dotted,dashed, double, groove, ridge, inset, outset, hidden / none
GMU SWE 432 Fall 2017
3
Centering content
?
How do you center an element inside a container?
?
Step 1: Must first ensure that element is narrower than
container.
?
LaToza
?
By default, element will expand to fill entire container.
?
So must usually explicitly set width for element.
Step 2: Use auto value for left and right to create equal gaps
GMU SWE 432 Fall 2017
4
Visibility and layout
?
?
?
Can force elements to be inline or
block element.
?
display: inline
?
display: block
Can cause element to not be laid out
or take up any space
?
display: none
?
Very useful for content that is
dynamically added and removed.
Can cause boxes to be invisible, but
still take up space
?
LaToza
visibility: hidden;
GMU SWE 432 Fall 2017
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- nosql injection owasp
- harnessing location with and
- cheat sheet and version 1 02
- online express tips blackbaud
- oracle application express
- small world with high risks a study of
- exploiting deserialization bug for remote
- mongodb cheat sheet more information can be
- lecture 14 document object model
- and backend development github pages
Related searches
- marketing management pdf lecture notes
- strategic management lecture notes pdf
- strategic management lecture notes
- philosophy 101 lecture notes
- philosophy lecture notes
- philosophy of education lecture notes
- financial management lecture notes
- financial management lecture notes pdf
- business management lecture notes
- introduction to philosophy lecture notes
- business management lecture notes pdf
- introduction to management lecture notes