This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to set background image and foreground image in css? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "how to set background image and foreground image in css?" Watch "how to set background image and foreground image in css?" New topic
Author

how to set background image and foreground image in css?

ashley Jug
Ranch Hand

Joined: Sep 02, 2011
Posts: 60
Hello,

sorry i know it sounds like a silly question but i have two pictures, pic1.jpg and pic2.jpg.I want to set pict1 as background and have pict2(foreground) displayed over pict1.jpg, i don't know how to set the pict2 over pict1.

I know for the background it will be :



In my html file it is:

how do i set pict2 over pict1 in the html file?

Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

With an <img> tag. There's no such thing as a foreground image.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Mohan Mehra
Ranch Hand

Joined: Jul 28, 2011
Posts: 63
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to set background image and foreground image in css?
 
Similar Threads
Get Image height and width
CSS and image positioning
JTextPane Flicker During Image Swap
changing background color of JFileChooser.-urgent
Clickable Div Background image