September 22, 1997
Did you know that MSDN Online provides a "tip of the week" service in partnership with Microsoft Web Builder ?
The tips consist of short examples and code snippets that make it easy for you to take advantage of new Web authoring and development features introduced by Internet Explorer 4.0. (For a sample, see the tip below.)
The Cobb Group also sponsors a discussion area where you can exchange information about Dynamic HTML and other Internet Explorer 4.0 technologies with your peers.
If you're not a member already, join the MSDN Online to take advantage of these and other benefits. Membership is free!
Sample tip: Putting a border around a paragraph
Say you want to draw a border around your text paragraphs to separate them visually within your HTML document. In traditional HTML, you'll have to resort to using tables. In Internet Explorer 4.0, you can use Cascading Style Sheets (CSS) to add this effect easily.
If you want all of your paragraphs to have a border, add a style definition as follows at the beginning of your document:
<STYLE> <!-- P { border-style:solid; border-width:thin; border-color:orange; } --> </STYLE>Now you can use the <P> tag in the body of your document as you normally would. The result is a thin border around each paragraph.
What if you want to add a border to a single paragraph within your article? Skip the style definition above, but add the following to the <P> tag before the text, and make sure to end the paragraph with the </P> tag, as follows:
<P style="border-style:solid; border-width:thin; border-color:orange;"> Stylish paragraph sporting a thin, solid, orange border. </P>
Here's the result:
Stylish paragraph sporting a thin, solid, orange border.
For additional border options, see the "Box Properties" section of the Cascading Style Sheets in Internet Explorer 4.0 article.