10-css-for-xml

10-css-for-xml - CSS Second CSS Lecture Applications to XML...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Apr 23, 2009 CSS Second CSS Lecture Applications to XML
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 A different emphasis CSS is the same for XML as it is for HTML, but-- HTML already does a pretty good job of layout (arranging elements on the page) XML contains no layout information, so by itself it will typically be displayed as one single huge blob of text When writing CSS for XML, typically the first thing you need to worry about is arranging text on the page No current browser does a good job of supporting CSS, particularly when used with XML, so: You should make sure everyone who views your pages uses the same version of the same browser (this is possible in some companies), or You should test your pages in all the most common browsers
Background image of page 2
3 The display property Every XML element that is formatted by a CSS command is considered to be in an invisible “box” The box containing an XML element can have one of three display properties: display: block The element will start on a new line, and so will the element that follows it (an HTML paragraph is an example) display: inline (default) The element will not start on a new line, or cause the next element to start on a new line ( bold is an HTML example) display: none The element is hidden and will not appear on the display
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 CSS units For many of the remaining CSS values, we will need to be able to specify size measurements These are used to specify sizes: em width of the letter ‘ m ex height of the letter ‘ x px pixels (usually 72 per inch, but depends on monitor) % percent of inherited size These are also used to specify sizes, but don’t really make sense unless you know the screen resolution: in inches cm centimeters mm millimeters pt points ( 72pt  =  1in ) pc picas ( 1pc  =  12pt ) Note: you can use decimal fractions, such as 1.5cm
Background image of page 4
5 border (can be colored) Boxes The invisible box containing a styled XML element has three special areas: padding (invisible) margins (invisible) The element
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

10-css-for-xml - CSS Second CSS Lecture Applications to XML...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online