1. HTML: <head> <link rel="stylesheet" type="text/css" href="example.css"> </head> <body> <p>this is a paragraph</p> </body> CSS: p{ color: red;
|
|
- Ambrose Bond
- 6 years ago
- Views:
Transcription
1 1
2 2
3 3
4 1. HTML: <head> <link rel="stylesheet" type="text/css" href="example.css"> </head> <body> <p>this is a paragraph</p> </body> CSS: p{ color: red; foto-size: 120%; 2. <head> <style> p { color: red; font-size:120%; </style> </head> <body> <p>this is a paragraph</p> </body> 3. <p style="color: red; font-size:120%; ">This is a paragraph</p> 4
5 /* This is a comment */ 5
6 1:A type selector is the name of HTML Tag. Html: <p>this is a paragraph</p> CSS: p{ color: orange; font-size: 22px; 2:Class selector is used for one or more elements. Apply the style to all the element matching the classname Html: <p class="red">this is a paragraph</p> <p class="blue">this is a paragraph</p> <h1 class="red">this is a heading</h1> <h1>this is normal heading without red color</h1> CSS: p{ font-size: 12px;.red{ color: red; 6
7 .blue{ color: blue; We can also combine type selector and class selector h1.red{ color:red; 3:ID selector is used for unique element. NOTE: Do NOT start an ID name with a number! <p class="red">this is a paragraph</p> <p class="blue">this is a paragraph</p> <p class="red" id="small">this is a paragraph</p> <p id="strong">my ID is Strong </p> <h1 id="strong">my ID is Strong also </h1> <h1 id="chapter1">h1 and chapter 1<h1> <p id="chapter1">i'm not belong to Chapter1</p> <p class="red" id="strong">this is a paragraph</p> CSS: p{ font-size: 12px;.red{ color: red;.blue{ color: blue; #strong{ font-size: 40px; h1#chapter1{ text-align:center; 6
8 You can try rearranging the lines in your CSS file to show that the order has no effect. The class selectors.carrot and.spinach have priority over the tag selector strong. The ID selector #first has priority over the class and tag selectors. 7
9 pseudo-class is a keyword added to selectors that specifies a special state of the element to be selected. For example :hover will apply a style when the user hovers over the element specified by the selector. <a href= to google</a> a:link {color: green; a:hover {color: red; <!DOCTYPE html> <html lang="en-gb"> <head> <meta charset="utf-8"> <title>picnic-under Construction</title> <link rel="stylesheet" type="text/css" href="style.css"> <meta name="description content="picnic Under Construction Page"> </head> <body> <div id="header_nav"> 8
10 <ul> <li><a href=" " title="blog">blog</a></li> <li><a href="about.html" title="about Me">About Me</a></li> </ul> </div> <div id="top_container"> <h3>introduction</h3> <p>each week Picnic whips up seasonal recipes to share with you. Get excited to craft some creative food without the hassle of meal planning or remembering what to buy at the store. We ll help you cook seasonally, eat consciously, and live well.</p> <hr> </div> <div id="box"> <h1>picnic</h1> <h2>seasonal Recipes, Enjoy every minute.</h2> <strong >Thanks for visiting!</strong> <p>we are working very hard on a new website now. While you are waiting, why not send a message for updates?</p> </div> <div id="form"> <form> <table> <tr> <td>name</td> <td><input type="text" id="name"></td> </tr> <tr> <td>gender</td> <td> <input type="radio" id="m" name="gender">male<br/> <input type="radio" id="f" name="gender">female </td> </tr> <tr> <td> </td> <td><input type=" " id=" "></td> </tr> 8
11 <tr> <td>kind of contact</td> <td> <select> <option value="update">ask for update</option> <option value="membership">membership Questions</option> <option value="other">others</option> </select> </td> </tr> <tr> <td>message</td> <td><textarea></textarea></td> </tr> </table> </div> <div id="footer"> <p>follow us on <a href=" " title="twitter"><img src=" alt="twitter" width="48" height="36"></a></p> <a href="/faq" title="questions we answer a lot of the time">frequently Asked Questions</a> <p>picnic: Owned & Copyright by <a href=" <footer> </body> </html> body{ background-color:#fff; padding:20px; font-family: helvetica, arial, sans-serif; a:hover { padding: 1px 10px 1px 10px; color: #fff; background: #555; border-radius: 3px; border: 1px outset rgba(50,50,50,.5); font-family: georgia, serif; 8
12 font-size: 14px; font-style: italic; text-decoration: none; 8
13 <div id="top_container"> <h3>introduction</h3> <right><p>each week Picnic whips up seasonal recipes to share with you. Get excited to craft some creative food without the hassle of meal planning or remembering what to buy at the store. We ll help you cook seasonally, eat consciously, and live well.</p> <right> <hr> </div> #top_container p{color:green; #top_container right{float:right; width:200px 9
14 10
15 h1,p{font-family:fantasy; 11
16 p#green{color:green; p#right{text-align: right; p#un{ text-decoration: underline; p#ind{text-indent: 2em; p#ab{ font-size: small; p#px{ font-size: 24px; p#em{ font-size: 1.2em; p#per{ font-size: 180%; p#se{ font-family: "Time New Roman", Garamond, serif; p#sa{ font-family: Helvetica, "MS Verdana", sans-serif; p#no{ font-style: normal; p#i{ font-style: italic; p#ob{ font-style: oblique; p#eight{ font-weight: 800; p#nine{ font-weight: 900; ul{ list-style-image: url(images/list.gif); <ul> <li>list item1</li> 12
17 <li>list item2</li> <li>list item3</li> </ul> a:link, a:visited{ color: #ff0000; text-decoration: underline; a:hover, a:active{ color: #0000ff; text-decoration: none; <p>jump to <a href=" <p>jump to <a href=" 12
18 To calculate the full size of an element, you must also add the padding, borders and margins. The total width of the element in the example below is 300px: width:250px; padding:10px; border:5px solid gray; margin:10px; The total width of an element should be calculated like this: Total element width = width + left padding + right padding + left border + right border + left margin + right margin The total height of an element should be calculated like this: Total element height = height + top padding + bottom padding + top border + bottom border + top margin + bottom margin 13
19 In our Picnic example: <!DOCTYPE html> <html lang="en-gb"> <head> <meta charset="utf-8"> <title>picnic-under Construction</title> <link rel="stylesheet" type="text/css" href="style.css"> <meta name="description content="picnic Under Construction Page"> </head> <body> <div id="header_nav"> <ul> <li><a href=" " title="blog">blog</a></li> <li><a href="about.html" title="about Me">About Me</a></li> </ul> </div> <div id="top_container"> <h3>introduction</h3> 14
20 <p>each week Picnic whips up seasonal recipes to share with you. Get excited to craft some creative food without the hassle of meal planning or remembering what to buy at the store. We ll help you cook seasonally, eat consciously, and live well.</p> </div> <div id="box"> <h1>picnic</h1> <h2>seasonal Recipes, Enjoy every minute.</h2> <strong >Thanks for visiting!</strong> <p>we are working very hard on a new website now. While you are waiting, why not send a message for updates?</p> </div> <div id="form"> <form> <table> <tr> <td>name</td> <td><input type="text" id="name"></td> </tr> <tr> <td>gender</td> <td> <input type="radio" id="m" name="gender">male<br/> <input type="radio" id="f" name="gender">female </td> </tr> <tr> <td> </td> <td><input type=" " id=" "></td> </tr> <tr> <td>kind of contact</td> <td> <select> <option value="update">ask for update</option> <option value="membership">membership Questions</option> <option value="other">others</option> </select> 14
21 </td> </tr> <tr> <td>message</td> <td><textarea></textarea></td> </tr> </table> </div> <div id="footer"> <p>follow us on <a href=" " title="twitter"><img src=" alt="twitter" width="48" height="36"></a></p> <a href="/faq" title="questions we answer a lot of the time">frequently Asked Questions</a> <p>picnic: Owned & Copyright by <a href=" <footer> </body> </html> IN CSS, we add: #top_container{ padding:20px; margin:10px; background-color:beige; #box { padding:20px; margin:10px; background-color:greenyellow; We can add border: border-style: solid; border-color: yellow; margin: auto; /* box is horizontally centered, 0 margin on top and bottom */ You can also try these in the empty test file: CSS: 14
22 p{ width: 300px; height: 100px; background-color: red; p#pad{ padding: 10px 20px; HTML: <p>this is a paragraph</p> <p id="pad">this is a parapraph with padding</p> Css: p{ width: 300px; height: 100px; border-style: solid; border-color: red; HTML: <p>this is a paragraph</p> p#thin{ border-width: thin; p#med{ border-width: medium; p#thick{ border-width: thick; p{ width: 300px; height: 100px; background-color: red; p#mar{ margin-top: 10px; margin-bottom: 10px; margin-left: 20px; margin-right: 20px; <p>this is a paragraph</p> <p id="mar">this is a parapraph with margin</p> 14
23 #box { padding:20px; margin:10px; /*background-color:greenyellow;*/ background-image:url( background-repeat: no-repeat; 15
24 static The default. The element's box is laid out automatically according to the normal flow. The top, right, bottom, and left properties do not apply. relative The box's position is calculated according to the normal flow. Plus, the 'top', 'right', 'bottom', and 'left' properties apply. This keyword lays out all elements as though the element were not positioned, and then adjust the element's position, without changing layout (and thus leaving a gap for the element where it would have been had it not been positioned). The effect ofposition:relative on table-*-group, tablerow, table-column, table-cell, and table-caption elements is undefined. Note:For relatively positioned elements, the top or bottom property specifies the vertical offset from the normal position and the left or right property specifies the horizontal offset. absolute The box is taken out of the normal flow. The box's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. Do not leave space for the element. Instead, position it at a specified position relative to its closest positioned ancestor or to the containing block that has its position property set to relative, absolute, or fixed. If a positioned ancestor doesn't exist, the initial container is used. Absolutely positioned boxes can have margins, they do not collapse with any 16
25 other margins. Note:For absolutely positioned elements, the top, right, bottom, and left properties specify offsets from the edge of the element's containing block (what the element is positioned relative to). The margin of the element is then positioned inside these offsets. Most of the time, absolutely positioned elements have auto values of height and width computed to fit the contents of the element. However, non-replaced absolutely positioned elements can be made to fill the available space by specifying (as other than auto) both top and bottom and leaving height unspecified (that is, auto). Likewise for left, right, and width. Except for the case just described of absolutely positioned elements filling the available space: If both top and bottom are specified (technically, not auto), top wins. If both left and right are specified, left wins when direction is ltr (English, horizontal Japanese, etc.) and right wins when direction is rtl (Persian, Arabic, Hebrew, etc.). fixed According to the 'absolute' model, the box is taken out of the normal flow but does not move when scrolled. The box's position is specified with the 'top', 'right', 'bottom', and 'left' properties. Do not leave space for the element. Instead, position it at a specified position relative to the screen's viewport and doesn't move when scrolled. When printing, position it at that fixed position on every page. Inherit Takes the same specified value as the property for the element's parent. <!DOCTYPE HTML > <html> <head> <title>html Test</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style type="text/css"> div {position: relative; border: thin solid; background-color: beige; margin-bottom: 10px; h1 {border: thin solid; background-color: greenyellow; font-size: 28px; p {border: thin solid; background-color: #CCCCCC; #tst1 {position: static; #tst2 {position: relative; top: 20px; left: 50px; #tst3 {position: absolute; top: 30px; left: 20px; #tst4 {position: fixed; top: 445px; left: 60px; </style> 16
26 </head> <body> <div> <p id="tst1">this text box position = static.</p> <h1>this text box follows the static positioned text box.</h1> </div> <div> <p id="tst2">this text box position = relative. Top = 20px and Left = 50px.</p> <h1>this text box follows the relative positioned text box.</h1> </div> <div> <p id="tst3">this text box position = absolute. Top = 30px and Left = 20px.</p> <h1>this text box follows the absolute positioned text box.</h1> </div> <div> <p id="tst4">this text box position = fixed. This box will not move when the test window is scrolled.</p> <h1>this text box follows the fixed positioned text box.</h1> </div> </body> </html> 16
27 17
28 Once boxes are generated, the CSS engine needs to position them on the layout. In order to do that, it will use one of the following algorithm: The normal flow in which it will lay each box one after the other. The floats algorithm which will extract the box from the normal flow and put it to the side of the current box, creating typographic pull quotes on the side of the containing box. The absolute positioning scheme in which a box is absolutely, though the coordinate system origin may vary on the document. The absolute positioned element can cover other elements positioned using other schemes. Normal flow In the normal flow boxes are laid out one after the other. In a block formatting context, they are laid out vertically; in an inline formatting context, they are laid out horizontally. The normal flow is triggered when the CSS position is set to the value static or relative, and if the CSS float is set to the value none. There is two sub-cases in the normal flow: static positioning and relative positioning: In static positioning, triggered by the value static of the position property, the boxes are drawn at the exact position defined by the normal flow layout. In relative positioning, triggered by the value relative of the position property, the boxes are drawn with an offset defined by the top, bottom, left and right CSS properties. 18
29 Floats In the float positioning scheme, boxes, called floating boxes or simply floats, are positioned at the beginning or end of the current line. This leads to the property that text, and more generally boxes part of the normal flow flow along the edge of these boxes, except if told differently by the clear CSS property. The float positioning scheme is selected by setting the float CSS property to a value different than none when position is set to static orrelative. If float is set to left, the float is positioned at the beginning of the line box, shrinking it; if set to right, the float is positioned at the end of the line box, shrinking it too. Absolute positioning In the absolute positioning scheme, boxes are entirely removed from the flow and don't interact with it at all. They are positioned relative to their containing block using the top, bottom, left and right CSS properties. An element is absolutely positioned if the position is set to absolute or fixed. A fixed positioned element is an absolutely positioned element that its containing block is the viewport. Such element will be fixed on the screen when scrolling as the viewport is not moving. 18
30 <!DOCTYPE HTML > <html> <head> <title>html Test</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style type="text/css"> </style> </head> <body> <img src=" alt= Picnic_Logo"> <p>seasonal Recipes, Enjoy every minute.</p> <p >We are working very hard on a new website now. While you are waiting, why not send a message for updates?</p> </body> </html> If we add these in to style between<style type="text/css"> </style> p {background-color:beige; text-align:center;width:430px; margin-left:auto; marginright:auto; 19
31 img{margin-left:auto; margin-right:auto;display:block; 3 must setting in Centering things: 1. Block level element 2. Setting the width 3. Left, right margin set to auto A block element is an element that takes up the full width available, and has a line break before and after it. Examples of block elements:<h1><p><div>, An inline element only takes up as much width as necessary, and does not force line breaks. Examples of inline elements: <span>, <a>,<image> Image element is a inline element, not a block level element, that s why we need to set it to {display:block; 19
32 20
33 A floated box is taken out of the document flow and shifted as far as possible to the left or to the right, depending on the specified floating direction. As far as possible usually means until the outer edge of the float touches the edge of the containing block (the inside of its padding, if any). Thus, for float:left the box is moved to the left until the left margin of the float touches the left edge of the parent. If there is already a box floated to the left when we float another box in the same direction, the second box will stop when it touches the first box. In other words, floats don t climb on top of one another. A very simple example: Add float:right; clear: both; to example 1 the p element style. (p {float:right; clear: both; background-color:beige; text-align:center;width:430px; margin-left:auto; margin-right:auto;) Because these part contain so much information, there is a recommend reading I would like to give it to you: 21
34 Start with html: <!DOCTYPE html > <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <titl>3 column example</title> <link rel="stylesheet" type="text/css" href="layout.css"> </head> <body> <div id="header">header</div> <div id="main">main content</div> <div id="sidebar">sidebar</div> <div id="nav">navigation</div> <div id="footer">footer</div> </body> </html> layout.css: body { background-color:white; font-size:25px; 22
35 #header { background-color: #369; color: #fff; #sidebar { background-color: #ff6; #nav { background-color: #ddd; #footer { border-top: 1px solid #369; Add wrap that wraps around the three columns. <div id="header">header</div> '''<div id="wrapper">''' <div id="main">main content</div> <div id="sidebar">sidebar</div> <div id="nav">navigation</div> '''</div>''' <div id="footer">footer</div> Then assign the widths to the navigation and the sidebar and set the width constraints and general centering body { margin: 0 auto; min-width: 40em; max-width: 56em; background-color:white; font-size:25px; #sidebar { '''width: 13em;''' '''padding: 0 0.5em;''' background-color: #ff6; #nav { 22
36 '''width: 11em;''' '''padding: 0 0.5em;''' background-color: #ddd; Now,you have your basic building blocks, but they just appear one after the other. You want three columns, so you need to start floating them. #main { '''float: left;''' #sidebar { '''float: left;''' width: 13em; padding: 0 0.5em; background-color: #ff6; #nav { '''float: left;''' width: 11em; padding: 0 0.5em; background-color: #ddd; That floats them, all right, but they re in the wrong order. Also, the main content column is too narrow. And what happened to our footer? The problem is that the three columns are floated, which takes them out of the document flow. The footer is pushed up against the header and the line box containing the text is shortened so that the word Footer appears to the right of the floats. You can remedy this by making sure the footer is cleared from all the floated columns. Add the following rule to the CSS file: #footer { '''clear: left;''' border-top: 1px solid #369; Now for the three columns. The key to this whole trick is the wrapper element. We will set a left and right margin on it that corresponds to the widths of your side columns (the navigation and the sidebar). The main content column will occupy the whole width of the wrapper, while the side columns will be shifted into the space vacated by the margins. First, set up the margins for the wrapper #wrapper { 22
37 margin: 0 14em 0 12em; padding: 0 1em; make the main content column take up the full width of its wrapper parent #main { float: left; '''width: 100%;''' '''background-color:greenyellow ;''' since the #main column is 100% wide, it pushes the sidebar down. How do you get it to go up and stay next to #main, although #main occupies the whole width? Let s do it in two small steps: first, you ll move it up; then you ll shift it out into the margin. #sidebar { float: left; width: 13em; padding: 0 0.5em; background-color: #ff6; '''margin-left: -14em;''' By setting a negative left margin equal to the width of the sidebar, we move the element back into the wrapper and it isn t pushed down. The problem is that it overlaps the content. You need to shift it out into the margin without making it drop down again, and this is where relative positioning finally comes in. It does precisely what we want: it shifts the generated box without moving the element itself. #sidebar { float: left; width: 13em; padding: 0 0.5em; background-color: #ff6; margin-left: -14em; '''position: relative;''' '''left: 15em;''' Note that you had to shift it 15em, not 14em that s because there s 1em of right padding on the wrapper that you need to get past. Now you need to do the same with the navigation this is done in a similar way, but it has a twist of its own. Moving and shifting the sidebar was easy, because the movements were essentially the same as the column s width: 14em negative margin and a 14em+1em shift to the right. But the navigation column needs to be moved all the way across the content column and then be shifted even further out into the margin. Our friend here is percentages. A percentage value on the margins of the navigation column will be relative to the width of its parent, the wrapper. You want to move the column all the way across the wrapper add the property highlighted 22
38 below to the rule for #nav: #nav { float: left; width: 11em; padding: 0 0.5em; background-color: #ddd; '''margin-left: -100%;''' shift it out into the margin #nav { float: left; width: 11em; padding: 0 0.5em; background-color: #ddd; margin-left: -100%; '''position: relative;''' '''right: 13em;''' 22
CSS. https://developer.mozilla.org/en-us/docs/web/css
CSS https://developer.mozilla.org/en-us/docs/web/css http://www.w3schools.com/css/default.asp Cascading Style Sheets Specifying visual style and layout for an HTML document HTML elements inherit CSS properties
More informationHTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.
HTML Summary Structure All of the following are containers. Structure Contains the entire web page. Contains information
More informationCSS Selectors. element selectors. .class selectors. #id selectors
CSS Selectors Patterns used to select elements to style. CSS selectors refer either to a class, an id, an HTML element, or some combination thereof, followed by a list of styling declarations. Selectors
More informationCSS. Shan-Hung Wu CS, NTHU
CSS Shan-Hung Wu CS, NTHU CSS Zen Garden 2 Outline The Basics Selectors Layout Stacking Order 3 Outline The Basics Selectors Layout Stacking Order 4 Grammar selector { property: value; 5 Example /* for
More informationIntroduction to Web Design CSS Reference
Inline Style Syntax: Introduction to Web Design CSS Reference Example: text Internal Style Sheet Syntax: selector {property: value; Example:
More informationIntroduction to Web Design CSS Reference
Inline Style Syntax: Introduction to Web Design CSS Reference Example: text Internal Style Sheet Syntax: selector {property: value; Example:
More informationCreating Layouts Using CSS. Lesson 9
Creating Layouts Using CSS Lesson 9 CSS Page Layout Advantages Greater typography control Style is separate from structure Potentially smaller documents Easier site maintenance Increased page layout control
More informationModule 2 (VII): CSS [Part 4]
INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module 2 (VII): CSS [Part 4] Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals
More informationAGENDA :: MULTIMEDIA TOOLS :: (1382) :: CLASS NOTES
CLASS :: 13 12.01 2014 AGENDA SIMPLE CSS MENU W/ HOVER EFFECTS :: The Nav Element :: Styling the Nav :: UL, LI, and Anchor Elements :: Styling the UL and LI Elements TEMPLATE CREATION :: Why Templates?
More informationWeb Authoring and Design. Benjamin Kenwright
CSS Div Layouts Web Authoring and Design Benjamin Kenwright Outline Review Why use Div Layout instead of Tables? How do we use the Div Tag? How to create layouts using the CSS Div Tag? Summary Review/Discussion
More information<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***
Chapter 7 Using Advanced Cascading Style Sheets HTML is limited in its ability to define the appearance, or style, across one or mare Web pages. We use Cascading style sheets to accomplish this. Remember
More informationBIM222 Internet Programming
BIM222 Internet Programming Week 7 Cascading Style Sheets (CSS) Adding Style to your Pages Part II March 20, 2018 Review: What is CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements
More information5 Snowdonia. 94 Web Applications with C#.ASP
94 Web Applications with C#.ASP 5 Snowdonia In this and the following three chapters we will explore the use of particular programming techniques, before combining these methods to create two substantial
More informationCSS Cascading Style Sheets
CSS Cascading Style Sheets site root index.html about.html services.html stylesheet.css images boris.jpg Types of CSS External Internal Inline External CSS An external style sheet is a text document with
More informationCascading Style Sheets Level 2
Cascading Style Sheets Level 2 Course Objectives, Session 1 Level 1 Quick Review Chapter 6 Revisit: Web Fonts Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your Site s Navigation Begin
More informationCascading Style Sheets CSCI 311
Cascading Style Sheets CSCI 311 Learning Objectives Learn how to use CSS to style the page Learn to separate style from structure Styling with CSS Structure is separated from style in HTML5 CSS (Cascading
More informationCOSC 2206 Internet Tools. CSS Cascading Style Sheets
COSC 2206 Internet Tools CSS Cascading Style Sheets 1 W3C CSS Reference The official reference is here www.w3.org/style/css/ 2 W3C CSS Validator You can upload a CSS file and the validator will check it
More informationCascading Style Sheets (CSS)
Cascading Style Sheets (CSS) Mendel Rosenblum 1 Driving problem behind CSS What font type and size does introduction generate? Answer: Some default from the browser (HTML tells what browser how)
More informationMultimedia Systems and Technologies Lab class 6 HTML 5 + CSS 3
Multimedia Systems and Technologies Lab class 6 HTML 5 + CSS 3 Instructions to use the laboratory computers (room B2): 1. If the computer is off, start it with Windows (all computers have a Linux-Windows
More informationCascading Style Sheets
4 TVEZEWXYHMNR LSTVSKVEQY-RJSVQEXMOENITSHTSVSZ RETVSNIOXIQ RERGSZER Q^)ZVSTWO LSWSGM PR LSJSRHYEVS^TS XYLPEZR LSQ WXE4VEL] 4VELE)9-RZIWXYNIQIHSZE% FYHSYGRSWXM CSS Cascading Style Sheets Lukáš Bařinka barinkl@fel.cvut.cz
More informationCSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017
CSCB20 Week 7 Introduction to Database and Web Application Programming Anna Bretscher Winter 2017 Cascading Style Sheets (CSS) Examples of CSS CSS provides a powerful and stillevolving toolkit of style
More informationCSS: Layout Part 2. clear. CSS for layout and formatting: clear
CSS: Layout Part 2 Robert A. Fulkerson College of Information Science and Technology http://www.ist.unomaha.edu/ University of Nebraska at Omaha http://www.unomaha.edu/ CSS for layout and formatting: clear
More informationUnit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model
Unit 20 - Client Side Customisation of Web Pages Week 2 Lesson 4 The Box Model Last Time Looked at what CSS is Looked at why we will use it Used CSS In-line Embedded (internal style-sheet) External
More informationPage Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning
Page Layout contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning 2 1 4.1
More informationCSS مفاهیم ساختار و اصول استفاده و به کارگیری
CSS مفاهیم ساختار و اصول استفاده و به کارگیری Cascading Style Sheets A Cascading Style Sheet (CSS) describes the appearance of an HTML page in a separate document : مسایای استفاده از CSS It lets you separate
More informationCSS: The Basics CISC 282 September 20, 2014
CSS: The Basics CISC 282 September 20, 2014 Style Sheets System for defining a document's style Used in many contexts Desktop publishing Markup languages Cascading Style Sheets (CSS) Style sheets for HTML
More informationChapter 4 CSS basics
Sungkyunkwan University Chapter 4 CSS basics Prepared by J. Lee and H. Choo Web Programming Copyright 2000-2018 Networking Laboratory 1/48 Copyright 2000-2012 Networking Laboratory Chapter 4 Outline 4.1
More informationGIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar
GIMP WEB 2.0 MENUS Web 2.0 Menus: Horizontal Navigation Bar WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR Hover effect: You may create your button in GIMP. Mine is 122 pixels by 48 pixels. You can use whatever
More informationHTML & CSS Cheat Sheet
1 HTML & CSS Cheat Sheet Fall 2017 HTML & CSS Cheat Sheet from Typographic Web Design 3 by Laura Franz Web safe fonts vs web fonts You can expect these web safe fonts to work across most platforms and
More informationHTML HTML5. DOM(Document Object Model) CSS CSS
HTML HTML5 DOM(Document Object Model) CSS CSS HTML html img jpg png gif jpg png gif
More informationStudy Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo
Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo Note: We skipped Study Guide 1. If you d like to review it, I place a copy here: https:// people.rit.edu/~nbbigm/studyguides/sg-1.docx
More informationDAY 4. Coding External Style Sheets
DAY 4 Coding External Style Sheets LESSON LEARNING TARGETS I can code and apply an embedded style sheet to a Web page. I can code and apply an external style sheet to multiple Web pages. I can code and
More informationWireframe :: tistory wireframe tistory.
Page 1 of 45 Wireframe :: tistory wireframe tistory Daum Tistory GO Home Location Tags Media Guestbook Admin 'XHTML+CSS' 7 1 2009/09/20 [ ] XHTML CSS - 6 (2) 2 2009/07/23 [ ] XHTML CSS - 5 (6) 3 2009/07/17
More informationIntroduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100
Introduction to Multimedia MMP100 Spring 2016 profehagan@gmail.com thiserichagan.com/mmp100 Troubleshooting Check your tags! Do you have a start AND end tags? Does everything match? Check your syntax!
More informationAdding CSS to your HTML
Adding CSS to your HTML Lecture 3 CGS 3066 Fall 2016 September 27, 2016 Making your document pretty CSS is used to add presentation to the HTML document. We have seen 3 ways of adding CSS. In this lecture,
More informationNAVIGATION INSTRUCTIONS
CLASS :: 13 12.01 2014 NAVIGATION INSTRUCTIONS SIMPLE CSS MENU W/ HOVER EFFECTS :: The Nav Element :: Styling the Nav :: UL, LI, and Anchor Elements :: Styling the UL and LI Elements CSS DROP-DOWN MENU
More informationCreating a Job Aid using HTML and CSS
Creating a Job Aid using HTML and CSS In this tutorial we will apply what we have learned about HTML and CSS. We will create a web page containing a job aid about how to buy from a vending machine. Optionally,
More informationCSS stands for Cascading Style Sheets Styles define how to display HTML elements
CSS stands for Cascading Style Sheets Styles define how to display HTML elements CSS has various levels and profiles. Each level of CSS builds upon the last, typically adding new features and typically
More informationParashar Technologies HTML Lecture Notes-4
CSS Links Links can be styled in different ways. HTML Lecture Notes-4 Styling Links Links can be styled with any CSS property (e.g. color, font-family, background, etc.). a { color: #FF0000; In addition,
More informationCSS means Cascading Style Sheets. It is used to style HTML documents.
CSS CSS means Cascading Style Sheets. It is used to style HTML documents. Like we mentioned in the HTML tutorial, CSS can be embedded in the HTML document but it's better, easier and neater if you style
More informationDownloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -
Week One Tools The Basics: Windows - Notepad Mac - Text Edit Downloads: Google Chrome Browser (Free) - www.google.com/chrome/ Adobe Brackets (Free) - www.brackets.io Our work over the next 6 weeks will
More informationWeb Publishing Intermediate 2
Web Publishing Intermediate 2 Building a Three Column Site with divs and float Jeff Pankin Information Services and Technology Table of Contents Course Objectives... 2 The CIG Web Site... 3 Using the Div
More informationReview Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>
Introduction to CSS Review Question 1 Which tag is used to create a link to another page? 1. 2. 3. 4. Review Question 1 Which tag is used to create a link to another page? 1. 2.
More informationZen Garden. CSS Zen Garden
CSS Patrick Behr CSS HTML = content CSS = display It s important to keep them separated Less code in your HTML Easy maintenance Allows for different mediums Desktop Mobile Print Braille Zen Garden CSS
More informationLab 4 CSS CISC1600, Spring 2012
Lab 4 CSS CISC1600, Spring 2012 Part 1 Introduction 1.1 Cascading Style Sheets or CSS files provide a way to control the look and feel of your web page that is more convenient, more flexible and more comprehensive
More informationCMPT 165 Advanced XHTML & CSS Part 3
CMPT 165 Advanced XHTML & CSS Part 3 Oct 15 th, 2015 Today s Agenda Quick Recap of last week: Tree diagram Contextual selectors CSS: Inheritance & Specificity Review 1 exam question Q/A for Assignment
More informationID1354 Internet Applications
ID1354 Internet Applications CSS Leif Lindbäck, Nima Dokoohaki leifl@kth.se, nimad@kth.se SCS/ICT/KTH What is CSS? - Cascading Style Sheets, CSS provide the means to control and change presentation of
More informationChapter 6: CSS Layouts
Chapter 6: CSS Layouts Learning Outcomes: Identify the four types of CSS positioning: static, relative, fixed and absolute Identify the use of CSS floats Be able to implement HTML and CSS to construct
More informationCSS: Cascading Style Sheets
CSS: Cascading Style Sheets Computer Science and Engineering College of Engineering The Ohio State University Lecture 13 Evolution of CSS MIME type: text/css CSS 1 ('96): early recognition of value CSS
More informationAssignments (4) Assessment as per Schedule (2)
Specification (6) Readability (4) Assignments (4) Assessment as per Schedule (2) Oral (4) Total (20) Sign of Faculty Assignment No. 02 Date of Performance:. Title: To apply various CSS properties like
More informationLab Introduction to Cascading Style Sheets
Lab Introduction to Cascading Style Sheets For this laboratory you will need a basic text editor and a browser. In the labs, winedt or Notepad++ is recommended along with Firefox/Chrome For this activity,
More informationCASCADING STYLESHEETS
CASCADING STYLESHEETS Cascading StyleSheets (CSS) has been mainly created because HTML is just not the right tool for precision and flexibility. HTML is not a very effective for designing web pages. Most
More informationCSS: Formatting Text. CSS for text processing: font-family. Robert A. Fulkerson
CSS: Formatting Text Robert A. Fulkerson College of Information Science and Technology http://www.ist.unomaha.edu/ University of Nebraska at Omaha http://www.unomaha.edu/ CSS for text processing: font-family
More informationWhen you complete this chapter, you will be able to:
Page Layouts CHAPTER 7 When you complete this chapter, you will be able to: Understand the normal fl ow of elements Use the division element to create content containers Create fl oating layouts Build
More informationCreating and Building Websites
Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 6 Slide 1 of 28 Week 6 Agenda
More informationWelcome Please sit on alternating rows. powered by lucid & no.dots.nl/student
Welcome Please sit on alternating rows powered by lucid & no.dots.nl/student HTML && CSS Workshop Day Day two, November January 276 powered by lucid & no.dots.nl/student About the Workshop Day two: CSS
More informationCSS3 Basics. From & CSS Visual Dictionary Learning Curve Books, LLC
CSS3 Basics From www.w3schools.com & CSS Visual Dictionary Learning Curve Books, LLC CSS Box Model Margin (top, right, bottom, left) Shorthand property, equivalent to Border-width border-style border-color
More informationGIMP WEB 2.0 MENUS WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR CREATING AN HTML LIST
GIMP WEB 2.0 MENUS Web 2.0 Menus: Horizontal Navigation Bar WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR Hover effect: CREATING AN HTML LIST Most horizontal or vertical navigation bars begin with a simple
More informationFLOATING AND POSITIONING
15 FLOATING AND POSITIONING OVERVIEW Understanding normal flow Floating elements to the left and right Clearing and containing floated elements Text wrap shapes Positioning: Absolute, relative, fixed Normal
More informationCSS: formatting webpages
CSS: formatting webpages Why CSS? separate content from formatting (style) style can be changed easily without rewriting webpages keep formatting consistent across website allows more advanced formatting
More information3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets
3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers
More information- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations
3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers
More informationUsing CSS for page layout
Using CSS for page layout Advantages: Greater typographic control Style is separate from structure Potentially smaller documents Easier site maintenance Increased page layout control Increased accessibility
More informationAppendix D CSS Properties and Values
HTML Appendix D CSS Properties and Values This appendix provides a brief review of Cascading Style Sheets (CSS) concepts and terminology, and lists CSS level 1 and 2 properties and values supported by
More informationWeb Information System Design No.4 Put Style to Web Documents. Tatsuya Hagino
Web Information System Design No.4 Put Style to Web Documents Tatsuya Hagino (hagino@sfc.keio.ac.jp) 1 Web Page Components Combine orthogonal technologies content style programming style JavaScript Programming
More informationAPPLIED COMPUTING 1P01 Fluency with Technology
APPLIED COMPUTING 1P01 Fluency with Technology Cascading Style Sheets (CSS) APCO/IASC 1P01 Brock University Brock University (APCO/IASC 1P01) Cascading Style Sheets (CSS) 1 / 39 HTML Remember web pages?
More informationEECS1012. Net-centric Introduction to Computing. Lecture 3: CSS for Styling
EECS1012 Net-centric Introduction to Computing Lecture 3: CSS for Styling Acknowledgements Contents are adapted from web lectures for Web Programming Step by Step, by M. Stepp, J. Miller, and V. Kirst.
More information12/9/2012. CSS Layout
Dynamic HTML CSS Layout CSS Layout This lecture aims to teach you the following subjects: CSS Grouping and nesting Selectors. CSS Dimension. CSS Display.. CSS Floating. CSS Align. 1 CSS Grouping and nesting
More informationClient-Side Web Technologies. CSS Part II
Client-Side Web Technologies CSS Part II Topics Box model and related properties Visual formatting model and related properties The CSS Box Model Describes the rectangular boxes generated for elements
More informationUnit 10 - Client Side Customisation of Web Pages. Week 5 Lesson 1 CSS - Selectors
Unit 10 - Client Side Customisation of Web Pages Week 5 Lesson 1 CSS - Selectors Last Time CSS box model Concept of identity - id Objectives Selectors the short story (or maybe not) Web page make-over!
More informationHTML/XML. HTML Continued Introduction to CSS
HTML/XML HTML Continued Introduction to CSS Entities Special Characters Symbols such as +, -, %, and & are used frequently. Not all Web browsers display these symbols correctly. HTML uses a little computer
More informationSession 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties
Session 4 Style Sheets (CSS) 1 Reading Reading & References en.wikipedia.org/wiki/css Style Sheet Tutorials www.htmldog.com/guides/cssbeginner/ A reference containing tables of CSS properties web.simmons.edu/~grabiner/comm244/weekthree/css-basic-properties.html
More informationINTERNATIONAL UNIVERSITY OF JAPAN Public Management and Policy Analysis Program Graduate School of International Relations
Hun Myoung Park (1/26/2019) Cascading Style Sheets: 1 INTERNATIONAL UNIVERSITY OF JAPAN Public Management and Policy Analysis Program Graduate School of International Relations ADC5030401 (2 Credits) Introduction
More information<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.
CSS Formatting Background When HTML became popular among users who were not scientists, the limited formatting offered by the built-in tags was not enough for users who wanted a more artistic layout. Netscape,
More informationCSS. Lecture 16 COMPSCI 111/111G SS 2018
CSS Lecture 16 COMPSCI 111/111G SS 2018 No CSS Styles A style changes the way the HTML code is displayed Same page displayed using different styles http://csszengarden.com Same page with a style sheet
More informationWeb Design and Development Tutorial 03
Table of Contents Web Design & Development - Tutorial 03... 2 Using and Applying CSS to XHTML... 2 Conventions... 2 What you need for this tutorial... 2 Common Terminology... 3 Parent / Child Elements...
More informationINFS 2150 Introduction to Web Development
Objectives INFS 2150 Introduction to Web Development 3. Page Layout Design Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout
More informationINFS 2150 Introduction to Web Development
INFS 2150 Introduction to Web Development 3. Page Layout Design Objectives Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout
More informationIntermediate Web Publishing: Working with Styles
Intermediate Web Publishing: Working with Styles Jeff Pankin Information Services & Technology Contents Introduction... 2 In this class you will:... 2 Set the Preferences... 2 General... 2 Invisible Elements...
More informationCE419 Web Programming. Session 3: HTML (contd.), CSS
CE419 Web Programming Session 3: HTML (contd.), CSS 1 Forms 2 Forms Provides a way to interact with users. Not useful without a server-side counterpart. 3 From Elements
More informationUnit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model
Unit 20 - Client Side Customisation of Web Pages Week 2 Lesson 4 The Box Model So far Looked at what CSS is Looked at why we will use it Used CSS In-line Embedded (internal style-sheet) External
More informationCSS worksheet. JMC 105 Drake University
CSS worksheet JMC 105 Drake University 1. Download the css-site.zip file from the class blog and expand the files. You ll notice that you have an images folder with three images inside and an index.html
More informationWEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5
WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 LEARNING OUTCOMES In this chapter, you will learn how to... Describe the evolution of style sheets from print media to the Web List
More informationCSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax
CSS CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style Sheets can save a lot of work External Style Sheets
More informationCSc 337 LECTURE 3: CSS
CSc 337 LECTURE 3: CSS The bad way to produce styles welcome to Greasy Joe's. You will never, ever, ever beat our
More informationCSS. Text & Font Properties. Copyright DevelopIntelligence LLC
CSS Text & Font Properties 1 text-indent - sets amount of indentation for first line of text value: length measurement inherit default: 0 applies to: block-level elements and table cells inherits: yes
More informationMake a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1
Make a Website A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Overview Course outcome: You'll build four simple websites using web
More informationIntroduction to HTML & CSS. Instructor: Beck Johnson Week 2
Introduction to HTML & CSS Instructor: Beck Johnson Week 2 today Week One review and questions File organization CSS Box Model: margin and padding Background images and gradients with CSS Make a hero banner!
More informationHIERARCHICAL ORGANIZATION
A clearly defined home page Navigation links to major site sections HIERARCHICAL ORGANIZATION Often used for commercial and corporate websites 1 Repetition DESIGN PRINCIPLES Repeat visual elements throughout
More informationBy Ryan Stevenson. Guidebook #3 CSS
By Ryan Stevenson Guidebook #3 CSS Table of Contents 1. How to Use CSS 2. CSS Basics 3. Text Sizes Colors & Other Styling 4. Element Layout Positioning & Sizing 5. Backgrounds & Borders How to Use CSS
More informationLab 1: Introducing HTML5 and CSS3
CS220 Human- Computer Interaction Spring 2015 Lab 1: Introducing HTML5 and CSS3 In this lab we will cover some basic HTML5 and CSS, as well as ways to make your web app look and feel like a native app.
More informationCSS Lecture 16 COMPSCI 111/111G SS 2018
No CSS CSS Lecture 16 COMPSCI 111/111G SS 2018 Styles Astyle changes the way the HTML code is displayed Same page displayed using different styles Same page with a style sheet body font-family: sans-serif;
More informationReading 2.2 Cascading Style Sheets
Reading 2.2 Cascading Style Sheets By Multiple authors, see citation after each section What is Cascading Style Sheets (CSS)? Cascading Style Sheets (CSS) is a style sheet language used for describing
More informationCascading Style Sheet Quick Reference
Computer Technology 8/9 Cascading Style Sheet Quick Reference Properties Properties are listed in alphabetical order. Each property has examples of possible values. Properties are not listed if they are
More informationCSS. M hiwa ahamad aziz Raparin univercity. 1 Web Design: Lecturer ( m hiwa ahmad aziz)
CSS M hiwa ahamad aziz www.raparinweb.fulba.com Raparin univercity 1 What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve
More informationClass 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee
Class 3 Page 1 Using DW tools to learn CSS Dreaweaver provides a way for beginners to learn CSS. Here s how: After a page is set up, you might want to style the . Like setting up font-family, or
More information8a. Cascading Style Sheet
INFS 2150 Introduction to Web Development 8a. Cascading Style Sheet 1 Objectives Concepts of cascading style sheets (CSS). 3 ways of using CSS: inline styles, embedded styles, and external style sheet.
More informationTo link to an external stylesheet, the link element is placed within the head of the html page:
CSS Basics An external style sheet is simply a text file (use BBEdit or Textwrangler) containing style rules, saved with the.css extension. It s best practice to keep style sheets for a site grouped within
More informationHTML Organizing Page Content
HTML Organizing Page Content CSS for layout Examples http://www.shinybytes.com/newcss.html Generic Elements Used to create a logical grouping of content or elements on the page Can be customized to describe
More informationThe default style for an unordered (bulleted) list is the bullet, or dot. You can change the style to either a square or a circle as follows:
CSS Tutorial Part 2: Lists: The default style for an unordered (bulleted) list is the bullet, or dot. You can change the style to either a square or a circle as follows: ul { list-style-type: circle; or
More information