CIT 256 CSS Divs & Buttons Dr. Beryl Hoffman. CSS for Layout We now can make our own divs to divide up a web page : Header Header Navigation Navigation.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

J ENWARE Chapters 14 & 15 Learning Web Design, Fourth Edition by Jennifer Niederst Robbins Copyright © 2012.
CSS Styling CSS Box Model & CS110: Computer Science and the Internet.
INSTRUCTIONAL SUPPORT SERVICES (ISS) SHORT COURSE, FALL 2013 UMSL Introduction to Web Page Design.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Layout using CSS. Using multiple classes In the head:.important{font-style:italic;}.title{color:red;} In the body: Here's a type of paragraph that is.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Slide 1 CMPS 211 Internet Programming Spring 2008 Dynamic Effects with Styles Chapter 12 2/6/08.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Very quick intro HTML and CSS. Sample html A Web Title.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Principles of Web Design 5 th Edition Chapter Nine Site Navigation.
SM5312 week 11: CSS Menus & Navigation Bars1 An Introduction to Cascading Style Sheets CSS Menus and Navigation Bars Nick Foxall.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Navigation Bars Level 2 Extended Certificate Unit B12 Doing Business Online.
1 Dreamweaver CS5 intermediate class by Cookie Setton Build a CSS website WITHOUT TABLES Just when you thought you were starting to understand HTML coding,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Diliev.com & pLOVEdiv.com  DIliev.com.
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
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Murach’s ASP.NET 3.5/C#, C5© 2008, Mike Murach & Associates, Inc.Slide 1.
INSTRUCTIONAL SUPPORT SERVICES (ISS) SHORT COURSE, FALL 2012 UMSL Introduction to Web Page Design.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
CIT 256 Mobile Web Development Dr. Beryl Hoffman.
CIT 256 Organizing Large Websites: Divs, DW Templates Dr. Beryl Hoffman.
Creating A Simple Web Page. Step 1- Open Dreamweaver & Create A New Page (File New) and blank.
Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
ITP 104.  While you can do things like this:  Better to use styles instead:
CSS Sprites. What are sprites? In the early days of video games, memory for graphics was very low. So to make things load quickly and make graphics look.
Web Development & Design Foundations with XHTML
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Website Development with Dreamweaver
CIT 256 Dreamweaver Sites and Image Maps Dr. Beryl Hoffman.
 Word doc for you to download › Link at the beginning of class › 10 Questions › Answers to be added inline  Post to Sakai when completed › No resubmits.
Tutorial #6 – Creating Fixed Width Layouts. Tutorial #5 Review – Box Model Every html element is surround by a box Content, Padding, Border, Margin Can.
Today’s Agenda Advanced CSS Techniques Floating Z-index Centering Sliding Doors Fluid Layouts CSS3 Advanced CSS Lab Mini Project #2.
Interface Programming 1 Week 3. Interface Programming 1 CALENDAR.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
Web Design Part I. Click Menu Site to create a new site root.
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
Updated on: September 4, 2010 CIS67 Foundations for Creating Web Pages Professor Al Fichera.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
11/12/2015 Box Model Reed Crouch. 11/12/2015  HTML elements can be considered as boxes. In CSS, the term "box model" is used when referring to layout.
CIT 256 CSS Intro & Dreamweaver Built-in Layouts Dr. Beryl Hoffman.
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
 Add one element at a time  If it doesn’t do what you want, › Delete it › DON’T just keep piling on more items.
Web Design (17) CSS Box Element (2). ‘Box’ Web Site (1) Insert a navigation bar into the index.html file and create links to ‘index.html’, ‘pageone.html’
WebD Introduction to CSS By Manik Rastogi.
CSS.
CSS Layouts: Positioning and Navbars
Google fonts CSS box model
Advanced CSS BIS1523 – Lecture 20.
Cascading Style Sheets (Layout)
>> CSS Layouts.
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5
Chapter 6 More CSS Basics Key Concepts
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Fixed Positioning.
Web Development & Design Foundations with HTML5
Web Development & Design Foundations with HTML5
Presentation transcript:

CIT 256 CSS Divs & Buttons Dr. Beryl Hoffman

CSS for Layout We now can make our own divs to divide up a web page : Header Header Navigation Navigation Content here Content here Footer Footer </div> And we can add new CSS rules for each and for the body tag.

Review: New CSS Rule in Dreamweaver Hit the + button at the bottom of the CSS panel on the top right. –ID: used once, use for divs –Class: can be used many times. –Tag: for html tags like –Tag: for html tags like –Compound: like –Compound: like Choose New Style sheet first time, add to style sheet after that.

Review: Edit CSS Div Rules Type: for font, text color Background: background color or image Box: for width/height, margins, padding! To re-edit, double click on a rule like header in the CSS panel on the top right or hit the pencil icon at the bottom of the panel.

Review: Insert CSS Divs in Dreamweaver Insert/Layout Object/Div Tag (or just type them in ) Click on the New CSS Rule button at the bottom or type in an id like header and design the style later in the CSS panel.

CSS for 2 Column Layout The nav div can be styled to be at the top or the side using CSS Header Header Navigation Navigation Content here Content here Footer Footer </div> Float navbar to the left and set its width to 20% (in Box). Nav Content

CSS Float property Makes a div element float to the left or right of its container. The floated element always needs a width! See and sp (and first Try It Yourself) sphttp://imagecss.com/ sp

2 Col CSS Layout in Dreamweaver Insert/Layout Object/Div for the container, header, sideNav, content, footer, etc. Set the container to 80-90% width and left/right margin auto, margin-top:0 Set #navbar { float: left; width: 20%; }  Box Set #content { margin-left: 20%; } Set #footer { clear: both; // to clear float width: 100%; } width: 100%; } Make sure there is no tag starting in the content div!

Side Nav Links Type in Text, make them into links. Many web designers put the links into an unordered list (we won’t). <ul> Home Home Page1 Page1 </ul> We will add a style to the links to make them into buttons.

CSS3 Text made into buttons Buttons and nav bars without images can be created using CSS including rounded corners (border radius), shadows, gradients, etc. Advantages: Easy to change text. No extra images. No Photoshop necessary. Drawback: different browsers do the CSS differently so lots of CSS code variants.

CSS Button Generators CSS3 Button Generators (don’t use IE): – – – – – – Copy the generated CSS into your CSS file. You may have to add width: 20% or 200px. Type in text, make it into a link and then choose your button class name from the Class: menu at bottom.

Advanced CSS: Make your own Simple CSS Button Create a new CSS rule (+) for your button. Type: set font, text color, text decoration: none Background: set background color Block: display:block Box: see next slide

CSS Box Model From See also del.asp del.asphttp://imagecss.com/ del.asp

CSS Buttons Cont. Box tab: –Width: 100px or 15%-20%, 15%-20%, – Float: Left, –Uncheck Padding and Margin same for all –Set left/right padding to 10-20px (this is the button’s width around the text) –Set left/right margin to 5-10px (this is the space between this button and other buttons). Border: solid, color

Rounded Corners border: 2px solid; or background color and border-radius: 10px; // most current browsers -moz-border-radius: 10px; // for old firefox -webkit-border-radius: 10px; // for old safari See tricks.com/almanac/properties/b/border- radius/ tricks.com/almanac/properties/b/border- radius/ tricks.com/almanac/properties/b/border- radius/

Box-Shadows Use Creates a drop box look around the button. box-shadow:inset 0px 1px 0px 0px #ffffff; -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; shadow.asp shadow.asp

Gradients Use or background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color- stop(1, #dfdfdf) ); background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% ); filter:progid:DXImageTransform.Microsoft.gradi ent(startColorstr='#ededed', endColorstr='#dfdfdf');

Make your own Text Logo with CSS Text Shadows Text-shadows work in all browsers except IE. Add the property at the bottom of the CSS panel properties. Choose 2px for x & y offsets and blur and choose a different color. _text-shadow.asp _text-shadow.asp 06/29/full-css3-text-shadows-even-in-ie/ 06/29/full-css3-text-shadows-even-in-ie/

CSS3 Fonts CSS3 allows you to download or link to any font to use it! rule: rule: _fonts.asphttp:// _fonts.asp is the best way! Just link to their fonts. Choose a font and click on Use button to generate the code to add to your page to use that font.

Summary Use CSS and divs for layout using Box properties and floating. CSS3 has the power to do a lot of things that used to be done in Photoshop graphic images: text shadows, box shadows, fonts, gradient colors, rounded corners, etc. But browser-dependent code is a pain! So, use online generators like