Results 1 to 4 of 4

Thread: Tooltip position

  1. #1
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default Tooltip position

    I'd like to position the following tooltip, not above the links but directly to the right of the links because the links are very tall image links, and the tooltip then pops at the top of the page and is obscured by the content at the top

    Code:
    <style type="text/css">
    	
    		.tooltip{
       			display: inline;
        		position: relative;
    		}
    		
    		.tooltip:hover:after{
        		background: #333;
        		background: rgba(0,0,0,.8);
        		border-radius: 5px;
        		bottom: 10px;
        		color: #fff;
        		content: attr(title);
        		left: 20%;
        		padding: 5px 15px;
        		position: absolute;
        		z-index: 98;
        		width: 220px;
    		}
    		
    		.tooltip:hover:before{
        		border: solid;
        		border-color: #333 transparent;
        		border-width: 6px 6px 0 6px;
        		bottom: 20px;
        		content: "";
        		left: 50%;
        		position: absolute;
        		z-index: 99;
    		}
    	
    	</style>

  2. #2
    Join Date
    Sep 2014
    Posts
    6
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    How tall are your image links?

    To push your tooltip down, you can always assign a top position:

    Example:
    Code:
    top:100px;
    Assuming that your link images are 85-90px tall, this will push it down 100px from the top, since the tooltip is absolute positioned. You can use a percentage as well.

  3. The Following User Says Thank You to kjett80 For This Useful Post:

    jundo12 (10-03-2014)

  4. #3
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    they are quite tall. almost the height of the screen

  5. #4
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    that worked, by the way. thanks too simple of a solution. dunno why i didn't think of it.

Similar Threads

  1. Replies: 2
    Last Post: 07-23-2012, 05:45 AM
  2. Sticky Tooltip script y position
    By hubier in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 02-15-2012, 10:14 AM
  3. Tooltip Position
    By Thinking Virtually in forum CSS
    Replies: 1
    Last Post: 07-23-2008, 09:17 AM
  4. Tooltip II position in text
    By browser in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 07-09-2008, 03:03 PM
  5. Image with tooltip position problem. Need help.
    By vikenk in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 12-16-2005, 04:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •