Applying CSS to Tables Stylish Tables.

Slides:



Advertisements
Similar presentations
INTRODUCTORY Tutorial 8 Creating Data Tables. XP Objectives Contrast data tables with layout tables Create a table to display and organize data Provide.
Advertisements

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Chapter 3 – Web Design Tables & Page Layout
Web Page Design Using Tables Here you see three examples of how tables can be used to organize your content. We call this page layout or design. You can.
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything Text Lists Other tables Pictures …
Internet Basics & Way Beyond!
Working with Web Tables
/k/k 1212 Cascading Style Sheets Part one Marko Boon
กระบวนวิชา 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.
Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
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.
 Pseudo-elements  Centering  Tables  Classes and ids.
Design, Formatting, CSS, & Colors September 9, 2010.
Tutorial #8 – Creating Data Tables. Tutorial #6 Review – Layouts Two Column Fixed Width, Three Column Fixed Width Class VS. ID Container Universal Selector.
 Missing (or duplicate) semicolons can make the browser completely ignore the style rule.  You may add extra spaces between the properties/values to.
HTML. Goals How to use the Komodo editor HTML coding and testing – List and Images – Tables and Links – At least 2 pages and navigation –
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Tutorial 6 Creating Tables and CSS Layouts. Objectives Session 6.1 – Create a data table to display and organize data – Modify table properties and layout.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
CHAPTER 10 Formatting Tables and Forms. Using Tables the Right Way  HTML and XHTML have a LOT of tags dedicated to building a table  If you have only.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Columns run horizontally in tables and rows run from left to right.
Tutorial 5 Working with Tables and Columns
Tutorial 5 Working with Tables and Columns
Html Tables Basic Table Markup. How Tables are Used For Data Display Tables were originally designed to display and organize tabular data (charts, statistics,
TABLES 1. In this chapter you will learn that tables have many uses in HTML. Objectives: Upon completing this section, you should be able to: 1. Insert.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything › Text › Lists › Other tables › Pictures › …
Basic Design Tips for Web Pages. Alignment Left, right, center Choose one alignment and use it on the entire page Align form elements, table elements,
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.
CSS Table Styling. Up to this point, as we haven't applied any CSS styling to our tables, our example tables have not been too pleasing to the eye. CSS.
Laying out Elements with CSS
Tutorial 5 Working with Web Tables
CSE 154 Lecture 17: HTML tables.
Organizing Content with Lists and Tables
Table Styling.
CSS Table Styling.
Table Styling.
Web Development & Design Foundations with HTML5
CSS Layouts: Grouping Elements
Table Styling.
Web Development & Design Foundations with HTML5 8th Edition
Positioning Objects with CSS and Tables
IS 360 Declaring CSS Styles
LAB Work 02 MBA 61062: E-Commerce
Tutorial 5 Working with Tables and Columns
Cascading Style Sheets (Layout)
How to work with tables Chapter 10.
Tutorial 5 Working with Web Tables
The Internet 10/25/11 XHTML Tables
CSS Table Styling.
8 Tables.
CSS Table Styling.
CSS Borders and Margins.
For the World Wide Web Styling Tables with CSS
DREAMWEAVER MX 2004 Chapter 3 Working with Tables
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with HTML5
The Internet 10/27/11 XHTML Forms
Web Design & Development
Principles of Web Design 5th Edition
CS3220 Web and Internet Programming More CSS
Make a Heading and sub-headings.
CS3220 Web and Internet Programming More CSS
Positioning Objects with CSS and Tables
Basics of Web Design Chapter 9 Table Basics Key Concepts
CS3220 Web and Internet Programming More CSS
Presentation transcript:

Applying CSS to Tables Stylish Tables

Issue #1 Borders

Causes to look like there’s a small well between each cell By Default… Borders show doubled-up when made to appear What if we don’t want that? Causes to look like there’s a small well between each cell

Collapse Them! Will cause borders directly adjacent to each other to simply appear as a single border

Issue #2 Long Tables

Long Tables Really long tables are hard to read Solution #1 – alternate coloring of rows Solution #2 – make a row change color when user hovers over it

Solution #1 Create a class that you apply to every other row

Solution #2 Add a hover pseudo-select to rows

Cell Dimensions Controlled by Text Issue #3 Cell Dimensions Controlled by Text

Solution: Set Widths Setting width of table Units: pixels, % If use % - sizes to that percent of container (right now – that’s the whole page) Example: After Before

Setting Width of Cells %  percent of total table Example: Before After

Text too close to edge of cell Issue #4 Text too close to edge of cell

Solution: Padding Example: Before After

Text alignment in cells Issue #5 Text alignment in cells

Solution – Control with text-align Example: Before After

Etc. Can basically style using all the selectors we have seen for other elements Font properties Padding – overall and on particular sides Border – overall and on particular sides Background colors and images Etc.

Etc. Can style at multiple levels of control by using certain elements <table>  entire table overall – includes surrounding outline and overall background <tr>  an entire row <th>  heading cell <td>  data cell Can also create classes and apply selectively to certain parts

Working with More than One Table on a Page, but Styling Differently? Use ID’s

ID’s Assign the table an id <table id=“tb1”> ….other code for table When go to style parts of THAT table only, precede element with #id: #tb1 tr{ … }