Tooltip cut off by div container - html

I've searched this a lot and have not found, or at least I haven't been able to implement, the proper answer.
I am building a site in which I have a scrolling div with an image. I am placing tooltips over certain parts of the image, but when they are activated, the tooltips are cut off by the constraints of the div.
Working example: http://navalage.neocities.org/menu1-test.html
It is in the bottom menu. The stage tooltip appears inside of the div, and I have the others outside as an example of what I want them to do.
Hopefully someone can help, thank you!
CSS is
<style>
body {
background-color: black;
}
.div {font-family: san-serif;}
/* Tooltip container */
.tooltip {
position: relative;
display: inline-block;
border: 1px solid ;
border-color: rgba(255,255,255,1);
/* If you want dots under the hoverable text */
}
/* Tooltip text */
.tooltip .tooltiptext {
visibility: hidden;
width: 294px;
background-color: black;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;
border: 1px dashed white;
font-family: arial;
/* Position the tooltip text - see examples below! */
position: absolute;
top: 0px;
opacity: 0;
-mox-transition: 1;
z-index:33;
}
/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
z-index:34;
}
</style>
HTML is;
<div style="z-index: 2; overflow: scroll; max-width: 240px; background-color: black; margin-left: 84px; margin-top: -54px; width: 213px; height: 50px; -moz-transform: skew(1.5deg);">
<!-- Stage -->
<div class="tooltip" style="z-index: 3; margin-top:2px; margin-left: 0px; width: 35; height: 44px;">
<span style="margin-left: -84px; margin-top: -0px; z-index: 999;" class="tooltiptext"><b><u>Stage</b></u>: This is where you go to battle the enemy in the main story line (there isnt much of one).</span>
</div>
<img src="IMAGES/mainmenu.jpg" style="height:50px; margin-left: -5px; margin-top: -47px; -moz-transform: skew(-1.5deg);">
<!-- END -->
<!-- Fleet -->
<div class="tooltip" style="top: 489px; left: 130px; width: 35; height: 44px;">
<span style="margin-left: -120px; margin-top: -110px;" class="tooltiptext"><b><u>Fleet</b></u>: Here you can set up your base defence when somebody is attacking. You can also repair your ships and check on the current status of any fleets on a mission.</span>
</div>
<!-- END -->
<!-- Alliance -->
<div class="tooltip" style="position: absolute; top: 489px; left: 168px; width: 35; height: 44px;">
<span style="margin-left: -158px; margin-top: -91px;" class="tooltiptext"><b><u>Alliance</b></u>: Acces your alliance for donations, Elite Challenges (EC), Alliance fleet, Collect Supplies, Alliance War, and alliance technology.</span>
</div>
<!-- END -->
<!-- Item -->
<div class="tooltip" style="position: absolute; top: 489px; left: 206px; width: 35; height: 44px;">
<span style="margin-left: -196px; margin-top: -53px;" class="tooltiptext"><b><u>Item</b></u>: Acces your items, as well as the shop, and flash sale.</span>
</div>
<!-- END -->
<!-- Mail -->
<div class="tooltip" style="position: absolute; top: 489px; left: 244px; width: 35; height: 44px;">
<span style="margin-left: -234px; margin-top: -91px;" class="tooltiptext"><b><u>Mail</b></u>: This is where you recieve mail from system, friends, alliance leaders, escort, scout reports, and attack and defense reports. </span>
</div>
<!-- END -->
<!-- NEXT -->
<div class="tooltip" style="position: absolute; top: 489px; left: 282px; width: 25; height: 44px;">
<span style="margin-left: -272px; margin-top: 0px;" class="tooltiptext">Go to the next menu page
<a href="menu2.html">
<button>
Next</button>
</a>
</span>
</div>
<!-- END -->
</div>

You have to change your css in in this div and span
<div class="tooltip" style="z-index: 3;margin-top:2px;margin-left: 0px;width: 35;height: 44px;position: absolute;">
<span style="margin-left: -84px;margin-top: -72px;/* z-index: 999; */" class="tooltiptext"><b><u>Stage</u></b>: This is where you go to battle the enemy in the main story line (there isnt much of one).</span>
</div>

Related

Build a line between div

