Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9268397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:48:09+00:00 2026-06-18T14:48:09+00:00

I have been trying to make it work for a few hours, i tried

  • 0

I have been trying to make it work for a few hours, i tried a couple of solutions provided here at stackoverflow but still cant manage my content less a tag to work.

Here is my html code

<div class="productItem">
                <a class="imageContainer" style="background-image: url('<?php echo base_url() ?>images/product/thumbs/<?php echo $aProduct->filename ?>')">
                  Product Image
                </a>      
                <h4>
                    <a href="<?php echo site_url('home/product/' . $aProduct->product_id) ?>">
                        <?php echo $aProduct->product_name ?>
                    </a>
                </h4>
                <h3 class="productPrice"><?php echo $aProduct->price ?></h3>
                <span class="productItemRating">5</span>
                <a href="<?php echo $aProduct->product_id ?>" class="product-more">Buy</a>
            </div>

The problem is in the first a tag, the tag doesnt have a content.
I am giving the image as background instead of an image tag bcz someone suggested that it is faster

The CSS for the imageContainer a tag –

a.imageContainer{    
    display:block; 
    background-image: url('../images/product/thumbs/1358600020ca3.jpg');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    margin: 5px;
    background-color: white;
    float: left;
    width: 160px;
    text-indent:-9999px; 
    height: 165px;    
}

a.imageContainer:hover{    
    cursor: pointer;
}

It is supposed to work according to the other answers, i guess i am missing something so i have no choice but to ask.

live example-

http://www.safaapps.com/home/category/7

you wont be able to click on item Galaxy Y image.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:48:10+00:00Added an answer on June 18, 2026 at 2:48 pm

    Weirdly enough, if you remove the opacity rule, it’ll fix it… don’t ask me why!

    .productItem h4 {
        color: black;
        font-family: sans-serif;
        font-size: 16px;
        font-style: normal;
        margin: 3px 0;
        opacity: 0.95;
        text-align: left;
    }
    
    .productItem h3, h4 {
        color: white;
        font-family: sans-serif;
        font-size: 20px;
        margin: 0;
        opacity: 0.95;
        text-align: right;
        width: 100%;
    }
    

    The above solution works… but makes no sense. This however, makes a little more sense:

    There is no need to float the .imageContainer. This was causing a weird side-effect: the <h4> next to it, somehow, was stretched on top of it (it’s like the h4 was a blanket on top of the .imageContainer). When you where hovering over the .imageContainer, you were really hovering over the h4, that’s why your :hover style wouldn’t get triggered.

    Not sure why you had the opacity in the first place, but you can keep it. Just remove the float below.

    a.imageContainer {
        background-color: white;
        background-position: center center;
        background-repeat: no-repeat;
        background-size: contain;
        display: block;
        float: left;
        height: 165px;
        margin: 5px;
        text-indent: -9999px;
        width: 160px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to make it work with either fwrite or fputcsv but
I have been pulling my hair out trying to make this work. I have
I have been going crazy trying to make this work. I want to collect
I've been trying to get this code to work for a few hours now
So I have been stuck for a couple of hours trying to get this
I have been trying for the last few hours to get a UIAlert with
I've been trying to do this for a few hours now, but for the
I have been trying to work out a few reports based off some log
Have have been trying to make a validator for my xml files. I have
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.