Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-04-2010, 09:17 AM   #1
Mutt
Too lazy to set a custom title
 
Mutt's Avatar
 
Industry Role:
Join Date: Sep 2002
Posts: 34,431
CSS Coder/designer question

i want to make my thumbnails with rounded corners - using a transparent png overlay on top of the thumbnail in a <DIV> like this http://host.sonspring.com/png_overlay/

the question is how do you make the actual thumbnail underneath the overlay clickable?
__________________
I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!
Mutt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 09:56 AM   #2
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
style the a href
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 10:10 AM   #3
Mutt
Too lazy to set a custom title
 
Mutt's Avatar
 
Industry Role:
Join Date: Sep 2002
Posts: 34,431
Quote:
Originally Posted by fris View Post
style the a href
i don't know what you mean. there's a <DIV> absolutely postioned on top of the <DIV> that has the a href in it.
__________________
I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!
Mutt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 10:22 AM   #4
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
Quote:
Originally Posted by Mutt View Post
i don't know what you mean. there's a <DIV> absolutely postioned on top of the <DIV> that has the a href in it.
CSS allows to transform almost any tag to any other tag.. for instance you can make A act like P

in your case, instead of that absolute DIV there can be an absolute A with same css properties of that DIV
OR
that absolute DIV to have A tag inside of it with 98-100% for width and height of that DIV

both cases may ruin current css hierarchy tho if css rules are addressed in hierarchical way and not adjusted to current change.
example of hierarchical rule:
div.internal div.absolute {...}


edit: i maybe off a bit, haven't toyed with css/html long time, principally it's correct.
__________________

Last edited by Serge Litehead; 06-04-2010 at 10:27 AM..
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 10:27 AM   #5
FlexxAeon
Confirmed User
 
FlexxAeon's Avatar
 
Industry Role:
Join Date: May 2003
Posts: 3,765
would have to apply the href to the top image, or the div that contains them both
__________________
flexx [dot] aeon [at] gmail
FlexxAeon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 11:11 AM   #6
gimme-website
Confirmed User
 
gimme-website's Avatar
 
Industry Role:
Join Date: Jun 2008
Location: Finland
Posts: 1,589
This has worked for me in the past, just copied and pasted from source code and css file of a live site so it will have some unnecessary code:

HTML:
<div class="model"><img src="images/model_01.jpg"><div class="overlay"></div>
<a href="#"></a></div>

CSS:

.model {
display:inline;
float:left;
height:150px;
margin:0 0 0 25px;
position:relative;
width:120px;
}
.model img {
height:150px;
width:120px;
}
.model .overlay {
background:url(images/overlay.png) no-repeat;
display:block;
height:150px;
left:0;
position:absolute;
top:0;
width:120px;
z-index:2;
}
.model a {
display:block;
left:0;
height:150px;
position:absolute;
top:0;
width:120px;
z-index:4;
}
__________________
www.gimme-website.com
gimme-website is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 11:19 AM   #7
MetaMan
I AM WEB 2.0
 
Industry Role:
Join Date: Jan 2003
Posts: 28,682
you cant just apply it to the image underneath.

you can float div on top as the "3rd layer" and positioning it the width and height of the thumbnail. then link that div.

that is the best way,

if you mean let me clarify:

bottom layer: thumbnails
2nd layer (on top): border layer
then the 3rd layer would be a block with a link on it

or just have the border layer a bg with the linked div inside it.

im hopping on a flight but thats the best way i can think of.

Last edited by MetaMan; 06-04-2010 at 11:23 AM..
MetaMan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 11:21 AM   #8
Bird
Confirmed User
 
Bird's Avatar
 
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
I like the using Javascript for that..

try corner.js or glossy.js
http://www.netzgesta.de/corner/
http://www.netzgesta.de/glossy/

http://www.netzgesta.de/index.php
__________________
ICQ:268731675
Bird is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 11:46 AM   #9
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
step 1: get a rounded corner image and the image you want to use and use it like this:

Code:
<div class="whatever">
<a href="#"><img src="myroundedimage.png" alt="" /></a>
</div>
then the css

Code:
.whatever{background: transparent url(myimage.jpg) no-repeat;}
of course you'll need different classes for each image (like .whatever, .whatever1, .whatever2 and such)

the same could be accomplished this way:

Code:
<div style="background: transparent url(myimage.jpg) no-repeat;">
<a href="#"><img src="myroundedimage.png" alt="" /></a>
</div>
therefore, you'll need 1 class per image. Using php, you can do it automatically
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 11:48 AM   #10
ProG
Confirmed User
 
Join Date: Apr 2009
Posts: 1,319
If you are using JavaScript just throw an event listener on the DIV
__________________
History will be kind to me for I intend to write it.
ProG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 12:27 PM   #11
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
use css 3
http://www.webdesignerwall.com/trend...est-practices/
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 12:47 PM   #12
czarina
Webmaster Extraordinaire
 
czarina's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: A beautiful beach...
Posts: 10,748
Quote:
Originally Posted by Bird View Post
I like the using Javascript for that..

try corner.js or glossy.js
http://www.netzgesta.de/corner/
http://www.netzgesta.de/glossy/

http://www.netzgesta.de/index.php

the problem with using javascript is that lots of surfers have it disabled now, so it wont work for them
czarina is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 12:53 PM   #13
ProG
Confirmed User
 
Join Date: Apr 2009
Posts: 1,319
Quote:
Originally Posted by czarina View Post
the problem with using javascript is that lots of surfers have it disabled now, so it wont work for them
Anyone not running JavaScript in 2010 might as well unplug their computer.

I could only find some old stats on w3schools

Quote:
Date JavaScript On JavaScript Off
January 2008 95% 5%
January 2007 94% 6%
January 2006 90% 10%
Source
__________________
History will be kind to me for I intend to write it.
ProG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-04-2010, 01:31 PM   #14
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
Quote:
Originally Posted by grumpy View Post
yes, that would be the real solution on real browsers, sadly MSIE crap doesn't recognize CSS3 and much less rounded corners
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.