What element do I need to create black lines in the image ? [![enter image description here][1]][1]
I have written code but I need lines like image (create between images) how can I do this?
Please tell me
My codes are as follows:
using ":after" & ":before" you can set line between two images
.hiw-content .hiw-img img {
width: 100%;
height: auto;
padding: 100px;
}
div#a3:after {
z-index: 999;
content: '';
width: 150px;
background-color: black;
/* left: 0; */
height: 5px;
position: absolute;
right: -80px;
top: 50%;
border-radius: 100px;
}
div#a3:before {
z-index: 999;
content: '';
width: 150px;
background-color: black;
left: -80px;
height: 5px;
position: absolute;
/* right: 50%; */
top: 50%;
border-radius: 100px;
}
div#a3 {
overflow: visible;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="wrapper">
<div class="col-md-4 col-hiw col-hiw-bottom" id="a4">
<div class="hiw-content">
<div class="hiw-img"><img src=""></div>
<span class="hiw-title">Customer Service</span>
<p class="hiw-content">Let our dedicated customer service team take care of any inquiries</p>
</div>
</div>
<div class="col-md-4 col-hiw col-hiw-bottom" id="a3">
<div class="hiw-content">
<div class="hiw-img"><img src=""></div>
<span class="hiw-title">Order fulfilled</span>
<p class="hiw-content">Once a buyer places an order we’ll take care of order production and shipping.</p>
</div>
</div>
<div class="col-md-4 col-hiw col-hiw-bottom" id="a2">
<div class="hiw-content">
<div class="hiw-img"><img src=""></div>
<span class="hiw-title">Boost your sales</span>
<p class="hiw-content">Use Teesprings Boosted Network, Marketing Tools and Partnership Integrations </p>
</div>
</div>
</div>
It is easier to help you if you included more detailed code, the code above really doesn't help, to create a simple line you can do something like this (adjust margin and height/width appropriately) :
.underline {
width: 5rem;
height: 0.25rem;
background: #000;
}
<div class="underline"></div>

Why does my image hover move to the left?

I have an image with some overlay text. Whenever I hover my mouse over my image, the content displayed once hovered is moved to the left of the original image. The hovered content is shifted 69 pixels to the left. I want the hovered content to be directly hovered over the image. How can I fix this?
HTML
<div class="row">
<div class="container col-lg-3">
<img src="Images/Coding.jpg" alt="" class="image">
<div class="description">
<h6 class="titles">
Coding
</h6>
<br>
<i class="far fa-keyboard fa-2x"></i>
<br>
<br>
<p>
Projects | Learning | Design
</p>
</div>
<div class="overlay">
<div class="text">
<h5>
Take a peak at my offers, current projects, and qualifications
</h5>
<br>
<a class="btn btn-outline-light btn-sm" href="coder.html" role="button">
Explore more
</a>
</div>
</div>
</div>
</div>
CSS
.container {
position: relative;
width: 250px;
height: 250px;
}
.container:hover .overlay {
opacity: 1;
}
.image {
display: inline-block;
width: 250px;
height: 250px;
}
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 250px;
width: 250px;
opacity: 0;
transition: .5s ease;
background-color: #008CBA;
}
.text {
color: white;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
text-align: center;
}
Because container class tacking a padding so please add padding:0px;
.container {
position: relative;
width: 250px;
height: 250px;
padding:0px;
}

How do I make text wrap around jssor image slider?

I am using a jssor image slider on my home page. Next to it will be a paragraph of text. I cannot get the text to wrap around the jssor image slider. I have tried float and text-align and cannot get it to work. Does anyone have any ideas how I can get the text to wrap around the jssor image slider?
Code is as follows:
HTML:
<div class="content">
<!-- image slider -->
<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width:
800px; height: 355px; background: #c6eafb; overflow: hidden; margin-right: 2%; margin
bottom: 1.5%; z-index: -1;">
<!-- Loading Screen -->
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
background-color: #000000; top: 0px; left: 0px;width: 100%;height:100%;"></div>
<div style="position: absolute; display: block; background: url(../img/loading.gif) no
repeat center center; top: 0px; left: 0px;width: 100%;height:100%;"></div>
</div>
<!-- Slides Container -->
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width:
800px; height: 356px; overflow: hidden;">
<div>
<img u="image" src="images/mombaby.jpg" />
</div>
<div>
<img u="image" src="images/baby.jpg" />
</div>
<div>
<img u="image" src="images/family.jpg" />
</div>
<div>
<img u="image" src="images/finalization.jpg" />
</div>
<div>
<img u="image" src="images/baby2.jpg" />
</div>
</div>
<!-- Arrow Left -->
<span u="arrowleft" class="jssora05l" style="width: 40px; height: 40px; top: 158px;
left: 8px;"></span>
<!-- Arrow Right -->
<span u="arrowright" class="jssora05r" style="width: 40px; height: 40px; top: 158px;
right: 8px"></span>
<!-- Arrow Navigator Skin End -->
<a style="display: none" href="http://www.jssor.com">banner slider</a>
<!-- Trigger -->
<script>
jssor_slider1_starter('slider1_container');
</script>
</div>
<!-- Jssor Slider End -->
<p class="text">Welcome to Adoption Covenant
Making the decision to adopt a child can be difficult but the process involved with
adopting doesn’t have to be. Adoption Covenant is a licensed, full service adoption
agency for both domestic and international adoption. Our goal is to place children for
adoption with loving families while simplifying and reducing the expense and heartache
commonly involved with the process. Our unique adoption services are rooted in a deep
understanding of adoption laws and our commitment to improving the lives of parentless
children around the world.
"Unless someone like you cares a whole awful lot, nothing is going to get better. Its
not."
Dr. Seuss, The Lorax
</p>
</div>
CSS:
.content {
margin-right: 3%;
margin-left: 3%;
z-index: 100;
background-color: #FFFFFF;
opacity: .85;
border-radius: 30px;
height: 365px;
padding: 1%;
}
.text {
font-family: "Open Sans", sans-serif;
font-size: 1.3em;
font-weight: 400;
color: #000066;
}
/* image slider */
/* jssor slider arrow navigator skin 05 css */
/* .jssora05l (normal)
.jssora05r (normal)
.jssora05l:hover (normal mouseover)
.jssora05r:hover (normal mouseover)
.jssora05ldn (mousedown)
.jssora05rdn (mousedown) */
.jssora05l, .jssora05r, .jssora05ldn, .jssora05rdn {
position: absolute;
cursor: pointer;
display: block;
background: url(../img/a17.png) no-repeat;
overflow:hidden;
}
.jssora05l { background-position: -10px -40px; }
.jssora05r { background-position: -70px -40px; }
.jssora05l:hover { background-position: -130px -40px; }
.jssora05r:hover { background-position: -190px -40px; }
.jssora05ldn { background-position: -250px -40px; }
.jssora05rdn { background-position: -310px -40px; }
/* image slider */
Please specify 'float: left' for 'slider1_container'.
<div id="slider1_container" style="... float: left; ..." ...>
Reference 'Jssor.Slider.FullPack\demos-jquery\responsive-slider-float-text.source.html'

