473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Image with text inside

Hi everydoby!

I have an issue,

I have an static image, and I need to write text inside it in runtime, but I
don't know how! I can't use absolute position in atributtes style.

Thanks.
Oct 30 '07 #1
4 1390
Set the image as the background in a control capable of accepting texts.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"albertosoria" <al**********@discussions.microsoft.comwrote in message
news:8E**********************************@microsof t.com...
Hi everydoby!

I have an issue,

I have an static image, and I need to write text inside it in runtime, but
I
don't know how! I can't use absolute position in atributtes style.

Thanks.

Oct 30 '07 #2
Thanks Eliyahu, I've already tried that, and It works fine on screen, but If
you want to print it, the image doesn't print, because IE has by default not
to print background images.

So, I can't use backgrounds, because I need to print the page.
"Eliyahu Goldin" wrote:
Set the image as the background in a control capable of accepting texts.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"albertosoria" <al**********@discussions.microsoft.comwrote in message
news:8E**********************************@microsof t.com...
Hi everydoby!

I have an issue,

I have an static image, and I need to write text inside it in runtime, but
I
don't know how! I can't use absolute position in atributtes style.

Thanks.


Oct 30 '07 #3
If you put the image in a div, and set the dive to the size of the image,
and then add another div inside the first, under the image, and use relative
positioning and ZIndex, you can move it up over the image.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"albertosoria" <al**********@discussions.microsoft.comwrote in message
news:9B**********************************@microsof t.com...
Thanks Eliyahu, I've already tried that, and It works fine on screen, but
If
you want to print it, the image doesn't print, because IE has by default
not
to print background images.

So, I can't use backgrounds, because I need to print the page.
"Eliyahu Goldin" wrote:
>Set the image as the background in a control capable of accepting texts.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"albertosoria" <al**********@discussions.microsoft.comwrote in message
news:8E**********************************@microso ft.com...
Hi everydoby!

I have an issue,

I have an static image, and I need to write text inside it in runtime,
but
I
don't know how! I can't use absolute position in atributtes style.

Thanks.



Oct 30 '07 #4
Thanks Kevin!

Finally, I've used a similar solution and it works.

I put the image in a div, but I put the labels inside as well, that is:

<div id="Image">
<asp:Image ID="Image_test" runat="server" ImageUrl="image_test.jpg" />
<asp:Label ID="Label1" runat="server" Text="MyText" style="left: 20px;
position: relative; height: 18px; top: -410px"></asp:Label>
</div>
In page_load I use:
Label1.Text = "Text I want to show"

And that's all, it works!
You can notice that the top atributte is "-410px", it makes the label appear
over the image.
"Kevin Spencer" wrote:
If you put the image in a div, and set the dive to the size of the image,
and then add another div inside the first, under the image, and use relative
positioning and ZIndex, you can move it up over the image.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"albertosoria" <al**********@discussions.microsoft.comwrote in message
news:9B**********************************@microsof t.com...
Thanks Eliyahu, I've already tried that, and It works fine on screen, but
If
you want to print it, the image doesn't print, because IE has by default
not
to print background images.

So, I can't use backgrounds, because I need to print the page.
"Eliyahu Goldin" wrote:
Set the image as the background in a control capable of accepting texts.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"albertosoria" <al**********@discussions.microsoft.comwrote in message
news:8E**********************************@microsof t.com...
Hi everydoby!

I have an issue,

I have an static image, and I need to write text inside it in runtime,
but
I
don't know how! I can't use absolute position in atributtes style.

Thanks.


Oct 31 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Abs | last post by:
Hi! I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's...
6
by: Van der Weij | last post by:
Hi, I placed an image inside a div with a small paragraph of text, but now the div doesn't contain the image (the image strechtes below the border of the div). See screenshot at...
12
by: Charlie King | last post by:
As I understand it, the use of FIR* to replace heading tags with images in visually enabled CSS browsers is now frowned upon on the basis that some screen readers will *nor* read back text that is...
1
by: scott | last post by:
Hello, I'm trying to create the following effect: IMG text para- graph
5
by: ivowel | last post by:
dear css experts: I have some TIFF images of text articles. I would love to be able to use the "Find" feature in my browser to a particular word in the text, and to have hrefs in the document...
14
by: Zhang Weiwu | last post by:
Hello. I have been using word processor like OOO for nearly 10 years and such layout is very usual to me: gopher://sdf.lonestar.org/I/users/weiwu/ooo_wrap_correctly.png but I found it's very...
16
by: eholz1 | last post by:
Hello CSS group, I saw a beautiful effect that I would like to use either by CSS or using photoshop to create the image/effect (maybe even imagemagick) the site address is:...
4
by: remya1000 | last post by:
i'm using VB.Net Application program. i'm creating 64 button dynamically during run time. and from database i'm getting the description, font color, back color and picture path. and if the picture...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.