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.
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:
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>
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 have tried margin: 0 auto and text-align targeting all sorts of elements, but can't get the gallery of images to center... what combination of CSS should I use and what div, ul, or li must I target?
Here is the HTML:
<ul class="loop">
<ul id="portfolio-filter"><li>All</li><li>design</li><li>mobile</li><li>web</li></ul> <ul id="portfolio-list">
<li class="fourcol rad_big mobile" style="">
<div class="item_full item_height1">
<div class="imgwrap">
<span class="cats"><h3>Another mobile project</h3>
<p>history app</p>
</span>
<a href="http://zappend.com/myportfolio/another-mobile-project/">
<img width="300" height="199" src="http://zappend.com/wp-content/uploads/2013/11/bg-300x199.jpg" class="attachment-folio wp-post-image" alt="bg" title="" style="opacity: 1;">
</a>
</div>
<div style="clear:both"></div>
<a class="hoverstuff-zoom" rel="prettyPhoto[gallery]" href="http://zappend.com/wp-content/uploads/2013/11/bg.jpg" style="opacity: 0;"><i class="icon-fullscreen"></i></a>
<a class="hoverstuff-link" href="http://zappend.com/myportfolio/another-mobile-project/" style="opacity: 0;"><i class="icon-signout"></i></a>
</div> </li>
<li class="fourcol rad_big design" style="">
<div class="item_full item_height1">
<div class="imgwrap">
<span class="cats"><h3>Design Project 1</h3>
<p>city of birmingham HDR</p>
</span>
<a href="http://zappend.com/myportfolio/design-project-1/">
<img width="300" height="199" src="http://zappend.com/wp-content/uploads/2013/11/city-300x199.jpg" class="attachment-folio wp-post-image" alt="city" title="" style="opacity: 1;">
</a>
</div>
<div style="clear:both"></div>
<a class="hoverstuff-zoom" rel="prettyPhoto[gallery]" href="http://zappend.com/wp-content/uploads/2013/11/city.jpg" style="opacity: 0;"><i class="icon-fullscreen"></i></a>
<a class="hoverstuff-link" href="http://zappend.com/myportfolio/design-project-1/" style="opacity: 0;"><i class="icon-signout"></i></a>
</div> </li>
<li class="fourcol rad_big web" style="">
<div class="item_full item_height1">
<div class="imgwrap">
<span class="cats"><h3>Website Project</h3>
<p>zappend website</p>
</span>
<a href="http://zappend.com/myportfolio/website-project/">
<img width="300" height="199" src="http://zappend.com/wp-content/uploads/2013/11/main-slider-300x199.jpg" class="attachment-folio wp-post-image" alt="main-slider" title="" style="opacity: 1;">
</a>
</div>
<div style="clear:both"></div>
<a class="hoverstuff-zoom" rel="prettyPhoto[gallery]" href="http://zappend.com/wp-content/uploads/2013/11/main-slider.jpg" style="opacity: 0;"><i class="icon-fullscreen"></i></a>
<a class="hoverstuff-link" href="http://zappend.com/myportfolio/website-project/" style="opacity: 0;"><i class="icon-signout"></i></a>
</div> </li>
<li class="fourcol rad_big mobile" style="">
<div class="item_full item_height1">
<div class="imgwrap">
<span class="cats"><h3>Mobile App</h3>
<p>Zappend App</p>
</span>
<a href="http://zappend.com/myportfolio/mobile-app/">
<img width="300" height="199" src="http://zappend.com/wp-content/uploads/2013/11/mobile-app-slider-300x199.png" class="attachment-folio wp-post-image" alt="mobile-app-slider" title="" style="opacity: 1;">
</a>
</div>
<div style="clear:both"></div>
<a class="hoverstuff-zoom" rel="prettyPhoto[gallery]" href="http://zappend.com/wp-content/uploads/2013/11/mobile-app-slider.png" style="opacity: 0;"><i class="icon-fullscreen"></i></a>
<a class="hoverstuff-link" href="http://zappend.com/myportfolio/mobile-app/" style="opacity: 0;"><i class="icon-signout"></i></a>
</div> </li>
</ul>
</ul>
Lol you know how you can still center tables?
Well i had this problem yesterday and i just put my stuff in a table and centered it (but that is only short term and looks crap on mobile browsers. aha but yeah you can do this with some css set your margin 0 auto css to important.. Sometimes other css will be rendered over css that is in the html file. that is why it is better to have it stored elsewhere and it looks nicer.. Anyways to check if it is this load your site in a nice browser like chrome and right click and choose inspect elements and click on the affected image and see what css is running and what isnt..
Check this out on centrering stuff its actually really good aha
Code Pen
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);