|
Borders without Images / Borders with Tables
|
|
Truly, another sad.tutorial. At least it was a punishment for me to make. A few simple ways to make a site look nice without having to use images as borders. Jump right to your section with the floating quick-nav >> (sorry, my zip disk got all wet and it looks like there has been some water damage to this page) |
|
Option Two - Just Tables, sans-nesting. Drag a new table onto your page. First, let's start with a 1x1 table. In the Inspector, select the Table tab and set the color for your border here. Now change cell space to 1 (this is where you determine the thickness of your border). Change the cell pad to give your content some breathing room. I put mine to 2. Add some text and this is what you get:
Just like option 1 but none of the nested hastle. Now, drag another table over from the objects pallet but this time leave it as the default 3x3 and enter these settings, border 0, cell pad 2, cell space 6 and make sure the color check box for the table IS NOT selected. Then, select the cells of your table and assign them a color. This makes your table cells seem to float. Because we did not assign a color to the table but just the cells, the background shows through. Cool effect (assuming you are viewing this page with a browser that accepts CSS backgrounds).
Next, copy the previous table or make a new one. This time, enter these settings, border 0, cell pad 2 and cell space 1. Then select the top right cell (for example) and in the inspector pallet assign it a row span of 3 just for good measure. This way you can neatly divide a layout and give it a border at the same time.
**Note: if you have cells that are not showing up as the color you want, it may be because you do not have any content in them. To fix this, click inside the cell and type a non-breaking space by holding down the option/alt key and hitting the space bar (but not too hard). |
|
Option Three - Using CSS. This is my new favorite way of doing borders. Unfortunately, this is not fully supported on older browsers. Too bad because this is cool. Ok, drag a new experimental victim, er, table onto your page and make it a 1x1, border-0. Now, open up the CSS Editor by clicking on the stair-step looking button on the top right of your window. Looks like this: ![]() Now we are going to make a new class for our table. Click the new class button like this: ![]() Now name the class by switching to the inspector pallet with the .class still selected. If you're not, select the pencil button and name your class there. I'm going to name mine .sadtable. ![]() Next we are going create our table border by clicking on the border button. Now, (in the following picture) red #1 sets the width of the border, red #2 sets the color, and red #3 determines what kind of border (when you're testing this yourself, tryout some of the other borders, you can make some pretty hideous stuff!). I set my border to a 1 pixel, darkish-colored, solid line. ![]() Now, we can change the fill of our table by clicking on the background button and assigning it a color. You can also chose to use a background image as well. And this is the really cool part, you can control exactly where the image sits on your page in the background even in negative numbers! If you are viewing this with a capable browser, you can see that I am controlling my background image this way (see the about this page section at the bottom for more info). ![]() Finally, I want to add some padding to the left side of my table so my text does not push right up against the side. Check the picture to see how I've done this. ![]() Now, we do the easy part. Remember the table we made at the beginning of Option-3? Now we select it on our page and open up the CSS window. Don't get this confused with the CSS Editor. Go to your menu and select Window > CSS. Assuming you have your table selected, your CSS window should look like this (I've made a second version two show a different style): ![]() Simply click on the style you created and WHAM. Your table, and any others later if you want, now have this style! (applied CSS styles do not always show up in GoLive layout mode - preview in browser to check your work) Here is the table we've made:
Let's say you don't think the color is right and want to change it or the size of the font in the table (or whatever really) BUT you have allready populated your page with about 80 tables. Doing this with option 1 or 2 would be brutal. With CSS, simply go back in and change up your settings and it automatically updates all your tables with that particular class assigned to it! Here is a modification of my sadtable style I called .sadtable2 (notice that there are only top and bottom borders on this one!):
So, there you have it. 3 options for quickly adding style to your layouts without all the overhead. Tastes great, less filling. And they are quite easy to do. Thanks for stopping by. |
About this page: If you are using a capable browser you will notice a really cool effect going on with the background image of this page and the tables. A simulation of transparency of sorts using non-repeating, fixed backgrounds in my CSS styles. If you want to know more about this or want to know which browsers support this (I was suprised that the MAC version of IE actually supports this while Win IE6 does not!) check out this page - CSS/Edge |