Tooltip arrow(explainer) seems on different places from align tooltip icon - css

I cant align tooltip with social icon.You can see on the link:
http://www.themeforest-deneme2.deniz-tasarim.site/2020/01/22/vffd/
(on left sidebar, bottom social icon which is facebook)
the related code:
<div class="col-sm-1 " >50%
<?php global $post; ?>
<style>
.logo-img2{
border: 1px solid #d0d0ff;padding:20px; margin-top: 0px; margin-bottom: 0px;
}
</style>
<style>
.col-sm-1 .sticky-top { top: 60px;}
</style>
<div class="sticky-top ">
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo get_permalink($post->ID);?>">
<div>
<img src="<?php echo get_template_directory_uri(); ?>/img/icons/facebook.png" alt="Logo" class="logo-img2"">
</div>
</a>
<a href="https://twitter.com/share?url=<?php echo get_permalink($post->ID);?>">
<div>
<img src="<?php echo get_template_directory_uri(); ?>/img/icons/twitter.png" alt="Logo" class="logo-img2"">
</div>
</a>
<?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>
<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title(); ?>">
<div>
<img src="<?php echo get_template_directory_uri(); ?>/img/icons/pinterest.png" alt="Logo" class="logo-img2" >
</div>
</a>
<style>
a.tooltips {
position: relative;
display: inline;
}
a.tooltips span {
position: absolute;
width:140px;
color: #FFFFFF;
background: #000000;
height: 30px;
line-height: 30px;
text-align: center;
visibility: hidden;
border-radius: 6px;
box-shadow: 0px 0px 10px #800000;
}
a.tooltips span:after {
content: '';
position: absolute;
top: 50%;
right: 100%;
margin-top: -8px;
width: 0; height: 0;
border-right: 8px solid #000000;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
a:hover.tooltips span {
visibility: visible;
opacity: 0.8;
left: 100%;
top: 50%;
margin-top: -15px;
margin-left: 15px;
z-index: 999;
}
</style>
<a class="tooltips" href="#">vdsf
<img src="<?php echo get_template_directory_uri(); ?>/img/icons/facebook.png" alt="Logo" class="logo-img2"">
<p>a</p>
<span>Tooltip</span></a>
</div>
</div>
you can delete unnecessary letter that nearly social icon because when i delete them, arrow seem on different place.

To fix this you can first remove that extra, unwanted text and <p> tag from around the facebook icon and then change this css declaration so the margin-top is -36px like this:
a:hover.tooltips span {
visibility: visible;
opacity: 0.8;
left: 100%;
top: 50%;
margin-top: -36px;
margin-left: 15px;
z-index: 999;
}
I tested it in the browser tools and it worked well. That's not to say that there are not better ways to do this, but this, in my opinion answers your question and gets you moving forward.

Related

How do i align 3 elements with bootstrap 4 according to my designs?

I apply the rules of bootstrap but my buttons seems to go out of its alignment. my "Buy Now" and "View More" buttons should be place at the right side of the each sections. But i can seems to make it with bootstrap. I do not want to use Css to align it because i wanted it to be responsive. Can anyone enlighten me to help me out with my issues?
below here are my codes
<div class="container">
<div class="row" id="myDIV">
<?php
$sql = "SELECT * FROM products";
$query = $conn->query($sql);
if (!mysqli_num_rows($query)) {
echo '
<div class="col-12">
<div class="badge badge-danger">No Products Found</div>
</div>
';
} else {
while ($row = $query->fetch_assoc()) {
?>
<section id="product-display" style="z-index: 1;background: linear-gradient(180deg, <?php echo $row['product_section_colour']; ?> 25.52%, rgba(42, 86, 147, 0) 100%);">
<div class="container-fluid">
<div class="row">
<div class="col-2" style="top:-15px; left:-20px;">
<img style="height: 160px;width: 105px;left: -2px;top: -15px;border-radius: 0px;" loading="lazy" loading="lazy" id="product_img" src="images/product-main/<?php echo $row['product_photo']; ?>" alt="">
</div>
<div class="col-6 text-justify" style="position: absolute;height: 68px;left: 22%;right: 27.05%;">
<p style="color:<?php echo $row['product_dec_colour']; ?>;font-size:20px; padding-bottom:2px;font-weight: 600;"><?php echo $row['product_title']; ?></p>
<ul>
<li style="color:<?php echo $row['product_dec_colour']; ?>;font-size:7px;position: absolute;height: 68px;top: 35px;line-height: 8px;font-weight: 400;"><?php echo $row['product_desc']; ?></li>
</ul>
</div>
<div class="col-4">
Buy Now
View More
</div>
</div>
</div>
</section>
<?php
}
}
?>
</div>
this are my css
.buynow {
min-height: 32px;
background: #ffffff;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.25);
border-radius: 5px;
font-family: Inter;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 15px;
text-align: center;
width: 90px;
position: absolute;
top: 17px;
}
.viewmore {
min-height: 32px;
background: #ffffff;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.25);
border-radius: 5px;
font-family: Inter;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 15px;
text-align: center;
width: 90px;
position: absolute;
top: 58px;
}
section {
height: 107px;
width: 100%;
left: 0px;
top: 0px;
border-radius: 0px;
display: inline-block;
}
* {
padding: 0px;
margin: 0px;
}
ul li {
list-style-position: outside;
margin-left: 1em;
}
Why did you made "col-6" class as position:absolute? it will work if you remove that. you have used col-2,col-6,col-4 this is enough no need of position: absolute
I cannot run your code, but you can try with flex. Here is an example
<div class="d-flex">
<div class="col-4 mf-auto">
Buy Now
View More
</div>
</div>
You need to add mf-auto to your css file too.
This will help to align your content to the right side
.mf-auto {
margin-left: auto;
}

How can I fix my slideshow, it keeps loading without displaying pictures on Android

This is the code:
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script><script language="javascript">'use strict';$(function() {var width = 720; var animationSpeed = 2500; var pause = 5000; var currentSlide = 1;var $sdr2337 = $('#sdr2337'); var $slideContainer = $('.sld', $sdr2337); var $sld = $('.slide', $sdr2337); var interval; function startsdr2337() { interval = setInterval(function() { $slideContainer.animate({'margin-left': '-='+width}, animationSpeed, function() {if (++currentSlide === $sld.length) {currentSlide = 1; $slideContainer.css('margin-left', 0); }});}, pause);} function pausesdr2337() {clearInterval(interval);}$slideContainer.on('mouseenter', pausesdr2337).on('mouseleave', startsdr2337);startsdr2337();});</script><div style="width: 720px; margin: 0 auto;"><div style="position: relative; width: 720px; "><style type="text/css">#gpoy {position: absolute; right:-168px; top:3px; padding: 8px 0px 3px; z-index:99; opacity: 0.9; transition: 1s; line-height: 12px;}.repper {width: 726px; margin: 0 auto; position: relative; overflow: hidden; border-radius: 20px; box-shadow: 7px 7px 9px #888888 ;}.repper:hover #gpoy {transition: 2s; right:23px; }</style><div class="repper"><div id="gpoy"><a style="font-weight: normal; text-shadow: 1px 1px #555555; color: #FFFFFF; text-decoration:none; font-size: 8pt; line-height:10px; font-family: arial;" href="http://www.123-slideshow.com" target="_blank">🍉 CSS3 Slider</a></div><style type="text/css">#sdr2337 {width: 720px; height: 400px; border: 3px solid #FFFFFF; border-radius: 20px; overflow: hidden; position: relative; cursor: pointer; }#sdr2337 .sld {width: 2880px; height: 400px; display: block; margin: 0; padding: 0;}#sdr2337 .slide {width: 720px; height: 400px; float: left; list-style-type: none;}.DOT180906 {position: absolute; max-width: 720px; margin: 0px;}.c128165 {position: absolute; bottom: 0px; width:100%; padding: 12px; background-color: rgba(0, 0, 0, 0.5); color: #FFFFFF; font-size:24pt; font-family:Tahoma; text-align:center; line-height:48px; z-index:33; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}</style>
<div id="sdr2337">
<ul class="sld">
<li class="slide slide1">
<figure class="DOT180906">
<img src="https://3.bp.blogspot.com/-Z5b_SCr5Nck/W44VsqizSHI/AAAAAAAACas/GC6fdSiHFbYprgCByBGqiFQjVaG15mEqQCLcBGAs/s1600/images%25286%2529.jpg" />
<figcaption class="c128165">
The attitude of Failure
</figcaption>
</figure>
</li>
<li class="slide slide2">
<figure class="DOT180906">
<a href="http://#" target="_blank"> <img src="123-slideshow/knowledge.png" />
<figcaption class="c128165">
Knowledge
</figcaption></a>
</figure>
</li>
<li class="slide slide3">
<figure class="DOT180906">
<a href="http://#" target="_blank"> <img src="123-slideshow/the-best-way-to-save.jpg" />
<figcaption class="c128165">
The best way to save
</figcaption></a>
</figure>
</li>
<li class="slide slide1">
<figure class="DOT180906">
<img src="123-slideshow/the-attitude-of-failure.jpg" />
<figcaption class="c128165">
The attitude of Failure
</figcaption>
</figure>
</li>
</ul></div></div></div>
</div>
I found the answer to my question and I'm willing to share in case someone else have this same question in the future.
Information I would have provided include:
Name of site- www.knowseeker.com
Platform- blogger
Template- custom
Now, the slider code above should work in any html widget. The real problem was were I inserted it. [Search for tutorials on how to code for slider with css and js if you are a novice on that topic.]
The slider widget for my template provided by sorella templates is already configured to display slides pointing to my posts depending on the label you provided.
The default field has some items as follows: 5/Fashion/slider which represents (number of post slides to display)/(labels of posts to display)/(slider, to evoke the script)
So you don't need to insert any code here. Simply revert to default code by typing the format I provided above you have already replaced the code. Use any label you desire and ensure that your desired posts also have that label.

Why is this CSS border not displayed?

I want to add a border to the footer.
Here are the css lines:
position: fixed;
bottom: 0;
right: 0;
left: 0;
clear: both;
line-height: 1.36em;
padding: 08px 0px 0px;
text-align: center;
margin: 0px auto;
background: #fff;
border-top: 5px solid #4cb6cb;
What have I set wrong ? Think sometimes block the border to show.
Here is the html:
<div id="page_footer">
<div id="bottom_nav">
<?php echo $LANG['footer-about']; ?>
<?php echo $LANG['footer-terms']; ?>
<?php echo $LANG['footer-support']; ?>
</div>
<div id="footer" class="clear">
<?php echo APP_TITLE; ?> © <?php echo APP_YEAR; ?>
<a class="lang_link" href="javascript:void(0)" onclick="App.getLanguageBox('<?php echo $LANG['page-language']; ?>'); return false;"><?php echo $LANG['lang-name']; ?></a>
</div>
You may be applying this in a wrong class or id. Your code is fine.
Try adding a rule for HEIGHT to the footer itself and checking the class name again.
#footer {
position: fixed;
bottom: 0;
right: 0;
left: 0;
clear: both;
line-height: 1.36em;
padding: 08px 0px 0px;
text-align: center;
margin: 0px auto;
background: #fff;
border-top: 5px solid #4cb6cb;
}
<div id="page_footer">
<div id="bottom_nav">
A link here>
A link here
A link here
</div>
<div id="footer" class="clear">
<?php echo APP_TITLE; ?> © <?php echo APP_YEAR; ?>
<a class="lang_link" href="javascript:void(0)" onclick="App.getLanguageBox('<?php echo $LANG['page-language']; ?>'); return false;"><?php echo $LANG['lang-name']; ?></a>
</div>
</div>

