Step 5
How to Structure Layout
You can structure pages using the following CSS...
- Divs: Divisions (think of them like boxes). These boxes or sections, that can have their own formatting.
- Width: Adjusts the width of elements on the page.
- Float: Specifies that an element should be taken from the normal flow and placed along the left or right side of its container, where text and inline elements will wrap around it.
About Positioning of Divs
- Static: Basic default.
- Fixed: Prevents element from moving or scrolling.
- Absolute: Allows you to place elements exactly where you want them by using the positioning attributes top, left, bottom, and right to set the
- Relative: relative to its place in the code.
3 Different Ways to Code CSS
- Make a CSS style sheet sheet and attach it.
- Put CSS in head portion of HTML code.
- Place it in line <style=_____>
X, Y, Z
- X-axis: Horizontal axis of the page.
- Y-axis: Vertical axis of the page.
- Z-index: Allows objects to move forward (up) or backward (down) on the page, like an elevator. The lower the number, the further back it will be from the screen, and the higher the number, the closer it will be to the screen.
- An X,Y-axis of 0,0 would start at the top right of the page.
Linking Pages
Creating a Hyperlink in Dreamweaver
- In Dreamweaver, open the page where you want to create a link.
- Select the text (highlight) or image (click on) that you want to serve as the link (meaning the text or image that a user clicks to trigger the link).
- Click the drag-down menu "Insert". Then choose Hyperlink.
- The Hyperlink dialog box will open. In that box, click the file folder icon, and browse for the HTML page or file you want to link to. (Note: if you pick a file, choose one such as a PDF from the "documents" folder, then visitors to your site will be able to download files). Optionally you can paste in the URL in the "link" text field and not use the file folder icon at all.
- If you do choose use the file folder icon, you will browse your site root folder and find the HTML page that you want your text or image to link to. Once selected, click "Choose" (Mac) or click "OK" for (Windows), then dialog box will close.
- Optionally, before closing the hyperlink dialog box, you could also set the Target field in the Hyperlink dialog box to define if your page opens in the existing web page, or if it opens a new web page.
There you have the following options:
- Blank: the linked page will open a new browser window or in a new tab within a browser.
- New: this option is not recommended because it is not standard.
- Parent: this is almost never used, but if your page is within a frameset, you can select this option to open the linked page a level above the current page in the frame structure.
- Self: the linked page in the same window (this is the standard default method, no need to select).
- Top: the page to open in a fresh browser window, even if the page is displayed within a frame.