473,796 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combining images and text

JJ
I want to display an image with some text overlay
Both the image and text will be retrieved from a database, so I have to
combine them at run-time.

Is there a way to do this?

TIA
JJ
Jan 17 '07 #1
4 2491
JJ
Let me change that question.
This is what I really want:

I want to display an image, overlaid with a semi transparent 'box' with some
clickable text in it.
Both the text and the image will come from a database.

How could I do this? Can I set panels to be partially transparent perhaps?

TIA,
JJ


"JJ" <ab*@xyz.comwro te in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
>I want to display an image with some text overlay
Both the image and text will be retrieved from a database, so I have to
combine them at run-time.

Is there a way to do this?

TIA
JJ

Jan 17 '07 #2
JJ
I'll try to answer my own question....ple ase correct me if you know a better
way:

I created two panels - one large one for the background image and one
smaller one within it.

In the smaller one I added my label which will hold the text.

I then set the background image of the larger panel to my database image. I
set the style of the inner panel to:

background-color: #ffffff;

filter: alpha(opacity=5 0);

-moz-opacity: .5;

This makes the inner panel 50 per cent transparent and achieve the desired
effect.

The only problem is that it ofcourse fades the text also, so it is never
possible to achieve completely black text

I'll see if anyone suggests another way, or has any comments on this
method....

JJ
"JJ" <ab*@xyz.comwro te in message
news:%2******** **********@TK2M SFTNGP04.phx.gb l...
Let me change that question.
This is what I really want:

I want to display an image, overlaid with a semi transparent 'box' with
some clickable text in it.
Both the text and the image will come from a database.

How could I do this? Can I set panels to be partially transparent perhaps?

TIA,
JJ


"JJ" <ab*@xyz.comwro te in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
>>I want to display an image with some text overlay
Both the image and text will be retrieved from a database, so I have to
combine them at run-time.

Is there a way to do this?

TIA
JJ


Jan 17 '07 #3
Hi,

JJ wrote:
I'll try to answer my own question....ple ase correct me if you know a better
way:

I created two panels - one large one for the background image and one
smaller one within it.

In the smaller one I added my label which will hold the text.

I then set the background image of the larger panel to my database image. I
set the style of the inner panel to:

background-color: #ffffff;

filter: alpha(opacity=5 0);

-moz-opacity: .5;

This makes the inner panel 50 per cent transparent and achieve the desired
effect.

The only problem is that it ofcourse fades the text also, so it is never
possible to achieve completely black text
Since opacity will be also applied to the children, what you can do is
take the text out of the "inner panel" hierarchy and use relative
positioning.

For example:

<div class="divBackg round">
<img src="yourImage. jpg" />
<div class="divTextB ackground"></div>
<div class="divText" >Hello world</div>
</div>

with

.divBackground
{
}

.divTextBackgro und
{
position: relative;
top: -50px;
background-color: White;
filter: alpha(opacity=5 0);
opacity: 0.5;
height: 30px;
}

.divText
{
font-weight: bold;
position: relative;
top: -80px;
}
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 18 '07 #4
JJ
Ofcourse - I didn't think of that. Thanks.

JJ

"Laurent Bugnion [MVP]" <ga*********@bl uewin.chwrote in message
news:u$******** *****@TK2MSFTNG P06.phx.gbl...
Hi,

JJ wrote:
>I'll try to answer my own question....ple ase correct me if you know a
better way:

I created two panels - one large one for the background image and one
smaller one within it.

In the smaller one I added my label which will hold the text.

I then set the background image of the larger panel to my database image.
I set the style of the inner panel to:

background-color: #ffffff;

filter: alpha(opacity=5 0);

-moz-opacity: .5;

This makes the inner panel 50 per cent transparent and achieve the
desired effect.

The only problem is that it ofcourse fades the text also, so it is never
possible to achieve completely black text

Since opacity will be also applied to the children, what you can do is
take the text out of the "inner panel" hierarchy and use relative
positioning.

For example:

<div class="divBackg round">
<img src="yourImage. jpg" />
<div class="divTextB ackground"></div>
<div class="divText" >Hello world</div>
</div>

with

.divBackground
{
}

.divTextBackgro und
{
position: relative;
top: -50px;
background-color: White;
filter: alpha(opacity=5 0);
opacity: 0.5;
height: 30px;
}

.divText
{
font-weight: bold;
position: relative;
top: -80px;
}
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Jan 18 '07 #5

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

Similar topics

4
9151
by: Joe Cybernet | last post by:
Is there any function for combining an absolute and a relative URL to result in an absolute URL? Like if I have http://www.domain.com and "../images/1.jpeg" it will evaluate to http://www.domain.com/images/1.jpeg. I know WinInet for windows has a function that does this called InternetCombineUrl, I just need the same function in PHP
1
2049
by: Mark McKay | last post by:
I'm developing an application that draws on several disk based images to create a composite image. I've noticed that my rendering time goes up as I load more images into memory. However, this seems to be due to the number of distinct images rather than the number of bytes they take up, since when I combine them into a single image in photoshop my rendering time goes down again. Since an image is essentially a 1D array of bytes in...
1
6760
by: Tobias ?keblom | last post by:
Hi! Hi have a number of transparent png-images that I want to dynamicly be able to combine/merge to one new image. Kind of layering the images so to speak. I have been looking at the JAI-package but I do not find the solution to my problem. thanks in advance. Tobias
4
1746
by: David. E. Goble | last post by:
Hi All; I am trying to combine to picture galleries onto te one page. But its not quite working. Here is what I have so far. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Bow's and foggy's stored signatures</title> <script type="text/javascript">
2
4593
by: alistair.calder | last post by:
I use a PHP script as a random image selector. I would like to add a small 'footer' image to the bottom of each one at runtime. I change the pool of images regularly so it is not something I want to do in photoshop, rather, I would like to find a way to do this in PHP. Is there a way to attach two images together in this way so that they are rendered as a single image? +--------------+ | Main Image |
5
2111
by: M.Stanley | last post by:
Hi, I'm attempting to create a query that will combine 2 columns of numbers into one. The followng comes from 1 table with 4 fields (A,B,C,D) A B RESULT 700 000 700000 700 001 700001 700 002 700002 ..
2
1051
by: Confessor | last post by:
I have two *very* similar groups of related procedures in my program, and I'd like to try combining them, but I'm running into one big problem. Private Sub TileSearchCluster(ByVal PossibleClusterTile1 As HexicTile, ByVal PossibleClusterTile2 As HexicTile, ByVal PossibleClusterTile3 As HexicTile) If Equals(PossibleClusterTile1.Color, PossibleClusterTile2.Color) Then If Equals(PossibleClusterTile1.Color, PossibleClusterTile3.Color) Then...
10
2369
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images. That is, images inline with the actual content of the blog itself. Is there an example that I can be pointed to, where I can examine some code and figure out how to do this? Frankly I haven't got a clue, aside from breaking the content up into...
1
2349
by: devine | last post by:
Hi All, I have a form which checks which Submit button has been pressed and also shows a textarea dependant on an option selected. The problem I have is that when I include my "display text" code, all submit buttons appear to be disabled. However, when the "display text" is removed, the buttons function correctly. <%@ LANGUAGE="VBSCRIPT" %> <%response.buffer=true%> <script language="javascript">
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10236
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10182
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.