2 images or divs next to eachother

I'm busy with my first attempt to responsive webdesign and i'm trying to put 2 images next to eachother. When I view the website on a desktop computer the page layout is just fine. But when i'm viewing it on a mobile (or I resize the window) the 2 images at the bottom are not inline anymore and jump on top of eachother.
Any idea how to solve this?
The page is on this test host: www.igga.nl.
Here's my markup:
#media screen and (max-width: 568px) {
#footer {
position: fixed;
left:0px;
bottom:0px;
height: 110px;
border-top: 7px solid #fff;
background-image: url('../images/bg_footer.png');
background-repeat: repeat;
width: 100%;
}
#pos {
width: 100%; /* parent */
}
#footer-info {
width: 100%;
float: left;
}
#centerpos {
width: 94%;
margin: 0 auto;
}
.tree {
float: left;
margin: 10px 1.76056338028169% 0 0;
width: 6.69014084507042%; /* 427 / 960 */
}
.logo-cont {
border-bottom: 0;
}
.logo {
margin-top: 18px;
width: 91.54929577464789%;
border-bottom: 1px solid #000;
padding-bottom: 2px;
}
.info-cont {
clear: both;
width: 100%;
margin: 2px 0 0 8.45070422535211%;
}
.info {
margin: 3px 0 0 0;
letter-spacing: 1px;
text-transform: uppercase;
color: #fff;
font-size: 0.875em;
}
.info a {
display: inline;
text-transform: lowercase;
text-decoration: none;
color: #000;
}
.info-telnr {
margin: 3px 0 0 0;
letter-spacing: 1px;
text-transform: uppercase;
color: #fff;
font-size: 0.875em;
}
.info-telnr h5 {
display: inline;
text-transform: lowercase;
text-decoration: none;
letter-spacing: 1px;
color: #000;
font-size: 1em;
}
}
and this is my HTML:
<div id="footer">
<div id="pos">
<div id="footer-info">
<div id="centerpos">
<img class="tree" src="sites/all/themes/md/images/logo_tree.png">
<div class="logo-cont">
<?php if ($logo): ?>
<a href="<?php print $front_page; ?>" title="<?php print t('MD | Illustration & Design'); ?>" rel="home" id="home">
<img class="logo" src="<?php print $logo; ?>" alt="<?php print t('MD | Illustration & Design'); ?>" />
</a>
<?php endif; ?>
</div>
<div class="info-cont">
<div class="info">
mail info#example.nl
</div>
<div class="info-telnr">
phone <h5>+31600000000</h5>
</div>
<div class="info">
shop www.thepossiblemachine.nl</p>
</div>
</div>
</div>
</div>
</div>
Try to set float:left for both divs/images. It helps in many cases but I can't tell if it will be useful in your problem without the code. It should look something like:
<div id="image1" style="float:left">
<img src="images/yourimage1" alt=""/>
</div>
<div id="image2" style="float:left">
<img src="images/yourimage2" alt=""/>
</div>
I hope this helps.

