Old 21-06-2008, 11:33   #1 (permalink)
moos3
Registered User
 
Join Date: Oct 2006
Posts: 33
Design CSS help

I'm trying to put a piece of tape image on top of thumbnails using css. Like i have in this mock up. I was typing to use the image in the border-top for the link but couldn't figure out how to position it in the center. Ideas on how to do this with css?
  Reply With Quote
Old 21-06-2008, 11:56   #2 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,524
Border images I believe are only a part of css3, not css2, which means that they won't be supported by browsers yet (if I'm right - I may not be).
__________________
This space for rent.

Dads Japan
Dudes Japan
  Reply With Quote
Old 21-06-2008, 15:55   #3 (permalink)
moos3
Registered User
 
Join Date: Oct 2006
Posts: 33
ok thanks
  Reply With Quote
Old 21-06-2008, 16:50   #4 (permalink)
Benalex
Registered User
 
Join Date: Jun 2008
Posts: 4
Hi Moos

I'm not 100% on whether this would work in your situation as Im relatively new to CSS. But if you set the width of the containing div say like width: 200px; and then on the contained div give it the styles " margin-left: auto; margin-right: auto; width: whateverpx;"

so it would look like this given that the otside image is 200px and the inside one is 100px (Just for exampls sake, obviously replace these with the real values)

<div style="width: 200px;">
<div style="margin-left: auto; margin-right: auto; width: 100px;">
<img src="images/tape.gif" height="" width="100" alt =""/>
</div>
</div>

Hope that helps.
  Reply With Quote
Old 23-06-2008, 14:03   #5 (permalink)
twentysixtwelve
css is cool m'kay
 
twentysixtwelve's Avatar
 
Join Date: Mar 2007
Location: Currently Vancouver, Canada
Posts: 385
hmm... could probably do it with some transparency. Each photo could be put in a container div with a separate bg image for each photo, then the same tape image applied over the top with CSS and a transparency applied, again through CSS.

Its a bit messy.... but would probably work.

An example is here : BBC Wales - Nature

Look at the large photo, with the dark overlay. The photo could be your photo, the overlay is the tape....
  Reply With Quote
Old 23-06-2008, 16:21   #6 (permalink)
LukeV
Best custom title ever.
 
LukeV's Avatar
 
Join Date: Apr 2008
Posts: 229
Yeh I can't recommend you do that it would be terribly inefficient once you have a full gallery. It's forgivable if it's just one image but a full gallery...no.

Anyways what's cool about that is that you can create multiple images of the type that differ from one another in length or shape and then use php to randomize the tape image on each picture. I think it will bring out the effect in a much more realistic way.
  Reply With Quote
Old 23-06-2008, 18:14   #7 (permalink)
bluesage
Senior Member
 
Join Date: Dec 2006
Location: Switzerland
Posts: 355
absolute positioned element on top of your image ?
__________________
www.benshu.ch // Evolving with Style

  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8