Working with Background Images and CSS – Part 4: Using Images to Mimic the Appearance of Columns
Coding the Layout
Open Dreamweaver in Design view and follow the steps in the Captivate demonstration to apply the CSS to your demo.html page:
Follow these steps:
- Select the Layout tab from the Insert bar.
- Click the Insert Div button. This opens the Insert Div dialog box.
- Select At insertion point from the Insert pop-up menu.
- Select wrapper from the ID pop-up menu.
- Click OK.
- Delete the default text inserted into the wrapper div.
- Click the Insert Div button. This opens the Insert Div dialog box.
- Select the Insert pop-up menu.
- Select the After start of tag.
- Select <div id="wrapper"> from the selection pop-up menu.
- Select content from the ID pop-up menu.
- Click OK.
- Click the Insert Div button. This opens the Insert Div dialog box.
- Select the Insert pop-up menu.
- Select the After start of tag.
- Select <div id="wrapper"> from the selection pop-up menu.
- Select left from the ID pop-up menu.
- Click OK.
- Press Ctrl+F12 to open the CSS panel. You will now add a height value to this rule. This enables you to see with greater clarity.
- Select the #wrapper rule.
- Click Add property.
- Select height.
- Type 400 and select pixels as the unit. You can now see more of your background image.
- Delete the height property.
- Save your work.
Figure 1 shows the completed demo.htm file.
Figure 1. The completed demo.htm file
That completes this tutorial.
You have seen in this tutorial how you can overlay a background image with divs to fake the appearance of columns that will always be of equal length.
Where to Go from Here
Now that you have an understanding of how background images can help create a layout with more than one column, why not work your way through the "Introduction to Designing with CSS" series to build on the knowledge you have gained here?