Creating Page Divisions

Slides:



Advertisements
Similar presentations
Engineering Technology Lorem Ipsum Pen Assembly
Advertisements

Your Department – Your Institution
TITLE. An engineer’s World
Possible place to list names etc.
Logo This could be the poster title
Poster presentation title (Calibri, 80pt, Bold) Author A, Author B, Author C, ... (Calibri, 72pt, Bold) Affiliation (Calibri, 60pt, Bold) AFFILIATION LOGO.
Materials & Methods Type Your Poster Title in Here This is where you should put your name and date Background and Objectives Type your words here: Lorem.
Authors, e.g. Gokhan Gurbuz
Name of Community Address | Category
Poster Number – Poster Title
Newsletter template This template is set up on 8.5”x11” letter size paper Place your content into the chosen template and adjust as desired Print both.
Template for a 32” x 54” poster presentation (your title goes here)
Poster Title Template, Times 72 font
Template for a 3’ x 4’ poster presentation (your title goes here)
TITLE. An engineer’s World
Author Name. , Author Name
Type Your Poster Title in Here This is where you should put your name and date Introduction Type your words here: Lorem ipsum dolor sit amet, consectetuer.
Wile E. Coyote, Super Genius
Place Title Here Header Header Header Header Header Header Header
Authors: Name, Name, Name
Company Presentation Template
Research Poster Title Introduction Results Conclusions
Template for a 4” x 8” poster presentation (your title goes here)
Poster Title (Arial 65pts Bold)
Template for a 43” x 54” poster presentation (your title goes here)
LEAD MAGNET FREE DESIGN TEMPLATE EDITABLE TEMPLATE
Saratoga, California — Monday, March 18, 2013 — 2 pages five cents
THIS IS SAMPLE TEXT. YOUR TEXT GOES HERE
How to use this template
Template for a 36” x 54” poster presentation (your title goes here)
Template for a 4” x 4” poster presentation (your title goes here)
Title Bar And Sub Heading Abstract Discussion Introduction References
Author Name. , Author Name
Type Your Poster Title in Here This is where you should put your name and date Introduction Type your words here: Lorem ipsum dolor sit amet, consectetuer.
Template for a 27” x 54” poster presentation (your title goes here)
TITLE. An engineer’s World
Title Authors and Affiliations (Example: University of California Global Food/Carbon Neutrality Initiative Fellowship) Phase II: In-depth assessment (similar.
Quarterly Report 142,315 84, , Summary
Presentation title lorem ipsum dolor sit amet, consectetur adipiscing elit Speaker name.
Place Title Here Header Header Header Header Header Header Header
Title Bar A B C A-1 A1 C1 And Sub Heading Abstract Introduction
Poster title (character size min. 60 pt)
TITLE. An engineer’s World
Authors, e.g. Gokhan Gurbuz
TITLE. An engineer’s World
Presentation Title (example size – 54 pt) Presenter’s Name (example size – 40 pt) University of Wisconsin – Superior (example size – 36 pt) Text Block.
Type Your Poster Title in Here This is where you should put your name and date Introduction Type your words here: Lorem ipsum dolor sit amet, consectetuer.
Poster title (character size min. 60 pt)
The Power of PowerPoint Fomalhaut Template
Place Title Here Header Header Header Header Header
LOGO Company description - Max 1500 Characters PRODUCT/SERVICE
LOGO Company description - Max 1500 Characters FUND NAME
Project Title Author(s) Introduction Results Discussion Methods
Poster´s title International
Poster Title Author #1, Author #2, Author #3
Scanner Class Prof Crudele 09/02/07.
Project Title Author(s) Introduction Discussion Results Methods
Project Title Author(s) Background Results Discussion Hypothesis
Project Title Author(s) Background Results Discussion Hypothesis
Company description - Max 1500 Characters
Poster Title (Arial 65pts Bold)
Title of Project Abstract Data Discussion Hypothesis Methods Terms
Poster title This could be your sub-line – Authors, Co-Authors,
Poster Title Template, Times 72 font
Title of Project Abstract Data Discussion Hypothesis Methods Terms
Title of Poster Your Name Heading 1 Heading 2 Heading 3 Heading 4
RealState Company Page #
Title of Poster Your Name Heading 1 Heading 2 Heading 3
Title Area This is a sample text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna.
Name of Community Address | Category
Presentation transcript:

Creating Page Divisions Chapter 9 Creating Page Divisions

Learning Objectives Pros and cons of using tables to format content within an HTML page How to create a page division using the <div> and </div> tag pairs How to create dynamic page content that scales in relation to the browser window size

Creating Page divisions Using the <div> and </div> pair, you can define a container for styling related components in the HTML page.

Using a division to apply a style <DOCTYPE! html> <html> <body> <p>This is paragraph 1</p> <div style="background:blue; color:white;"> <p>This is paragraph 2</p> <p>This is paragraph 3</p> </div> <p>This is paragraph 4</p> </body> </html>

Using divisions to create columns <DOCTYPE! html> <head> <style type="text/css"> .Start { background-color:red; width:200px; height:200px; position:absolute;left:0px; top:0px; } .Middle { background-color:white; width:200px; height:200px; position:absolute;left:200px; top:0px; } .End { background-color:blue; width:200px; height:200px; position:absolute;left:400px; top:0px; } </style> </head> <html> <body> <div class="Start"> </div> <div class="Middle"> </div> <div class="End"> </div> </body> </html>

Placing text in the columns <DOCTYPE! html> <head> <style type="text/css"> .Start { background-color:red; width:200px; height:200px; position:absolute;left:0px; top:0px; } .Middle { background-color:white; width:200px; height:200px; position:absolute;left:200px; top:0px; } .End { background-color:blue; width:200px; height:200px; position:absolute;left:400px; top:0px; } .pad { margin: 0px 10px 10px 10px; } </style> </head> <html> <body> <div class="Start"><p class="pad">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</P></div> <div class="Middle"><p class="pad">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </p></div> <div class="End"><p class="pad">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui</p></div> </body> </html>

Simulating table layout <DOCTYPE! html> <head> <style type="text/css"> .CenterAll { width:800px; margin-left: auto; margin-right: auto; } .Outer { background-color:white; width:800px; text-align:center; border:1px solid black; } .Column { width:400px; text-align:left; float:left; } .Clear { clear: both; } .pad { margin:5px 5px 5px 5px; } </style> </head> <html> <body bgcolor="lightblue"> <div class="CenterAll"> <div class="Outer"> <div style="border:1px solid black;"> <img src="http://www.WebSiteDevelopmentBook.com/Chapter09/Pets.jpg"/> </div> <div class="Column"> <p class="pad">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a tellus vitae quam elementum interdum quis a massa. Etiam interdum bibendum leo, rhoncus convallis turpis sodales tempus. Sed eget orci ac felis mollis pretium. Aenean et elit vitae lorem blandit aliquam et viverra risus. In blandit, risus ac commodo pharetra, risus magna tincidunt ante, at posuere odio odio eu enim. Phasellus libero dui, eleifend a eleifend eget, tempor et libero. Curabitur porta posuere dictum. Morbi cursus nulla auctor neque semper euismod. Nullam odio tortor, venenatis at vehicula pulvinar, lobortis nec nisl. Nam consequat cursus nibh quis tincidunt. Vivamus sed libero quis mauris facilisis placerat.</p> </div> <div class="Column"><p class="pad">Integer et mauris massa. Praesent porttitor varius vehicula. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean aliquam ligula et risus imperdiet vestibulum. Nullam ut metus a tellus dignissim convallis in ac augue. Etiam fermentum felis quis leo suscipit a scelerisque ante imperdiet. Morbi vestibulum scelerisque viverra. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam at arcu mauris. Sed est arcu, placerat feugiat porttitor et, cursus eget nulla.</p> </div> <div class="clear"></div> </div> </div> </body> </html>

Creating a sizeable page <DOCTYPE! html> <head> <style type="text/css"> .Start { background-color:red; width:20%; height:100%; float:left; } .Middle { background-color:white; width:20%; height:100%; float:left; } .End { background-color:blue; width:20%; height:100%; float:left; } .pad { margin: 0px 10px 10px 10px; } </style> </head> <html> <body> <div class="Start"><p class="pad">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</P></div> <div class="Middle"><p class="pad">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </p></div> <div class="End"><p class="pad">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui</p></div> </body> </html>

Real world: Using Divisions to stack text <DOCTYPE! html> <head> <style type="text/css"> .Start { background-color:red; width:200; height:200; position:absolute; top:100; left:100; z-index=0; } .Middle { background-color:yellow; width:200; height:200; position:absolute; top:200; left:250; z-index=1; } .End { background-color:blue; width:200; height:200; position:absolute; top:100; left:400; z-index=2; } .pad { margin: 0px 10px 10px 10px; } </style> </head> <html> <body> <div class="Start"><p class="pad">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</P></div> <div class="Middle"><p class="pad">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. </p></div> <div class="End"><p class="pad">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui</p></div> </body> </html>

summary For years, developers have made extensive use of tables to format content within a web page. Developers will argue that the use of tables for formatting is safe because browsers, all browsers, will render the content correctly. Unfortunately, the use of tables for content formatting, particularly nested table, can lead to code that is difficult to maintain and possibly large in size, which increases download times. As an alternative formatting technique, developers are moving to page divisions, which are essentially web-page containers within which they can group related HTML tags for styling and positioning. To create such containers, developers use the <div> and </div> tag pair.