|
To get your web site visitors' printer properties box to popup
when they click a "Print This Page" link, use the code below where
you would normally put the hyperlink to a page:
javascript:print()
How the source code looks with a hyperlink:
<a href="javascript:print()">Print this Page</a>
How the source code looks with an image:
<a href="javascript:print()"><img src="print.gif" border="0"
alt="name of image"></a>
Watermarks With Cascading Style Sheets
By BasicTemplates
In the print industry the sign of quality paper is a company watermark
or brand emblem. This same effect can be achieved for your company's
web site using CSS. This effect is compatible only with MIE4+ and
NS6.1+. Older browsers will simply not render the watermark.
The code for watermarking is done utilizing the background-image,
background-repeat, background-attachment, and background-position
CSS properties. This code can be placed within your external style
sheet applying it to the body tag. If you are not familiar with
the different methods of CSS and how or when to use them, be sure
to read our article, "External,
Internal or Inline? Which Method is Best?"
body {background-image: url(back.gif);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;}
If you do not have a company logo, it may be time to have one designed.
Or simply use a piece of royalty-free clipart. Open your image into
your graphics software and decrease the transparency to whatever
best suits your needs. Keep in mind that watermarks are generally
one to three shades darker than the background color. Your text
must easily be read on your web pages or the concept is lost.
It is common to use the no-repeat property so the image appears
as a professional watermark and align the watermark either in the
center of the page (as shown in the code above) or at the bottom
right of the page replacing the background-postion property with
the code below:
background-position: right bottom;
To view a demo page with a watermark using this concept, Click
Here.
Stretching Images
By BasicTemplates
Most of the time stretching an image by setting incorrect image
sizes within the HTML code would distort it horribly. Below is a
review of the example comparisons from our related article, "Adding
Text to Images: The Right Way".
Incorrect - image dimensions are incorrect
in the HTML source code
Correct.
Corporate Font
One of the things that happened was that a 'working party' of senior managers decided that the existing tendency (it was never that rigid, anyway - I always used Arial) to use Times New Roman was 'too officious' and we needed a new font to prove that we valued our employees...
|
|
|
So why then after looking at the examples above would you sometimes
have a good reason to stretch an image? Let's suppose that using a
horizontal divider border with CSS in a particular area of your page
will not work for whatever reason, or you are not familiar enough
with CSS to feel comfortable using it. An alternative for a horizontal
divider border or line separator would be a small tiny image that
you stretch to whatever length in pixels or percentage you choose.
Below is an illustration of this easy effect.
| 
Actual Size 5x2 pixels

Actual Size 5x2 pixels
|

Image stretched: HTML dimensions of this image is set to
180x2 pixels.

Image stretched: HTML dimensions of this image is set to
75%x2 pixels (75% of this table cell)
|
About the Author:
BasicTemplates.com designs
Website Templates with External CSS and has been providing webmasters
worldwide with affordable template designs since 1994. BasicTemplates
currently offers 650+ designs which may be purchased individually
or get complete access to all templates via an affordable membership
plan. Most templates were strategically designed with interchangeable
graphics and elements to increase the potential number of design
layouts for the end user. Each layout utilizes an external style
sheet for easy site maintenance and to ensure fast page load.
Read this newsletter at: http://www.thedevweb.com/2003/0918.html |
|