Why use Divs when Tables have been working?

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

Advance CSS (Menu and Layout). CSS Navigation MENU.
An in-class debugging exercise. All based upon real errors.
Cascading Style Sheets
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
Very quick intro HTML and CSS. Sample html A Web Title.
Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
End User Computing An Introduction to CSS Sujana Jyothi Research Lab1, Callan Building, Department of Computer Science
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Cascading Style Sheet CSS CS1520 Ali Alanjawi. 2 TA Information Ali Alanjawi Homepage: Office:
Diliev.com & pLOVEdiv.com  DIliev.com.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Cos 125 Day 22. Agenda Assignment 6 Not corrected Waiting for tune-ins Assignment 7 is posted Assignment 7 Due April 2PM Left to do 1 Assignments.
Art 128 Interface Programming 1 In-class Presentation Week 11B.
Tables And Lists. Slide 2 Lecture Overview Learn about the basics of tables Create simple 2-dimensional tables Format tables Create tables with complex.
HTML. Goals How to use the Komodo editor HTML coding and testing Basic HTML tags List and Images Tables and Links At least 2 pages and navigation
Images and Tables. Displaying Image Attributes: SRC= " mypic.gif " – Name of the picture file SRC= " pic/mygif.jpg " – Name of file found in pic directory.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
CO1552 – Web Application Development Cascading Style Sheets.
HTML B OOT C AMP Chapter 10 Tables Kirkwood Continuing Education © Copyright 2015, Fred McClurg All Rights Reserved.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
WebD Introduction to CSS By Manik Rastogi.
IS1500: Introduction to Web Development
FMI-PLOVDIV Web Dynamic Applications
CCT260H - Christopher Evan Jones
Web Development & Design Foundations with XHTML
CS3220 Web and Internet Programming CSS Basics
Style Sheets.
Semester - Review.
Unit 3 - Review.
Creating Your Own Webpage
Chapter 6 Cascading Style Sheets™ (CSS)
CSS.
Cascading Style Sheets
Cascading Style Sheets (CSS)
Introduction to Web programming
>> CSS Layouts.
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Chapter 6 More CSS Basics Key Concepts
Style Sheet Create a new CSS called Cameras.CSS TD Web Authoring
Table CSS Create a new CSS called tablestyle.CSS Green Background
TOPICS Chrome Dev Tools Process for Building a Static Website
The Internet 10/13/11 The Box Model
Introduction to HTML Today we will look at:
5.2.3 Be able to use HTML and CSS to construct web pages
For the World Wide Web Styling Tables with CSS
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
The Internet 10/6/11 Cascading Style Sheets
CS3220 Web and Internet Programming CSS Basics
CSS.
Creating a simple web page
CS3220 Web and Internet Programming CSS Basics
Principles of Web Design 5th Edition
Creating your own Styles
Session IV Chapter 15 - How Work with Fonts and Printing
Introduction to Cascading Style Sheets (CSS)
Introduction to Styling
Cascading Style Sheets
Presentation transcript:

Why use Divs when Tables have been working? Divs vs Tables Why use Divs when Tables have been working?

Why use Tables or Divs Tables and Divs act as containers to hold all of our content. Think of carrying a liquid without a bottle: The liquid goes everywhere. The content goes everywhere.

Why and Why NOT Tables Why Use: Using tables to build structure is quite intuitive. We see tabular data every day, and the concept is well known therefore easier to learn. Why Not Use: The table tag is meant for listing tabular data. Code for tables is more complex therefore slower to load. Harder to maintain. They make it harder to separate content from design.

Why and Why NOT Tables Table Code Div Code <table cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="3" height="120px">....</td> </tr> <td class="menu" valign="top">...</td> <td class="content" valign="top">...</td> <td class="aSide" valign="top">...</td> <td colspan="3">...</td> </tr> </table> <div id="header">...</div> <div id="menu">...</div> <div id="content">...</div> <div id="aSide">...</div> <div id="footer">...</div> Table Code Div Code

Are Tables Dead? Tables inside of tables is known as nested tables and they should not be used. BUT… Tables inside Divs are very useful for: Tabular Data Photo Galleries Shopping Web Stores Etc.

Divs – Good, Bad & Ugly Good: Divs work extremely well with CSS Very little code, fast loading, easy for SEO Bad Divs can be frustrating when doing a more complicated site. Divs require an understanding of CSS. Ugly Divs can blow apart if not properly done when looked at on a different platform (cellphone, tablet, computer).

Download the “div-css-sample. html” & “styles Download the “div-css-sample.html” & “styles.css” files to the same folder. Open the html file in Dreamweaver and make changes to the Styles. Divs – Sample <html > <head> <title>Div & CSS Lesson</title> <link href="styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="header">This is the header</div> <div id="leftnav">This is the leftnav</div> <div id="rightnav">This is the rightnav</div> <div id="content">This is the content</div> <div id="footer"> <p>This is the footer</p> </div> </body> </html>

Style Sheet @charset "utf-8"; /* CSS Document */ #container { width: 900px; margin:auto; } #header { height: 100px; background-color: #01c0a7; border-bottom: 2px solid #000000; #leftnav { float: left; width: 140px; height: 400px; background-color: #f8aa3c; border-right: 1px dashed #694717; #rightnav { float: right; width: 140px; height: 400px; background-color: #f8aa3c; border-left: 1px dashed #694717; } #content { position width: 620px; #footer { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 36px; background-color: #FF0000; text-align: center; border-top-width: thick; border-top-style: groove; border-color: #0000FF;

Questions ???