Print Page | Close Window

Date on Graphic

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9242
Printed Date: 01 April 2026 at 2:32am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Date on Graphic
Posted By: Misty
Subject: Date on Graphic
Date Posted: 26 January 2004 at 1:04am

I am not sure if this is possible. Does anyone know if it is possible to insert the date on a graphic? I know that you would have to use either javascript or ASP to show the current date on a web page? If it is possible to display the date on a graphic that was created in Fireworks, how do you accomplish this? Thanks!

 

 




Replies:
Posted By: zaboss
Date Posted: 26 January 2004 at 1:08am
I've heard that you could get dinamic text to place on a layer in a flash movie. Not sure though. What I know is that you coud place text over an image with ASPJpeg. But it would be over, not within.

-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: Misty
Date Posted: 26 January 2004 at 1:10am
I cannot use Flash for this case. Do you have a good example of ASPJpeg that I could see on a web site somewhere? Thanks!


Posted By: zaboss
Date Posted: 26 January 2004 at 1:17am
I don't have one for the moment, but you could go to http://www.aspupload.com/aspjpeg.html - their site and look for it...

-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: dpyers
Date Posted: 26 January 2004 at 2:19am

What technique you use depends upon why you want the date over the graphic.

  1. If you're trying to mung up the graphic to discourage picture leeches, you're better off to do it directly in Fireworks, with ASPJpeg as the second choice.
  2. If you're displaying the date over a graphic because that's where your design calls for the current date to be, use tables or css to postion the graphic under the date.
  3. If you want to do something like #2 but with a font that's not commonly found on end users computers, Check out asp routines that display graphical counters. Use that instead of the text date in #2.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Misty
Date Posted: 26 January 2004 at 2:29am

#2 applies to this case. I am somewhat lost. I will have to use ASP or Javascript to display the date. One of my clients wants the date to be displayed on the logo which is a .gif format. I have a .png format of the file.

Do you mean that I would put the code for the date under the graphic? The date will need to be on the right side of the logo rather than the left side.



Posted By: dpyers
Date Posted: 26 January 2004 at 3:47am

I set up an example of #2 at http://www.pyers.com/stuff - http://www.pyers.com/stuff

In the example, the graphic has a transparent area that extends to the right, so the date looks like it's to far to the right because it lines up with the graphic. Your logo would probably be filled in that area.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: MorningZ
Date Posted: 28 January 2004 at 7:58am

the suggestion of using CSS to position is the best (and least taxing on the server and not requiring a 3rd party component)

http://www.w3schools.com/css/css_positioning.asp - http://www.w3schools.com/css/css_positioning.asp  is more info on placing stuff precisely



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: dpyers
Date Posted: 28 January 2004 at 10:37pm

Morningz is right. Tables for tabular data. CSS for positioning.

I added a CSS example to the link I gave above.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Misty
Date Posted: 31 January 2004 at 2:40pm

dpyers,

Thank you for your help! I know how to display the date on a graphic now.



Posted By: Misty
Date Posted: 31 January 2004 at 9:21pm

I just noticed that there's a small problem. Please look at the home button at both http://www.neamp.org/calendar1.asp - http://www.neamp.org/calendar1.asp  and http://www.neamp.org/calendar.asp - http://www.neamp.org/calendar.asp . The date is displayed on the right side of the masthead on calendar.asp. It caused the home button to have more space above it. I don't want it to be that way. How do I fix this problem?  

Let me give you the code for both pages:

calendar1.asp - <table width="762" border="0" cellpadding="0" cellspacing="0">

  <!--DWLayoutTable-->

  <tr>

    <td width="762" height="151" valign="top"><img src="NeampLogo.gif" width="760" height="151"></td>

  </tr>

</table>

calendar.asp -

<table width="762" border="0" cellpadding="0" cellspacing="0">

  <!--DWLayoutTable-->

  <tr>

    <td width="762" height="151" valign="top"><img src="NeampLogo.gif" alt="Northeast Area Missions Program Serving Enon, Liberty, Rabun County, and Habersham Baptist Associations in Georgia" width="760" height="151">

      <div id="logotext"> <%= MonthName(Month(Date))  & " " & Day(Date)  & ", " & Year(Date) %>

      </div></td>

  </tr>

</table>

 



Posted By: dpyers
Date Posted: 01 February 2004 at 5:10am

To the css for div#logotext, add

 padding: 0;
 margin: 0;

The div tag is a block element. Block elements stack up vertically (<p> is a block element), and have some amount of space after them that varies by browser. With css, you can override that space.

Alternatively, you can replace the div with a span. The span tag is an inline horizontal elelment - doesn't create a new line after each occurrence.

The code <span>A</span><span>A</span><span >A</span> would display as

AAA

The code <div>A</div><div>A</div><div>A </div> would display as

A

A

A



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Misty
Date Posted: 02 February 2004 at 2:28am

I did the following:

To the css for div#logotext, add

 padding: 0;
 margin: 0;

It is still not working. When I used <span> instead of <div>, it caused the date to go above the home button. It was not on the masthead anymore.

 



Posted By: dpyers
Date Posted: 02 February 2004 at 3:06am

Ths might be something that's browser specific, but try using an inline style in the table tags for the table containing the logo and the table immediately after it. e.g.

<table style="padding:0; margin: 0;" ...rest of opening table tag



-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net