Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Beyond HTML Goodies

August 23, 2002

Go beyond the basics and learn how the pros add and use dynamic HTML features and advanced JavaScript techniques. Beyond HTML Goodies demonstrates dozens of new and different features readers can add to their existing Web pages using HTML and JavaScript. The book starts with simple text and image tips, such as adding a clock to a Web page or causing text to appear when the mouse moves over an image. It gradually builds to more complex tricks, including manipulating forms or working with cookies behind the scenes. Throughout the book, readers enjoy Joe's snappy style and "to the point" discussion of each "goody" in the book.

Chapter 3 Neat Stuff with Text and Images

After you've mastered the advanced tricks with text and images alone, you can move on to manipulating them together. This chapter contains the following tutorials to help you dazzle your audience:

  • Placing Text Over Images
  • RevealTrans Filter
  • Internet Explorer Text and Image Filters
  • Internet Explorer Wave Filters
  • Toggling Images and Text in Internet Explorer
  • Toggling Netscape's Layers

Placing Text Over Images

Now and again I wonder if people are reading all the stuff I write. When I put up the last FAQ page at HTML Goodies, I answered a question from a reader about putting text over an image. She wanted to be able to put the name of the person in the picture on top of the picture, like a caption. I said that it couldn't be done without the use of a graphics editor. Well, KaBoom! The email poured in.

You can find this tutorial, and all of its examples, online at http://www.htmlgoodies.com/tutors/textonimages.html.

You can download just the examples at http://www.htmlgoodies.com/wpg/.

Yes, people are reading. I will take the weasel road right now and say that when I answered the question, it was correct. Now the variables have changed right out from under me, and the version 4.0 browsers have offered a few different ways to do it. In this section, I'll outline three.

The Easiest Way I Know

Here you go. Figure 3.1 shows text over a stunning image of yours truly.

Hey, he's cute!

Like the haircut? Most of the top is gone, as well as most of the beard. I thought about getting a new character for the home page, but I still like the old one. Besides, as of the writing of this book, I'm back to a full head of hair and full beard. I go for the "mountain man" look once every couple of years.

Here is the code that created the caption:


<TABLE BORDER="0" cellpadding="0" CELLSPACING="0">
  <TR>
  <TD WIDTH="221" HEIGHT="300" BACKGROUND="newjoe01.jpg" VALIGN="bottom">
  <FONT SIZE="+1" COLOR="yellow">Joe Burns at Work</FONT></TD>
  </TR>
</TABLE>

I got the effect using a single table cell, adding a background, and then some text, like so:

  • <TABLE BORDER="0" cellpadding="0" CELLSPACING="0"> - This is the format for the cell. You need to set everything to zero so that the cell borders lay right against the image. That way, you have better control over the text in relation to the image.
  • <TR>-This starts the table row.
  • <TD WIDTH="221" HEIGHT="300" BACKGROUND="newjoe01.jpg" VALIGN="bottom"> - This is what does the trick. I set the image in Figure 3.1 as the background of the image cell. Note that I added the height and width of the image. You need to do that. If you don't, the cell will only conform to the size of the text you put after the <TD> command. In other words, you won't see the entire picture.
  • <FONT SIZE="+1" COLOR="yellow">Joe Burns at Work</FONT></TD> - This is the text that appears on the image. I used a FONT size and color command to get the text to show up a little better.
  • </TR>-This ends the table row.
  • </TABLE>-This ends the whole deal.

Buy this book
Title: Beyond HTML Goodies
Author: Joe Burns
ISBN: 0789727803
US: $24.99
Publication Date: June 27, 2002
Pages: 264
© 2002 Que Publishing

Doing It Through Layers - Page 2


Up to => Home / Authoring / DHTML




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers