Work with Highlights Boxes
Highlights boxes provide relief or sidebar content. Our designs make use of two types, an older HTML table-based approach and a newer CSS-based approach. The CSS highlights boxes discussed here are only available in version 2.0. Table highlights boxes may be found and/or used in any site version.
|
|
Step 1: Add text highlight box
- In Dreamweaver, find and open the New Page you created earlier
- Add a paragraph return after the first few lines of text; select the first paragraph
- Place your cursor at the beginning of the first paragraph
- Click the Insert Div Tag button in the Common Insert Toolbar
- In the Insert Div Tag dialog box
- Insert: Wrap around selection
- Class: boxright_4rules
- The highlights box div wraps the selected text and allows the rest of the text to wrap
Step 2: Add auto-label
- With your cursor anywhere in the highlights box, right-click/ctrl-click the Tag Selector for <div.boxright_4rules> and find the "Set Class" command in the popup menu; select "boxright_withboxlabel"
- Add a paragraph return after the first few words of the highlights text
- With your cursor on the first line of text, change the Format in the Properties Inspector to any Heading setting (Heading 1 is not recommended here)
- The Heading becomes and automatic box label
Step 3: Add an image
- Add a paragraph break at the beginning of the highlights body text and move the cursor to the new blank line
- Insert the "arches.jpg" image as described in Add Images
- If there's enough space, text can be made to wrap the image; in many cases, the image would best fill the width of the highlight box
- The best fit comes when the image width matches one of several set widths
- Highlights boxes should be adjusted as follows so they are large enough to hold the image, but small enough that there is little or extra spacing around the image
- With your cursor anywhere in the highlights box, right-click/ctrl-click the Tag Selector for <div.boxright_4rules> to select the highlights box div tag
- View the document in Split or Code mode and find the code "<div class="boxright_withboxlabel">; place your cursor at the end of "boxright_withboxlabel" just before the close quote mark
- Press the Space bar and look for the classes that begin "setwidth"
- Our image is 165 pixels wide, so choose "setwidth175" and press Enter
- Return the document to Design preview mode
- The highlights box is now just a little larger than the image
NOTE: When highlights boxes are set narrower than the image's width, the image will protrude from the highlights box in many browsers
Step 4: Other highlights boxes
- Repeat the above steps (you may want to duplicate your body text to create more length) and experiment with other highlight boxes; look for "boxleft_" or "boxright_" classes
- Try "image_left" and "image_right" wrapped around an image
- The image should use Default alignment
- No "setwidth" modifier class is needed; the box will be as wide as the content, plus a small margin on the text size
- The box will be as wide as the widest content, image or text; use line breaks (shift-enter) and keep text short so it fits under the image
Step 5: Finish up
- Use the File menu > Save command
- Use the Site menu > Put command
- Switch to a browser, view and/or reload the page to see your changes
|
Many Stanford Medicine sites contain highlights boxes created with a table or tables. It is not recommended to create new highlights boxes of this style; instead, use CSS highlights (see other tab).
Editing existing, complex highlights boxes
- Many 1.9 sites have fairly elaborate highlight boxes, with rules and tiers and so on
- Because the width of many cells is controlled using shims (1-pixel transparent graphics), adding rows and columns can get complicated
- A Neat Trick is available to help understand and work with the existing structure of complex tables
|
« Previous | Home
| Next »