Collected by Elizabeth Janson Home Page |
|
This page uses 'width=80%' to leave space for the side panel.
A Bug![]() Internet Explorer 3 for Windows does not support any of the background properties except for the background shorthand. How do side panels work?This page uses <body bgcolor=ivory style="background-attachment: fixed; background-repeat:repeat-y" background="ivyside.gif"> to place the side panel. I had to remove the Style Sheet BODY comment, used on the other pages.A Decorative HeadingA background image which repeats in this way can be applied to any element in a page.So, using exactly the same technique as above, but applying it to a heading you have H1 {background-image: URL(ivyside.gif); background-repeat: repeat-x}
As this did not fill my <TD> space, I substituted The five background propertiesThe shorthand notation for background combines background-color, background-image, background-repeat, background-attachment, and background-position, in that order.Remember I noted that IE4 allows us to remove the hyphen and capitalise the second word. Check if it works for you. background-color and background-imageFor background-color the valid values are colors, be it rgb, hex, or color name, and transparent, which makes the background transparent.There are only two values for background-image, none and a url to point to an image object. Examples: P.bg1 { background-color: #000000;} P.bg2 { background-image: url(images/bg1.gif) } background-repeatValid values are: repeat, repeat-x, repeat-y, and no-repeat. The value repeat tiles the background horizontally and vertically. repeat-x only tiles the background in the horizontal direction, and repeat-y goes in the vertical direction. As you might have thought no-repeat does not repeat the background at all.Example: <BODY style="background-repeat:no-repeat" background="test.gif"> background-attachmentThere are two values for background-attachment, scroll and fixed. A value of "scroll" is what is common with browsers today. The background scrolls along as you do. A value of "fixed" will keep the background fixed, with the text and other goodies scrolling on top of it, as on this page.background-positionYou can specify where the background is to be placed with this property. Valid values are: length, percentage, top, center, bottom, left, right.For example, the below declaration positions the background image at the lower footnote of the page: <BODY style="background-position: bottom right" background="test.gif"> Translations of keywords in positioning
ShorthandHere's the classic example that renders a non repeating background image, centered and fixed on the page:BODY { background: white url(bg1.gif) no-repeat fixed center center } More playing with side panelsYou can have only one side panel per BODY statement. So similar but different side panels for different sections is a nice idea, just needs to be on different pages.
Side panels on paragraphs can be interesting. in the Main section If you have a site that has a number of different sections you may wish to distinguish these sections from one another by giving them similar but different side panels to in the News section If you have a site that has a number of different sections you may wish to distinguish these sections from one another by giving them similar but different side panels to in the Members section If you have a site that has a number of different sections you may wish to distinguish these sections from one another by giving them similar but different side panels to
|
CSS begins here |
|
This page is part of Elizabeth Janson's web site
http://www.oocities.org/elizatk/index.html
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |