PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
It is currently Wed Sep 30, 2020 1:40 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Aug 08, 2014 5:32 am 
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
I'm trying to get a "REQUEST SAMPLES" link to overlay on the image.

With this, the text is at the top of each DIV box, then the image. I want the link to be overlaid the image, button center.
No matter what I do to TOP or LEFT, it makes no difference.

Syntax: [ Download ] [ Hide ]
margin-bottom: 5px;

position: relative;
float: left;
text-align: center;
margin-right: 31px;
width: 142px;
height: 185px;
font-size: 12px;
margin-bottom: 8px;
  display: table;

.bestsellerhomeboxspan {
  display: table-cell;
  vertical-align: bottom;

.bestsellerhomebox img

#sampleadd {

margin-top: 0px;
    height: 20px;
    position: absolute;
background-color: #F2F2F2;
padding: 3px;
font-size: 11.2px;
text-align: center;
left: 50;
filter:alpha(opacity=98); /* For IE8 and earlier */
    z-index: 99;
border: 1px solid #cccccc;

echo "<div class='bestsellerhomebox'>
                        <div class='bestsellerhomeboxspan'>"
                        echo "<div class='tiledboxtitle'>
                        if ($row->gramablend == "yes") { echo "<br/>";}
                        if ($row->gramablend != "yes")
                        if ($row->size2 != NULL) { echo "From ";}
                        printf (%.2f", $row->price1);
                        if ($row->clearance == "yes") { echo "&nbsp;&nbsp;<font style='color: #ff0000; font-size: 11.2px;'>CLEARANCE</font>";}
                        echo "</div>";
                        echo "<div id='sampleadd'><a href='#'>REQUEST SAMPLE</a></div><a href='/product/$row->catid/$categreplace/$row->id/$titlereplace' style='text-decoration: none'>";
                        if ($row->photoprimary == NULL) { echo "<img src='/images/blank_small.gif' border='0' alt='blank' /></a>";}
                        elseif ($row->photoprimary != NULL) { echo "<img src='/images/productphotos/small/$row->photoprimary' alt='product' border='0' /></a>";}
                        echo "</div></div>";   

Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.

PostPosted: Fri Aug 08, 2014 6:57 am 
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Do you mean something like this?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 6 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group