CSS - 3columns page

I am trying to do 3 columns page and I have problem.
My html:
<?php
$this->headMeta()
->setIndent(8)
->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8')
->appendName('keywords', 'story')
;
$this->headTitle()
->setIndent(8)
->setSeparator(' - ')
->headTitle('Your Story')
;
echo $this->doctype();
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<base href="<?php echo $this->baseUrl(); ?>" />
<link rel="stylesheet" type="text/css"
href="<?php echo $this->baseUrl('/styles/site.css'); ?>" />
<?php
echo "{$this->headMeta()}
{$this->headTitle()}
{$this->headLink()}"
?>
</head>
<body>
<div id="BODY">
<div id="HEADER">
<div id="headerLogin">
<div id="logged-in-as">
<?php echo $this->loggedInAs(); ?>
</div>
</div>
<div id="IMAGE">
<img src="../images/write.png" alt="" height="20%" width="90%" />
</div>
<div id="LOGO">
<img src="../images/logo.png" alt="Your true Story..." height="30%" width="160%"/>
</div>
<div id="USER">
</div>
</div>
<div id="MENU">Menu:
<div id="MENU_IN">
<div id="LIST">
<ul>
<?php
echo $this->menuLinks();
?>
</ul>
</div>
</div>
</div>
<div id="CONTENT">
<img src="../images/ScG.png" alt="" height="10%"/>
<div id="CONTENT_IN">
<?php echo $this->layout()->content ?>
<img src="../images/ScD.png" alt="" height="10%" />
</div>
</div>
<div id="INFORMATIONS">
<?php
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
?>
Your profile:
<div id="INFORMATIONS_IN"
<div id="LIST">
<ul>
<?php
echo $this->usersProfilLinks();
?>
</ul>
</div>
</div>
<?php } ?>
</div>
<div id="FOOT">Iwona Jamroz</div>
</div>
</body>
My CSS:
body
{
background-image: url(../images/back.png);
background-repeat: repeat;
padding-top: 10px;
padding-left: 10px;
padding-right: 10px;
overflow: visible;
height: 100%;
}
#IMAGE {
margin-top: 15px;
margin-left: 8%;
float: left;
}
#LOGO{
margin-top: 5px;
margin-right: 25%;
float: right;
}
#HEADER{
margin-bottom: 15%;
}
#MENU {
width: 20%;
height: 10%;
background-image: url(../images/texMenuBack.png);
margin-right: 5px;
float: left;
}
#MENU_IN
{
margin-top:10%;
height: 10%;
margin-bottom: 5px;
margin-left: 5px;
margin-right: 5px;
background-image: url(../images/texMenuMid.png);
}
#CONTENT{
margin-left: 21%;
margin-right: 21%;
float: left;
}
#CONTENT_IN {
padding-left: 8px;
padding-right: 5px;
padding-top: 5px;
padding-bottom: 5px;
background-image: url(../images/texM.png);
background-repeat: repeat;
min-height: 150px;
}
#INFORMATIONS {
width: 18%;
background-image: url(../images/texMenuBack.png);
margin-left: 5px;
float: right;
}
#INFORMATIONS_IN{
margin-top: 14%;
margin-bottom: 4px;
margin-left: 3px;
margin-right: 3px;
background-image: url(../images/texMenuMid.png);
}
#FOOT {
clear: both;
vertical-align: middle;
}
#headerLogin a{ color: white;
text-align: left;
word-spacing: 3px;
font-family: fantasy;
font-size: 24px;
}
#headerLogin {
color: whitesmoke;
font-family: monospace;
font-size: 24px;
}
#LIST {
}
And I have 3 columns but one after another and I can not understand it as I have read that to do 3 columns layout is enought to write in CSS float: left, float: left, float: right but I all the time have one after another not in one row :/ Why?
It looks like this:
aaa
.......aaaaaa
...................aaa
Floats are tricky and you should try to test it with different browsers. However, I did notice this
#CONTENT{
margin-left: 21%;
margin-right: 21%;
float: left;
}
Try to remove the margin-left and margin-right, because it probably causes the effect you are describing.
Try this instead:
#CONTENT{
width: 20%;
float: left;
}
I would consider using a CSS Framework such as 960 or Blueprint CSS, it will make columned layouts incredibly easy and cross-browser compliant. With CSS frameworks there is no need to write layout CSS, eliminating a great deal of browser compatibility testing and it helps keep your presentational CSS clean and tidy.
Your html will end up looking something like this (example is in 960)
<div class="container_24">
<div class="grid_8"></div>
<div class="grid_8"></div>
<div class="grid_8"></div>
</div>
Explanation: A 24 column container, where each column is 8 columns wide, will result in a 3 column layout.

Resources