Relatively positioning images wrapped in anchor tags cause "ghost" links

I have a strange issue happening on a website I'm developing, when viewed in Firefox. I'm using relatively-positioned image links within an absolutely-positioned container.
The positioning and links work fine, but when I inspect in Firebug, I get these "ghost" links that appear in the locations where the images would have appeared had they not been re-positioned... if that makes any sense:
HTML:
<div id="container">
<div id="logo">
<img src="Button1.png" alt="Soundcloud" title="Soundcloud" class="button" id="soundcloud-button" />
<img src="Button1.png" alt="Videos" title="Videos" class="button" id="videos-button" />
</div> <!-- /logo -->
</div> <!-- /container -->
CSS:
#container {
position: absolute;
top: 50%;
margin-top: -85px;
left: 0;
width: 100%;
}
#logo {
background-image: url('logo1.png');
width: 393px;
height: 170px;
margin: 0 auto;
}
.button { width: 53px; height: 53px; position: relative; }
#soundcloud-button { top: 105px; left: 115px; }
#videos-button { top: 33px; left: 147px; }
Does anyone know what is causing this? Is it a problem with positioning, or whitespace, or something else?
You have the same in chrome.
To fix this apply your css to the <a> tag, not <img> inside <a>. Make 2 classes to adjust their position, .circle1 and .circle2, for example.
<div id="container">
<div id="logo">
<a href="https://soundcloud.com/haelu" class="circle1">
<img src="Button1.png" alt="Soundcloud" title="Soundcloud"/>
</a>
<a href="/videos.html" class="circle2">
<img src="Button1.png" alt="Videos" title="Videos" />
</a>
</div> <!-- /logo -->
</div> <!-- /container -->
#logo a {
position: relative;
display: inline-block;
width: 53px;
height: 53px;
}
#logo .circle1 {
top: 105px;
left: 115px;
}
#logo .circle2{
top: 33px;
left: 147px;
}
Look at the screenshot how it works:

CSS width not centering the image

I am using wordpress as my CMS, and have used a theme of my choice. The theme shows a slider (carousel) on the home page, but takes up too much space. I tried to edit the width and height to be 80%, but the UI gets screwed. The slider does not center, or the frame with the left right arrows come closer. The image gets smashed. I need to get the css right for this.
I tried the following
modified width and height to 80%
reduced the px values, messed it up further
Below I have relevant css and html portions of the code.
<div id="slides">
<div class="slides_container slide" style="overflow: hidden; position: relative; display: block;">
<div class="slides_control" style="position: relative; width: 2736px; height: 480px; left: -912px;"><div style="position: absolute; top: 0px; left: 912px; z-index: 5;">
<img src="http://localhost/taxeeta/wp-content/uploads/2013/01/116.png?1358343444279" alt="">
</div>
<div style="position: absolute; top: 0px; left: 912px; z-index: 0; display: none;">
<img src="http://localhost/taxeeta/wp-content/uploads/2013/01/215.png" alt="">
</div>
</div>
</div>
CSS:
#slides {
position: absolute;
top: 15px;
left: 0px;
z-index: 100;
width: 897px;
margin-left: 14px;
}
.slides_container {
width: 912px;
margin: 0;
padding: 0;
}
.slides_control {
position: absolute;
top: 15px;
left: 0px;
z-index: 100;
width: 897px;
margin-left: 14px;
}
Are you sure that there is jo javascript code modifying the element-css?
Did you changes the width of slides and slides_control as the same?
(sorry iam not able to write comments...)