8. Layout Using HTML5
header Defines a header for a document or a section
nav Defines a container for navigation links
section Defines a section in a document
article Defines an independent self-contained article
aside Defines content aside from the content (like a sidebar)
footer Defines a footer for a document or a section
details Defines additional details
summary Defines a heading for the details element
WDS
CS KKU
Web Design Technology | 2015 8
10. Layouts - Using <div> Elements
using a unit of measurement like the
pixel ex. 800x600, 1024x780 , 1280x800, 1280x960,
1280x1024 pixel
The content of the page resizes to adapt to the
size of the browser window displaying it or the
font used on the page. Using a relative the
percent ("%").
Relative layouts are accomplished by
using a relative unit like the em
using a combination of
"em" and "%" as its unit
of measurement.
1. Fixed Layout
2. Liquid Layout
3. Elastic Layout
4. Hybrid Layout
WDS
CS KKU
Web Design Technology | 2015 10
11. Fixed And Fluid Layouts
Fixable Layout Fluid Layout
Web Design Technology | 2015 11
12. Classification
float - an element can be pushed to the left or right,
allowing other elements to wrap around it.
Ex. float:left ,right, none
display- The display property specifies if/how an element
is displayed, and the visibility property specifies
if an element should be visible or hidden.
Ex. Display > none , block, inline
WDS
CS KKU
Web Design Technology | 2015 12
13. Classification (Cont.)
clear use the clear property left
right
both
none
visibility hides an element visible
hidden
collapse
WDS
CS KKU
Web Design Technology | 2015 13
16. Web Design Technology | 2015 16
WDS
CS KKU
Assignmenth1,font=Arial black,
,font color= #FFF color,
shadow=2px 2px
blur 5px,#33333,
spacing with character 5px
width:70%
height:460px
height:300px
height:100px
width:300px
border 5px solid #666
margin=center
margin=center
margin:20px
word spacing10px
box1-3 padding
15,10,0,10px,
text justify
color
#6CF
#09C
lightgrey
cornflowerblue
rgb(23,116,116)
17. Web Design Technology | 2015 17
<header><h1>header</h1> </header>
<nav> Navigition</nav>
<section>
<article>Box 1
<p>Web design concepts,color setting, background, content,
layout, font design, create web by Tools, and graphic tools</p>
</article>
<article>Box 2
<p>Web design concepts,color setting, background, content,
layout, font design, create web by Tools, and graphic tools</p>
</article>
<article>Box 3
<p>Web design concepts,color setting, background, content,
layout, font design, create web by Tools, and graphic tools</p>
</article>
</section>
<footer>web design technology </footer>
HTML CODE
Notas del editor
Fixed layout - A fixed layout in web design is one that uses a unit of measurement that does not depend on other factors, such as the size of the font or the dimensions of the browser window, to determine the width of a web page, To put it another way, the website appears with a constant size no matter how big the browser window is, or what sort of font is chosen for the page.
Liquid Layout - Such a page layout, which stretches or shrinks to fill the browser window according to its size, is called, among other things, a "relative" layout. Other names for such a layout include a "liquid" or "fluid" layout, since the page spreads itself to fill the width of a browser window the way a liquid spreads out to fill the entire surface of its container when poured into it. It is sometimes also called a "flexible" layout and an "elastic" layout.
It is sometimes also called a "flexible" layout and an "elastic" layout. When you create a web page that uses the em to specify the width of a column, or what is termed "elastic" in Dreamweaver CS4 and CS3, the size of your columns depend on the size of the fonts used on your page. Some of you may be wondering at this point, "In what sense is such a layout relative? Can't I specify the font and thus effectively create a fixed width page?“
A hybrid layout uses a combination of "em" and "%" as its unit of measurement.
Fixed Purpose
- Fixed-width layouts are much easier to use and easier to customize in terms of design.
- Widths are the same for every browser, so there is less hassle with images, forms, video and other content that are fixed-width.
- There is no need for min-width or max-width, which isn’t supported by every browser anyway.
- Even if a website is designed to be compatible with the smallest screen resolution, 800×600, the content will still be wide enough at a larger resolution to be easily legible.
Fluid Purpose
- Fluid web page design can be more user-friendly, because it adjusts to the user’s set up.
- The amount of extra white space is similar between all browsers and screen resolutions, which can be more visually appealing.
- If designed well, a fluid layout can eliminate horizontal scroll bars in smaller screen resolutions.
float - ใช้กำหนดการจัดวางรูปภาพ หรือวัตถุที่ต้องการว่าจะให้วางอยู่ด้านไหน ของข้อความ
None ไม่แสดงวัตถุนั้น
Block แสดงเป็นบล็อกโดยขึ้นบรรทัดใหม่ก่อน
Inline เป็นค่า default by element แสดงเป็นแบบ inline ไม่มีการขึ้นบรรทัดใหม่
visibility:hidden hides an element, but it will still take up the same space as before. The element will be hidden, but still affect the layout.
Clear
Elements after the floating element will flow around it. To avoid this, use the clear property.
The clear property specifies which sides of an element other floating elements are not allowed.
Add a text line into the image gallery, using the clear property:
Visibility
visibility:hidden hides an element, but it will still take up the same space as before. The element will be hidden, but still affect the layout.