The typical code of wordpress gallery is <div withmanyclass><dl class><dt class><a href=""><img class>
(see below)
This is the original code wordpress uses:
<div id="gallery-2" class="gallery galleryid-16 gallery-columns-5 gallery-size-thumbnail"><dl class="gallery-item">
<dt class="gallery-icon landscape">
<img width="150" height="150" src="name1.jpg" class="attachment-thumbnail size-thumbnail" alt="">
</dt></dl><dl class="gallery-item">
<dt class="gallery-icon landscape">
<img width="150" height="150" src="name2.jpg" class="attachment-thumbnail size-thumbnail" alt="">
</dt></dl
<br style="clear: both">
</div>
How do I convert it into other simple code with custom classes? (via functions.php)
<div class="mini-gallery-wrapper">
<a data-lightbox="image-1" href="img/sample1.jpg" data-title="Przykład" class="mini-gallery-item">
<img src="img/sample1small.jpg" alt="">
</a>
<a data-lightbox="image-2" href="img/sample2.jpg" data-title="Przykład" class="mini-gallery-item">
<img src="img/sample2small.jpg" alt="">
</a>
</div>
Related
How can the picture be taken behind the ''top pick'' text?
The problem: https://iili.io/VQKa0F.jpg
Page which has the problem: https://awet123.blogspot.com/2022/04/testing-all-required-boxes-for-niche.html
Wrong place of .cg-our-top-pick. You should replace it to position after .cg-li-photo
Bad:
<div class="cg-layout-img">
<div class="cg-our-top-pick">TOP PICK</div>
<div class="cg-li-photo">
<a class="cg-aff-link" href="https://www.amazon.com/dp/B01M12RE4A?tag=kitlit-20&linkCode=ogi&th=1&psc=1" rel="nofollow noopener" target="_blank">
<img alt="Goxawee Cordless Drill Screwdriver" class="cg-img-1" src="https://m.media-amazon.com/images/I/413Spl-3a0L.jpg" loading="lazy" />
</a>
</div>
<div class="cg-li-ratebadge">
<div class="cg-rate"><span>9.4/10</span> <span>Our Score</span></div>
</div>
</div>
Good:
<div class="cg-layout-img">
<div class="cg-li-photo">
<a class="cg-aff-link" href="https://www.amazon.com/dp/B01M12RE4A?tag=kitlit-20&linkCode=ogi&th=1&psc=1" rel="nofollow noopener" target="_blank">
<img alt="Goxawee Cordless Drill Screwdriver" class="cg-img-1" src="https://m.media-amazon.com/images/I/413Spl-3a0L.jpg" loading="lazy" />
</a>
</div>
<div class="cg-our-top-pick">TOP PICK</div>
<div class="cg-li-ratebadge">
<div class="cg-rate"><span>9.4/10</span> <span>Our Score</span></div>
</div>
</div>
Result:
So I have created a white box around an image. But the problem is I cant click through the image to the page. I know the problem is that I didnt close the img tag, then open a second a tag inside it. But I cant figure out how to do it.
Here is my code
<a class="panel panel-negative-lg paddingAll-l" title="Partners" href="/en/customers/">
<img class="img-responsive" width="145" height="87" <a href="http://http://www.nacbhdd.org/" target="_blank"><img src="http://i65.tinypic.com/jtky2w.jpg" border="0" width="145px" height="87px" align="center" hspace="10px" alt="NACBHDD">
</a>
</div>
<div class="col-xs-2">
<a class="panel panel-negative-lg paddingAll-l" title="Partners" href="/en/customers/">
<img class="img-responsive" width="145" height="87" <a href="https://www.nasmhpd.org/" target="_blank"><img src="http://i64.tinypic.com/2mwf59g.jpg" border="0" width="145px" height="87px" align="center" alt="NASMHPD">
</a>
This is what I want my final product to look like
[IMG]http://i64.tinypic.com/i78yvs.jpg[/IMG]
Here you go, my friend:
<div>
<a class="panel panel-negative-lg paddingAll-l" title="Partners" href="/en/customers/">
<a href="http://http://www.nacbhdd.org/" target="_blank">
<img src="http://i65.tinypic.com/jtky2w.jpg" border="0" width="145px" height="87px" align="center" hspace="10px" alt="NACBHDD">
</a>
</a>
</div>
<div class="col-xs-2">
<a class="panel panel-negative-lg paddingAll-l" title="Partners" href="/en/customers/">
<a href="https://www.nasmhpd.org/" target="_blank">
<img src="http://i64.tinypic.com/2mwf59g.jpg" border="0" width="auto" height="87px" align="center" alt="NASMHPD">
</a>
</a>
</div>
when my li's height is increasing due to 2 line text of title, the li that should be dsiplayed right below of the list item is pushed to right, in my image there are 2 consecutive list items of 2 text, thats why my list item on next line is pushed right after 2 list items. the 6th image that have is pushed to right has class "tibox-6" other have class "tibox"
My CSS
.tibox{
float:left;
}
.tibox-6{
clear:left;
float:left;
}
My HTML
<ul class="movies">
<li class="tibox">
<a class="timovie_image" href="new-image-wrestling/"
title="Permalink to New Image wrestling">
<img width="166" height="250" src="15-166x250.jpg" class="attachment-166x250 wp-post-image" alt="1" />
</a>
<div class="timovie_desc">
<div><a class="timovie_link" href="new-image-wrestling/">New Image wrestling</a></div>
<div class="timovie_year">2014</div>
<div class="timovie_rating"><img src="image1.png" /> 6.4 - <img src="image2.png" /> 50%</div>
</div>
</li>
<li class="tibox">
<a class="timovie_image" href="new-image-pakistani/"
title="Permalink to New Image pakistani">
<img width="166" height="250" src="15-166x250.jpg" class="attachment-166x250 wp-post-image" alt="1" />
</a>
<div class="timovie_desc">
<div><a class="timovie_link" href="new-image-pakistani/">New Image pakistani</a></div>
<div class="timovie_year">2014</div>
<div class="timovie_rating"><img src="image1.png" /> 6.4 - <img src="image2.png" /> 50%</div>
</div>
</li>
<li class="tibox">
<a class="timovie_image" href="new-image-1-8/"
title="Permalink to New Image 1 sad sad asd as dsad">
<img width="166" height="250" src="15-166x250.jpg" class="attachment-166x250 wp-post-image" alt="1" />
</a>
<div class="timovie_desc">
<div><a class="timovie_link" href="new-image-1-8/">New Image 1 sad sad asd as dsad</a></div>
<div class="timovie_year">2014</div>
<div class="timovie_rating"><img src="image1.png" /> 6.4 - <img src="image2.png" /> 50%</div>
</div>
</li>
<li class="tibox">
<a class="timovie_image" href="new-image-1-9/"
title="Permalink to New Image 1">
<img width="166" height="250" src="15-166x250.jpg" class="attachment-166x250 wp-post-image" alt="1" />
</a>
<div class="timovie_desc">
<div><a class="timovie_link" href="new-image-1-9/">New Image 1</a></div>
<div class="timovie_year">2014</div>
<div class="timovie_rating"><img src="image1.png" /> 6.4 - <img src="image2.png" /> 50%</div>
</div>
</li>
<li class="tibox">
<a class="timovie_image" href="new-image-1-10/"
title="Permalink to New Image 1">
<img width="166" height="250" src="15-166x250.jpg" class="attachment-166x250 wp-post-image" alt="1" />
</a>
<div class="timovie_desc">
<div><a class="timovie_link" href="new-image-1-10/">New Image 1</a></div>
<div class="timovie_year">2014</div>
<div class="timovie_rating"><img src="image1.png" /> 6.4 - <img src="image2.png" /> 50%</div>
</div>
</li>
<li class="tibox">
<a class="timovie_image" href="new-image-1-11/"
title="Permalink to New Image 2">
<img width="166" height="250" src="15-166x250.jpg" class="attachment-166x250 wp-post-image" alt="1" />
</a>
<div class="timovie_desc">
<div><a class="timovie_link" href="new-image-1-11/">New Image 2</a></div>
<div class="timovie_year">2014</div>
<div class="timovie_rating"><img src="image1.png" /> 6.4 - <img src="image2.png" /> 50%</div>
</div>
</li>
<li class="tibox-6">
<a class="timovie_image" href="new-image-1-12/"
title="Permalink to New Image 1">
<img width="166" height="250" src="15-166x250.jpg" class="attachment-166x250 wp-post-image" alt="1" />
</a>
<div class="timovie_desc">
<div><a class="timovie_link" href="new-image-1-12/">New Image 1</a></div>
<div class="timovie_year">2014</div>
<div class="timovie_rating"><img src="image1.png" /> 6.4 - <img src="image2.png" /> 50%</div>
</div>
</li>
</ul>
Image Link Webpage http://i.stack.imgur.com/ctjq6.png
you could use display: inline-block instead of floats:
.tibox {
display: inline-block;
vertical-align: top;
}
I'm not sure how to move to the next row with every sixth element though. You could try replacing each tibox-6 with just tibox and setting width of parent ul element.
I am currently working on my website, but I have run into a problem. I have a Twitter button, that links to my Twitter profile, but when I make an image or a text on the website it becomes a link and if i click it, it goes to the Twitter profile. I cant seem to find the mistake.
Here is some of my code.
<!DOCTYPE html>
<title>Home</title>
<div class="PageLinkBar">
<ul class="ScrollPagelsidebar">
<li>Contact</li>
<li>Company</li>
<li>Games</li>
</ul>
</div>
<div class= "image2">
<a href="index.html"><img src="image2.png" alt="image2" title="image2" border="0" width= 150px; height= 100px; />
</div>
<div class="twitterbutton">
<a href="https://twitter.com/"><img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/>
</div>
<div class="image2">
<img src="image2.png" alt="image2" style="width:1050px;height:530px">
</div>
<div class="image">
<img src="image.png" alt="image" style="width:400px;height:40px">
</div>
<div class="TwitterbuttonNRGindex">
<a href="https://twitter.com/"><img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/>
</div>
The twitter button and twitterbuttonnrgindex are missing the </a> closing tags. This could couse everything to display as a link becouse the browser thinks everything is in the <a> tag.
You need to close your <a> tags, as so:
<!DOCTYPE html>
<title>Home</title>
<div class="PageLinkBar">
<ul class="ScrollPagelsidebar">
<li>Contact</li>
<li>Company</li>
<li>Games</li>
</ul>
</div>
<div class= "image2">
<img src="image2.png" alt="image2" title="image2" border="0" width= 150px; height= 100px; />
</div>
<div class="twitterbutton">
<img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/>
</div>
<div class="image2">
<img src="image2.png" alt="image2" style="width:1050px;height:530px">
</div>
<div class="image">
<img src="image.png" alt="image" style="width:400px;height:40px">
</div>
<div class="TwitterbuttonNRGindex">
<img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/>
</div>
I am using Twitter bootstrap and I have a one page website with a top section and a bottom section. I would like to place different background images in each section; however, I cannot seem to get it to work- are there any suggestions?
Here is my HTML:
<section class="container-fluid">
<div class="row-fluid">
<div class="span4 offset4">
<br />
<img src="images/logo.png" width="400" height="400" image alt="image" />
</div>
</div>
<div class="row12">
<h3><p class="text-center"></p></h3>
<h4><p class="text-center"></p></h4>
<h4><p class="text-center"></p></h4>
<br />
<br />
</div>
<div class="row-fluid">
<ul class="thumbnails">
<li class="span1 offset4">
<a href="#" class="thumbnail">
<img src="images/MAIL_icon.png" width="50" height="50" image alt="image" />
</a>
</li>
<li class="span1">
<a href="#" class="thumbnail">
<img src="images/DRIBBBLE_icon.png" width="50" height="50" image alt="image" />
</a>
</li>
<li class="span1">
<a href="#" class="thumbnail">
<img src="images/TWITTER_icon.png" width="50" height="50" image alt="image" />
</a>
</li>
<li class="span1">
<a href="#" class="thumbnail">
<img src="images/INSTAGRAM_icon.png" width="50" height="50" image alt="image" />
</a>
</li>
</ul>
</div>
</section>
and my CSS:
#top_section {background-image: url(images/urban_lights.png);
}
Assign different background to your different section.
#topSection {
background-image: url("url/to/image.jpg");
}
#bottomSection {
background-image: url("url/to/image.jpg");
}
If your CSS and images are in separate folders found in the root directory try:
#top_section {background-image: url(../images/urban_lights.png);