web construction/css/spry

12
Web Construction, CSS & Spry Navigation Some of the best practices but NOT the final answer.

Upload: darren-jackson

Post on 26-Jun-2015

215 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Web Construction/CSS/Spry

Web Construction, CSS &Spry Navigation

Some of the best practices but NOT the final answer.

Page 2: Web Construction/CSS/Spry

Web ConstructionHow we want to start developing our sites.

Page 3: Web Construction/CSS/Spry

Tables and Divs Minimal tables

• Use as little tables as possible. To obtain a standard four-block layout…

Page 4: Web Construction/CSS/Spry

Tables and Divs …the following code is all you need:

<table><tr>

<td colspan="2"><div

class="header">Header</div>

</td></tr><tr>

<td><div

class="navigation">Navigation</div>

</td><td>

<div class="content">

Content</div>

</td></tr><tr>

<td colspan="2" style="vertical-align: bottom">

<div class="footer">

Footer</div>

</td></tr>

</table>

Page 5: Web Construction/CSS/Spry

Content VS Presentation CONTENT

• It’s important to put all content (text, images ect) in your html doc.

• As well as scripts, tables and divs.

PRESENTATION• CSS can cover the rest…

Page 6: Web Construction/CSS/Spry

Cascading Style SheetsA language used to describe the design of an HTML doc

Page 7: Web Construction/CSS/Spry

How To Write It

Page 8: Web Construction/CSS/Spry

Common Issues Classitis and Divitis

• An error of beginning CSS coders is to use far too many <div> tags and class attributes, like:

<div class="header"><div class="headerText"><p class="headerP">This site uses CSS!</p></div></div>

Page 9: Web Construction/CSS/Spry

Common Issues Start with simple XHTML:

Then use these two CSS selectors:

<div class="header"><p>This site uses CSS!</p></div>

div.header {/* styles */}

div.header p {/* styles */}

Page 10: Web Construction/CSS/Spry

Common Issues Try extending the selector or

specifying certain tags.body, td, li, p {font: 0.8em verdana,sans-serif;}

#mydiv p {font-size: 34px;}

Page 12: Web Construction/CSS/Spry

Spry Navigation MenusA simple way to add interactivity to your site