LIS650 lecture 4 Thomas Krichel 2004-02-27. today Advice CSS Properties –Box properties-- List properties –Table properties-- Classification properties.

Slides:



Advertisements
Similar presentations
LIS650 lecture 4 Thomas Krichel today CSS Properties –Box properties-- List properties –Table properties-- Classification properties –(Audio.
Advertisements

LIS650 lecture 2 Major CSS Thomas Krichel
LIS650 lecture 2 Major CSS Thomas Krichel
LIS901N: Style sheet Thomas Krichel Style sheets Style sheets are the officially sanctioned way to add style to your document We will cover.
LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties –List properties –Classification properties Fun with selectors.
Copenhagen, 6 December 2004 Modern CSS Principles Miruna Bădescu Finsiel Romania.
Slice and Dice: From PSD Image to XHTML+CSS Svetlin Nakov Telerik Corporation
© 2010 Delmar, Cengage Learning Chapter 9 Positioning Objects with AP Div Tags.
Working with Web Tables
DREAMWEAVER ‘ANATOMY’ EXPLAINED.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
CSS Layout Crash Course An Advance CSS Tutorial. Inline vs. Block Many HTML elements have a default display setting of Block. Block elements take up the.
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.
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.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Today’s objectives Site performance Padding, Margins, Borders
CSS, cont. October 12, Unit 4. Creating a Sidebar We know how to create a sidebar –Use the float property div#sidebar{ float: left; } Item1 Item2 Item3.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
MORE Cascading Style Sheets (The Positioning Model)
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
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.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Page Layout & Mobile Web Using columns, grid systems, etc… to layout sites for desktops and mobile.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
 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.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Doncho Minkov Telerik Web Design Course html5course.telerik.com Technical Trainer
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
CSS Class 2 -Add margins to elements on a page. -Set width and height of elements. - CSS shorthand properties for box model. -Style links. -Style tables.
THE BOX MODEL Putting layouts together with CSS. The Box Model  How would you describe a box?  Container?  Tags or elements are “containers”  puts.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
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.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
CONTROLLING Page layout
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 8.
Mimi Opkins.  One of the major benefits of using CSS is that you’re not forced to lay your sites out in tables.  The layout possibilities of CSS give.
Laying out Elements with CSS
Working with Cascading Style Sheets
Cascading Style Sheets Boxes
CSS Layouts CH 13.
Organizing Content with Lists and Tables
CSS Layouts: Grouping Elements
LIS650 lecture 4 Thomas Krichel
Putting Things Where We Want Them
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
The Internet 10/25/11 XHTML Tables
Objectives Create a reset style sheet Explore page layout designs
Controlling Layout with Style Sheets
Second CSS Lecture Applications to XML
MORE Cascading Style Sheets (The Positioning Model)
Web Development & Design Foundations with H T M L 5
SEEM4570 Tutorial 3: CSS + CSS3.0
Floating and Positioning
The Internet 10/27/11 XHTML Forms
Laying out Elements with CSS
Presentation transcript:

LIS650 lecture 4 Thomas Krichel

today Advice CSS Properties –Box properties-- List properties –Table properties-- Classification properties –(Audio properties)-- Generated content properties –Paged properties Nielsen on site design http Information architecture Semantic web

advice for cheaters Within a style sheet, for example the contents of a tag, you can import another file using url( " these two ways appear to be equivalent

media dependent styles Remember the media CSS knows about ? you can import different types for different "URI" medialist where medialist is a list of one or more media, separated by comma challenged.css" braille, handheld

advice about spacing Traditionally only use horizontally, the em nowadays is the height of the font, and should be used vertically as well, as in DIV.menu { padding: 1.5em; margin: 1.5em} For body, use %ages, as in BODY {margin-left: 15%; margin-right:0%} To create a menu, do something like DIV.menu {float: left; width=15em}

the 'inherit' value Each property can have the 'inherit' value. In this case, the value of the property for the tag is determined by the containing tag. Sometimes, 'inherit' is the default value.

validating CSS It is at check your style sheet there when you wonder why the damn thing does not work. Note that checking the style sheet will not be part of the assessment of the web site.

box properties V {z-index: } let you set an integer value for a layer on the canvas where the tag will appear. A negative value means that the tag contents is behind its containing block. Thus if tag 1 has z-index value 1 and tag 2 has z-index value number 2, they are laying on top of each other. the initial value is auto browser support for this property is limited.

box properties VI The {visibility: } property sets the visibility of a tag. It takes values –'visible' The generated box is visible. –'hidden' The generated box is invisible (fully transparent), but still affects layout. –'collapse' The tag collapses in the table. Only useful if applied to table tags. used on elements; otherwise 'collapse' has the same meaning as 'hidden'. With this you can do sophisticated alignments

box properties VII The {clip:} properties sets which area of a box is visible. When the {overflow: } property is not set to 'hidden' it will take no effect. It only applies to absolutely positioned tags. p {overflow: hidden; clip: rect(15px, -10px, 5px, 10px)} IE v6 does not support it. Example at clip_test.html

box properties VIII We now look at overflow and clipping. When a box contents is larger than the containing box, it overflows. {overflow:} can take the values –visible contents is allowed to overflow –hidden contents is hidden –scroll UA displays a scroll device at the edge of the box –auto leave to the user agent to decide what to do

list properties {list-style-position: } can take the value inside or outside. The latter is the default, the property refers to the position of the list item start marker {list-style-image: } define the bullet point of a list as a graphic, use url(URL) to give the location of the graphic. {list-style-property: } –takes the values disc, circle, square, none with an unordered list –takes the value decimal, lower-roman, upper- roman, lower-alpha, upper-alpha with ordered list.

table properties I {border-collapse: } allows to choose the fundamental table model. It can take two values –'separate' implies that each cell has its own box. –'collapse' implies that adjacent cells share the same border

table properties II The properties on this slide are only useful if you choose the separated border model. You can set the distance between adjacent cells using the border-spacing: property. Set it to two distances to specify different horizontal and vertical values empty-cells: can be set to –'show' shows empty cells with their border –'hide' does not show the border around an empty cell there are some other table properties

classification properties I {display: } sets the display type of an tag, it take the following values –'block' displays the tag contents as a block –'inline' displays it as inline contents –'list-item' makes it an item of a list, you can then attach list properties to it –'none' does not display it –'run-in' (see later) –'compact'(see later)

classification properties II {display: } also takes the following values –table-- table-footer-group –table-row -- table-row-group –table-cell-- table-column –table-caption -- table-column-group –inline-table-- table-header-group these means that they behave like the table elements that we already discussed

run-in box If a block box (that does not float and is not absolutely positioned) follows the run-in box, the run-in box becomes the first inline box of the block box. Otherwise, the run-in box becomes a block box. Example on next page

example for run-in box a run-in box example h3 { display: run-in } a run-in heading. and a paragraph of text that follows it and it continues on the line of the h3

compact box If a block-level box follows the compact box, the compact box is formatted like a one-line inline box. The resulting box width is compared to one of the side margins of the block box, –left margin if direction is left-to-right –right margin if direction is right-to-left If the inline box width is less than or equal to the margin, the inline box is given a position in the margin as described immediately below. Otherwise, the compact box becomes a block box.

compact box example <div style="dt { display: compact } dd { margin-left: 4em }> short description goes here. too long for the margin description goes here.

classification properties III the whitespace: property controls the display of white space in a block level tag. –'normal' collapses white space –'pre' value similar to tag –'nowrap' ignores carriage returns only

generated contents properties generated contents is, for example, the bullet appearing in front of a list item. {content:} can be used with the :before and :after selectors. Example p.note:before {content: "note"} will insert the string "note" before any paragraph in the class 'note'. The content can be –a text string –a url(URL) where the contents is to be found –a attr(att) where att is the name of the attribute, the content of which is being inserted

generated contents properties II Here are some counter properties –{counter-reset: counter} resets a counter counter –{counter-increment: counter} increments a counter –{counter(counter)} uses the counter Example h1:before {counter-increment: chapter_counter; counter-reset: section_counter; content: "Chapter " counter(chapter_counter) ":"} and then we can use h2 for the sections, of course! browser support uncertain!

Paged media support I CSS has the concept of a page box in which paged output should be placed rule can be used to specify the size of the {size: 8.5in 11in} Valid values are one or two lengths and they words portrait and landscape. The latter will depend on the default print sheet size, country- specific.

Paged media support II You can add {margin: }, {margin-top: }, {margin- left: }, and {margin-right: } properties. They will add to the margins that the printer will set by default, and these margins you will not be able to control. You can add a {marks: crop} property to add crop marks You can add a {mark: cross} property to create registration marks.

Paged media support III You can use three pseudoclasses to specify special cases –:first for the first page –:left for any left page –:right for any right page Example :first {margin-top: 3in}

Named pages You can give a page rule an optional name. rotated { size: landscape} Then you can use this with the page property to specify specific ways to print things. Example table {page: rotated} will print the table on a landscape sheet. This comes in handy for bulky tables.

Actual page breaking Pages will break if –the current page box flows over or if –a new page format is being used with a {page: } property You can take some control with the {page-break- before: } and {page-break-after: } properties. They take the values –auto– always – avoid– left– right The latter two make sure that the element is on a left or right page. Sometimes this will require two page breaks.

conclusions These are not all the properties. Audio properties are still missing But I am not sure if I should go into more.

Nielsen on site design This is the longest of the chapters in his book. It is about the organization of sites. But the chapter itself is badly organized. It looks like a Jackson Pollock painting and reads like a bad student essay –no structure –things repeated from before

Nielsen on site design Usually there is more attention on pages design than on site design. Presumably because the page design is visual. But site design is more important. Study found that only 42% of users could find simple answers to questions on a web site.

the home page has to be designed differently than other pages. must answer the questions –where am I? –what does this site do? need a directory of main area needs a summary of the site purpose a principal search feature may be included, otherwise a link to a search page will do you may want to put news, but not prominently

the home page make the home pages a splash screen is not a good idea the name of the site should be very prominent, more so than on interior pages, where it should also be named There should be a link to the homepage from all interior pages, maybe in the logo. The less famous a site, the more it has to have information about the site on interior pages. Users should not be "forced" to go through the home page.

metaphor (why does he talk about this here?) it is usually not a good idea to have metaphor on the home page. a notable exception: the shopping cart –has become a standard feature –but still illustrates some limits of metaphors when you want to buy multiple items of the same kind when you want to move something out of the cart

why navigation? Navigation should address three questions –where am I? relative to the whole web relative to the site the former dominates, as users only click through 4 to 5 pages on a site –where have I been? but this is mainly the job of the browser esp. if links colors are not tempered with –where can I go? this is a matter for site structure

site structure to visualize it, you have to have it first. Poor information architecture will lead to bad usability. Some sites have a linear structure, but most sites are hierarchically organized. What ever the structure, it has to reflect the users' tasks, not the company structure.

Nielsen's example company A corporate site may be divided into –product information product families –individual products –employment information--investor information Now consider a page with configuration and pricing for SuperWidgets. It may belong to –company's web site-- Widgets products –products category-- SuperWidgets –pricing and configuration Nielsen says: show all five levels of navigation. Have links to WidgetsClassic and MiniWidgets on the SuperWidgets page.

breath vs depth in navigation some sites list all the top categories on the left or top –users are reminded of all that the site has to offer –stripe can brand a site through a distinctive look an alternative is to list the hierarchical path to the position that the user is in, through the use of breadcrumbs –can be done as a one liner combining both –takes up a lot of space-- can be done as an L shape –recommended for large (10k+ pages) with heterogeneous contents

large volumes of information most user interfaces on the web are clones of the design of the Mac in They are not designed to handle vast amounts of information. Nielsen does not say why. Historically, early web pages had long lists of links Nowadays, there is more selective linking Users want site maps but they don't seem to be much help.

reducing navigational clutter aggregation shows that a single piece of data is part of a whole summarization represents large amounts of data by a smaller amount filtering is throwing out information that we don't need truncation is having a "more" link on a page example-based presentation is just having a few examples

subsites most sites are too large for the page belonging to them adding much information. therefore subsites can add structure a subsite is a bunch of pages with common appearance and navigational structure, with one page as the home page. –each page in the subsite should point to the subsite home page as well as to global homepage –should combine global and local navigation

search and link behavior Nielson says that his studies show that slightly more than 50% of users are search-dominant, they go straight to the search. One in five users is link-dominant. They will only use the search after extensive looking around the site through links The rest have mixed behavior. They will make up their mind depending on the task and the look of the site.

search site search should be on all pages in general it is not a good idea to scope the search to the subsite that you are on –users don't understand the site structure –users don't understand the scope of the search if you have a scoped search –state the scope in query and results page –include link to the search of the whole site, in query and results page "not found? … try to search entire site "

Boolean searches they should be avoided because noone understands them. Example task. –"you have the following pets: cats dogs –find information about your pet" –users search "cats and dogs" and find nothing. –geeks or librarians among users will then say "oh, I should have used OR".

help the user search Nielsen says that computers are good at remembering synonyms, checking spelling etc, so they should evaluate the query and make suggestions on how to improve it. but I am not aware of systems that do this "out of the box". use a wide box. Information retrieval research has shown that users tend to enter more words in a wider box.

the results page computed relevance scores are useless for the user URLs pointing to the same page should be consolidated search should use quality evaluation. say, if the query matches the FAQ, the FAQ should give higher ranking. [he has other suggestions that are either unrealistic or would be part of serious information retrieval research]

metadata Nielsen thinks that metadata should be used because humans are better at saying what the page is about than machines. He recommends writing into the "name" attribute of with the value 'description' He also says you should add keywords, with your own keywords and those of your competitors. He mentions no engine that uses these…

search destination design when the user follows a link from search to a page, the page should be presented in context of the user's search the most common way is to highlight all the occurrences of the search terms. –This helps scanning the destination page. –Helps understanding why the user reached this result. –[but will be no good if the term is in the metadata]

URL design URLs should not be part of design, but in practice, they are. Leave out the " when referring to your web page. You need a good domain name that is easy to remember.

understandable URLs Users rely on reading URLs when getting an idea about where they are on the web site. –all directory names must be human-readable –they must be words or compound words site must support URL butchering where users remove the trailing part after a slash make URLs as short as possible use lowercase letters throughout avoid special chars i.e. anything but letters or digits stick to one visual word separator, i.e. either hyphen or underscore

archival URL After search engines and recommendations, links are the third most common way for people to come across a web site. Incoming links must not be discouraged by changing site structures

dealing with yesterday current contents Sometimes it is necessary to have two URLs for the same contents: –"todays_news" … –"feature_ " some may wish to link to the former, others to the latter In this case you should advertise the URL at which the contents is archived (immediately) an hope that link providers will link to it there. You can put a note on the bottom of the page, or possibly use a simple convention if it is very easy to guess.

supporting old URLs Old URLs should be kept alive for as long as possible. Best way to deal with them is to set up a http redirect 301 –good browsers will update bookmarks –search engines will delete old URLs There is also a 302 temporary redirect.

refresh header <meta http-equiv="refresh" content="0; url=new_url"> This method has a bad reputation because it is used by search engine spammers. They create pages with useful keywords, and then the user is redirect to a page with spam contents.

.htaccess If you use Apache, you can create a file.htaccess (note the dot!) with a line redirect 301 old_url new_url old_url must be a relative path from the top of your site new_url can be any URL, even outside your site This works on wotan by virtue of configuration set for apache for your home directory. Examples –redirect 301 /~krichel –redirect 301 Cantcook.jpg

Thank you for your attention!