How to make tool tip appear over my div rectangle?
I have 2 rectangles and a paragraph with text on my page. I need to make a tool tip appear when the mouse is over each of them. I have got this to work for the p but not the rectangles. I am guessing because I can't add my css tooltip class to my div rectangles?
- #rectangle1{ css for my div id rectangle one
- position:absolute;
- border:1px solid #333;
- padding:2px 5px;
- background-color:red;
- top: 100px;
- right: 100px;
- height: 100px;
- width: 100px;
- }
- #tooltip{
- position:absolute;
- border:1px solid #333;
- background:black;
- padding:2px 5px;
- color:red;
- }
- <div id="rectangle1" class="tooltip" title="rectangle one"></div> !!!!html for my div!!!!
- <div id="rectangle2" class="tooltip" title="rectangle two"></div>
- <p><a href="http://cssglobe.com" class="tooltip" title="gazine">Roll over for tooltip</a></p> !!!html for my p which works perfectly fine.!!!!!