lis650 lecture 4 thomas krichel 2004-02-27. today advice css properties –box properties-- list...

56
LIS650 lecture 4 Thomas Krichel 2004-02-27

Upload: brandon-wentworth

Post on 27-Mar-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

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

LIS650 lecture 4

Thomas Krichel

2004-02-27

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

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

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

advice for cheaters

• Within a style sheet, for example the contents of a <style> tag, you can import another file using the @import command

@import url(http://www.art.org/kitsch.css);• or

@import "http://www.art.org/kitsch.css";• these two ways appear to be equivalent

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

media dependent styles• Remember the media CSS knows about ?• Using @import, you can import different types

for different media

@import "URI" medialist

where medialist is a list of one or more media, separated by comma

• Example

@import “challenged.css" braille, handheld

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

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}

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

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.

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

validating CSS

• It is at http://jigsaw.w3.org/css-validator/• 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.

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

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.

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

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

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

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 http://wotan.liu.edu/home/krichel/

clip_test.html

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

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

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

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.

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

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

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

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

Page 15: LIS650 lecture 4 Thomas Krichel 2004-02-27. today Advice CSS Properties –Box properties-- List properties –Table properties-- Classification 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)

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

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

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

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

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

example for run-in box

<head><title>a run-in box example</title>

<style type="text/css">

h3 { display: run-in }

</style>

</head>

<body> <h3>a run-in heading.</h3> <p>and a paragraph of text that follows it and it continues on the line of the h3 </body>

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

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.

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

compact box example

<div style="dt { display: compact }

dd { margin-left: 4em }>

<dl> <dt>short <dd><p>description goes here.

<dt>too long for the margin <dd><p>description goes here.

</div>

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

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 <pre> tag– 'nowrap' ignores carriage returns only

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

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

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

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

• Exampleh1: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!

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

Paged media support I

• CSS has the concept of a page box in which paged output should be placed into.

• @page rule can be used to specify the size of the page

• @page {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.

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

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.

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

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– @page :first {margin-top: 3in}

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

Named pages

• You can give a page rule an optional name. Example

@page 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.

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

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.

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

conclusions

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

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

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

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

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.

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

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

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

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.

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

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

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

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

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

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.

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

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.

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

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

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

large volumes of information

• most user interfaces on the web are clones of the design of the Mac in 1984. 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.

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

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

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

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

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

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.

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

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 <a>search entire site</a>"

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

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".

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

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.

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

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]

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

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 <meta> 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…

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

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]

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

URL design

• URLs should not be part of design, but in practice, they are.

• Leave out the "http://" when referring to your web page.

• You need a good domain name that is easy to remember.

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

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

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

archival URL• After search engines and email

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

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

dealing with yesterday current contents • Sometimes it is necessary to have two URLs for

the same contents:– "todays_news" …– "feature_2003-12-06"

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.

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

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.

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

refresh header

• <head><meta http-equiv="refresh" content="0;

url=new_url"> </head>• 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.

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

.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 http://openlib.org/home/krichel– redirect 301 Cantcook.jpg http://www.foodtv.com

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

http://openlib.org/home/krichel

Thank you for your attention!