Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set background image and foreground image in css?

 
ashley Jug
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With an <img> tag. There's no such thing as a foreground image.
 
Mohan Mehra
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic