January 01, 2002
Flexible Design, Alignment, and RolloversJoyce Evans
Today the main things we will be exploring are flexible design, nesting tables, and a little code. I'm sure that by now you want to get into more of the "fun" stuff of Dreamweaver, so we'll do a quick rollover as well.
If you've done the last installment, what you ended up with was a centered logo and 3 buttons on the left side of your screen. Let's take a look at italthough it's served its purposeto show you how to insert a table, merge cells, and center and add links. Today we will begin by using a different table layout.
Let's evaluate what we had; the buttons are right up against the side and our table spans the entire width of the monitornot very appealing. If we were to add text or images right now they would span the entire page, making reading quite difficult. We could fix this but I'd rather show you how to develop a layout that is both browser friendly and kind to your users' eyesand have our images stay where we put them as well.
Stretchy Tables
Launch Dreamweaver and open your site. If you are following along from the first tutorial then you have a site defined. If not, simply go to:
Now comes the neat part plus a few quirks within Dreamweaver.
You may be scratching your head at this time saying, " 20 pixels plus 100% plus 20 pixels doesn't add up." That's because the 100% of the cell is 100% of the available space. You'll see it in action soon.
I have refrained from looking at codeuntil now. I think it is important at this point to see what is going on. Click on the HTML icon on the lower right corner of the document window, or the menu bar, Window > Launcher
Notice that the first cell width (we are looking at the code for the second row) is 20 pixels high: then in purple you see the image we inserted. The next cell (td) is 100% as we set it and the third cell is 20 pixels and the image again. Great! This is exactly what we want.
I want you to notice something at this point. What you see on the screen in Dreamweaver is not always what you get. Once you enter something in the Property Inspector and click anywhere on your page the changes show upor do they? Well, not always. Look at the column lines (fig. 7). I highlighted the 20 pixel transparent gif so you could see where the 20 pixel column marker should be, but look how far away the markers are. We will look at this more in a little bit.
Compare the column lines with the ones in figure 7, but also notice the 20 pixel gif I circledstill not in the right place, but closer. We put the two buttons in just to do a test, they are on opposite sides so you can see the effect of this layout
Here are 2 screen shots taken at different screen sizes. The first one is my whole monitor window, notice how much space is between the buttons.
In this next one you will notice the space between the buttons closing up but you will also notice that you don't see the 20 pixel border after the Dreamweaver button.
Hey, I thought this was an expanding site. It is, but now is a good time to 1us what is happening. The logo is 500 pixels wide and the browser window is set to less than that so it will scroll. If you were to scroll to the right you would see that the 20 pixel border is still there. As long as the browser window isn't set to less than 500 pixels your design will appear as you set it. The buttons will remain aligned and your logo centered.
Even though in Dreamweaver the columns looked much larger than the 20 pixels, they actually weren't as you can see in the example. When in doubt, check your code.
Nested Tables
Nesting tables is putting a table into a table. This technique can give you a lot of control over your designs. When you have your design ready, sketch out how it will all fit together. One good way to do this is in Photoshop. If you do your mockups in Photoshop just use the rulers, guides, or the grid to see how you can arrange your content into columns and rows, this will also let you see visually where you may need to nest tables.
We'll need to delete the practice buttons we placed, but this will also cause a problem which we may as well deal with right now because eventually you'll pull your hair out trying to figure it out. If we simply deleted the buttons and then nested our table, the table would be lower in the cell than we'd want. You can place your cursor above the new table and delete the extra space but it won't work. We'll have to look at the code again to see why.
This is what is left after you deleted the two images. The alignment tags, but the one causing the problem is the <p> </p>. What this code means is: paragraph, nonbreaking space, and end paragraph. What it does is add a paragraph space. Just delete this section of code. Now we are ready to nest our table.
Well it's kind of ugly isn't it? But be patient, we'll fix it in the next installment, I promise.
Bottom Navigation
I am personally a firm believer in having text navigation on every page. If you only have image navigation, buttons, or image maps, people browsing without graphics won't be able to navigate. I've read plenty of times that bandwidth isn't as important now as it once was because so many people have cable modems. I suppose I could believe that if I designed only for Americans, only for people in Metropolitan areas, and only for people with unlimited access Internet accounts. Since I obviously don't buy into that bit of propaganda here is how to make text links.
When you highlight the text for your link be careful to highlight just the letters, it should look like the word Books. If I were to get the spaces before or after or the vertical line that I use to separate the links, it would look like Figure 15, pretty confusing.
Rollover
We will just touch on rollovers today and go more in-depth at a later time. The first thing you need to do is have a rollover image available. I have one for you in the images file called psbuttonover.gif. The effect is a different color of text with a glow.
See you next time when we will make an image map and explore more behaviors.
For the past four years Joyce's passion has been Web design and the tools associated with it.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|