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

  • Home
  • SEARCH
  • 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 9199881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:38:22+00:00 2026-06-17T22:38:22+00:00

Is there a solution for adding a title attribute to the image that is

  • 0

Is there a solution for adding a title attribute to the image that is displayed as a background image for div tag. The current code is like

<div style="background:transparent url(image/smiley.jpg) left bottom; cursor:pointer;">

I would like to add a title attribute “Smiley” to the background image smiley.jpg

  • 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-17T22:38:23+00:00Added an answer on June 17, 2026 at 10:38 pm

    You can put a title attribute on the div. Since the background-image repeats by default, it will fill the div.

    <div title="Smiley" style="background:transparent url(image/smiley.jpg) left bottom; cursor:pointer;">
    

    But assume for a moment that the image was set to no-repeat and was smaller than the div itself. In that case, you could not (without JavaScript) display a tooltip only when the cursor is over the background-image.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was thinking if there's a better solution for adding onclick handler to each
Is there any solution to overcome case-sensitive problem for contains method. I have code
As the title says, is there another way to pass a variable from "current"
I know the title of my question sounds like a question that already has
The only solution that i can think of so far is by adding images..
Is there any solution to detecting if a POST have been sent with jQuery?
is there any solution to show user all countries and after select country it
My question is very simple: Is there any solution to install xCode, or equivalent,
Rails has the rest autho plugin which works well but is there a solution
Is there any existing solution to embed the app.config file into the resulting assembly?

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.