Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Iron Speed
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old February 7th, 2004, 04:54 AM
tcjay tcjay is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 4 tcjay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
positioning text over an image

I am trying to position text over an image in a column of a table. I have placed the code below: What happens is a blank line appears in the table displacing the image.

This is the code:

<table>
<TR>
<TD ></TD>

<TD width="300" align="left"><IMG SRC="../../templates/nature/images/menubox_02.gif" WIDTH=300 HEIGHT=41 ALT="">

<div id="Layer1" style="position:relative; width:287px; height:23px; z-index:2; left: 47px; top: 36px;">Needlepoint Shop Guilford</div>

</td>

URL

How do I go about writing the code to eliminate the white line and place the text over the image?

Reply With Quote
  #2  
Old February 7th, 2004, 08:46 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Try setting you layer to "position: absolute"
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old February 7th, 2004, 10:41 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
putting the image in a layer as well might help for your positioning...
not a requirement, just a suggestion...

there's a big movement trying abolish the use of tables =)
instead using CSS and <div>'s for layout positioning

Reply With Quote
  #4  
Old February 7th, 2004, 12:01 PM
tcjay tcjay is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 4 tcjay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I suppose that is the question.

Reply With Quote
  #5  
Old February 12th, 2004, 04:50 PM
jonny_Q jonny_Q is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 5 jonny_Q User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to jonny_Q Send a message via AIM to jonny_Q
Quote:
Originally Posted by tcjay
I am trying to position text over an image in a column of a table. I have placed the code below: What happens is a blank line appears in the table displacing the image.


Here's my way:
Code:
<table width="300" height="41" cellpadding="0" cellspacing="0" border="0" style="background-image: url('../../templates/nature/images/menubox_02.gif')>
<TR>
<TD width="300" align="left">
<div id="Layer1" style="position:relative; width:287px; height:23px; z-index:2; left: 47px; top: 36px;">Needlepoint Shop Guilford</div>

</td></tr></table>

It worked for me =)

Reply With Quote
  #6  
Old February 12th, 2004, 05:54 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Here's the more correct, standards-based way of doing it:
Code:
<style type="text/css">
#outter {
	width : 400px;
	height : 80px;
	padding : 0;
	margin : 0;
	background-image: url(your image);
	border : 1px solid green;
	position : relative;
}

#inner {
	position:absolute;
	z-index : 2;
	left: 50%;
	top: 50%;
	border : 1px solid blue;
	margin-top : -10px;
	margin-left : -75px;
}
</style>

<div id="outter">
	<div id="inner">Needlepoint Shop Guilford</div>
</div>
No evil tables. And nice, standard, easily manageable code.

Reply With Quote
  #7  
Old February 15th, 2004, 03:38 AM
tcjay tcjay is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 4 tcjay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by jonny_Q
Here's my way:
Code:
<table width="300" height="41" cellpadding="0" cellspacing="0" border="0" style="background-image: url('../../templates/nature/images/menubox_02.gif')>
<TR>
<TD width="300" align="left">
<div id="Layer1" style="position:relative; width:287px; height:23px; z-index:2; left: 47px; top: 36px;">Needlepoint Shop Guilford</div>

</td></tr></table>

It worked for me =)

Thanks

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > positioning text over an image


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway