Bannières Création de bannières en direct, échange de bannières Graphique
Informatique Internet Loisirs Programation Recherche
Référencements
Sports
WEBMASTERS!
Jolywood |
CCS GLOBAL & PAGE DEFINITIONS : We're going to use a couple of CSS techniques to define global and page definitions to our file that control both page and text margins. Using these tools, we can pre-define how pages will display information, as well as singularly defining indents for text. Consider this code: <style> body { margin-top: 10; margin-left: 10; margin-right: 0; margin-bottom: 0; } #text1 { margin-top: 5; margin-left: 10; margin-right: 10; margin-bottom: 5; } </style> This is our stylesheet, which can be placed in the head of each document, or referred to as an included file. This does two things: First, it creates page margin definitions as defined in the body function, where we have a top margin of 10 pixels and a left margin of 10. Now we can take this a step further and define margins for individual text placements. In the following example, we do this by creating an ID with the "#" symbol, then name it (in this examlple, we cal it text1.) Notice how CSS allows us to define our own ID names; this is super handy as we can create multiple IDs for different effects. So, to call our text margin, we ID a Div tag as shown below: <table width="400" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="c0c0c0" align="left"> <div id="text1">See how this text indents ...? </div> </td> </tr> </table> If all goes well, you'll see your text is further indented by 10 pixels on the left and right, and 5 on top and bottom. Play with these values to get a good feel for how this works. Best of all, this works in both Netscape and IE, so you're safe to give it a try.
REPLACING YOUR CURSOR : There are a number of ways to do this; the easiest, however, is to use the CSS definition, either as an include, a page reference or a single instance. CSS allows for 7 variations on the default arrow cursor. Here's how to implement them. As an include: create a file with your CSS definitions, then source that file as a file include, such as: <LINK TYPE="text/css" HREF="file.css" REL=stylesheet TITLE="mystyle"> where the HREF points to your stylesheet, which is just a text document saved with the .css extension, excluding the <style> tag. OR as a page include: you can do this inside the body tag, such as: <body style="cursor:crosshair"> OR as an individual reference, which means separate elements could have separate cursors, such as: <a href="page.htm" style="cursor:hand">Text</a> <a href="page.htm" style="cursor:crosshair">Text</a> <a href="page.htm" style="cursor:text">Text</a> <a href="page.htm" style="cursor:wait">Text</a> <a href="page.htm" style="cursor:move">Text</a> <a href="page.htm" style="cursor:help">Text</a> <a href="page.htm" style="cursor:n-resize">Text</a> Note, the final example, n-resize, is an arrow whose direction is called by "n" for north, "s" for south, etc. |