- This topic has 7 replies, 2 voices, and was last updated 19 years, 9 months ago by .
-
Topic
-
Please delete my “anonymous” post. 😳
Good Job Garibaldi, if you really want to make life a little easier learn CSS. You use CSS for formatting. Here’s some example code to get you going…..
Within the head tags of your html document add this line.
[code:1]
<link rel="stylesheet" type="text/css" href="http://www.wiscollectorcar.com/format.css"> [/code:1]Create a new document that we are going to call format.css to be saved in your root directory. You can apply attributes to any tag within the CSS document. For example…
[code:1]
img
{
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 0px;
border: 0px;
} [/code:1]Will make every image in html doc have a border of 0 and a margin of 0. Remember though that the formatting within the html document takes precedent over the formatting within the css document.
You can also apply classes (notice the period before header), for example within your format.css document add this:[code:1]
.header
{
text-align: center;
height: 30px;
background-image: url(http://www.wiscollectorcar.com/bckgrnd_table_header.jpg);
border: 0px;
}[/code:1]Create a image that is 30px X **px, name it bckgrnd_table_header.jpg or whatever you want just make sure to change the file name in the css doc. and save it to your root directory or wherever you wish again making sure to change the file location in the css doc if you do.
Add the following lines to your HTML doc.
[code:1]
<table>
<tr>
<td class="header">Text will align to the middle</td>
</tr>
</table>[/code:1]
You now have a heading that uses the the background image you created with text aligned to the middle.
To take it a little further you can apply classes to tags. Note that instead of using all the attributes top, bottom,righ and left I’m applying the margin attribute to the entire image simply by just using the plain margin attribute.[code:1]
img.bigborder
{
margin: 0px;
border: 20px;
}[/code:1]Now any image that has the the following code in your html doc will have a border of 20px.
[code:1]<img class="bigborder" src="your image source" alt="Always use the alt tag, search engines love them, So do people with sight handicaps">[/code:1]
You can set the color of the border by exchanging it with the following code in the css doc.
[code:1]border: 20px solid #FFFFFF;[/code:1]
Which will give you white border.
Now on to one of my favorites…..[code:1] a
{
color: #FFFFFF;
text-decoration: underline;
font-weight : bold;
}a:hover {
color: #000000;
text-decoration: underline;
font-weight : normal;
}[/code:1]This will make any text link white, bold and underlined. It turns black normal font and underlined on a mouseover. 😉
- You must be logged in to reply to this topic.