twitter bootstrap background images for two sections - html

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);

Related

How can the picture be taken behind the ''top pick'' text?

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:

Images Not Stacking - HTML & CSS

I have an html page that contains "links" to many sections of the page. I'm using a single page layout where if a link is clicked, you are not actually taken to a new page. Instead you are taken to the section of the page that you clicked on in the nav bar. I have a section for 6 images, each with a caption. I need the images to be in 2 rows with 3 images per row without using a table.(each image with its caption underneath) But I also need them to be responsive, so if the size of the browser is minimized then the images stack up on each other (caption still there). I tried using padding and margins but I wasn't able to get it to work so I don't have any CSS to post but I do have my HTML code. Can someone please help me out? Here is my code:
<div class="allimagesgallery">
<a href="images/image1.jpg">
<img id="galleryimages" src="images/image1.jpg">
</a>
<div class="caption">CAPTION.</div>
<a href="images/image2.jpeg">
<img id="galleryimages" src="images/image2.jpeg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image3.jpg">
<img id="galleryimages" src="images/image3.jpg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image4.jpg">
<img id="galleryimages" src="images/image4.jpg">
</a>
<div class="caption">CAPTION</div>
<a href="images/image5.jpeg">
<img id="galleryimages" src="images/image5.jpeg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image6.jpeg">
<img id="galleryimages" src="images/image6.jpeg">
</a>
<div class="caption"> CAPTION </div>
</div>
</div>
it would help us if we knew what your css in "allimagesgallery" looked like.
A little reformatting like the code below might help:
/*-----css---------*/
.imagesgalleryrow img{
display: inline-block;
}
<!-- /// HTML \\\ -->
<div class="allimagesgallery">
<div class="imagesgalleryrow">
<a href="images/image1.jpg">
<img id="galleryimages" src="images/image1.jpg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image2.jpeg">
<img id="galleryimages" src="images/image2.jpeg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image3.jpg">
<img id="galleryimages" src="images/image3.jpg">
</a>
<div class="caption"> CAPTION </div>
</div>
<div class="imagesgalleryrow">
<a href="images/image1.jpg">
<img id="galleryimages" src="images/image1.jpg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image2.jpeg">
<img id="galleryimages" src="images/image2.jpeg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image3.jpg">
<img id="galleryimages" src="images/image3.jpg">
</a>
<div class="caption"> CAPTION </div>
</div>
<div class="imagesgalleryrow">
<a href="images/image1.jpg">
<img id="galleryimages" src="images/image1.jpg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image2.jpeg">
<img id="galleryimages" src="images/image2.jpeg">
</a>
<div class="caption"> CAPTION </div>
<a href="images/image3.jpg">
<img id="galleryimages" src="images/image3.jpg">
</a>
<div class="caption"> CAPTION </div>
</div>
</div>

How to get logo & Title on same line via bootstrap

I am using Bootstrap & want to get the logo on the left & title in the center. I have used the following code but not able to get the desired result.
Please Guide.
<div class="panel-heading"><a href="#">
<img src="Logo.png" width="10%" height="10%" alt="">
</a>
<h1 align="center">Title</h1></div>
<h1 class="text-center">
<a class="pull-left" href="#">
<img src="path/logo.png" width="10%" height="10%" alt="">
</a><span style="margin-left: -20%;">Title</span></h1>
try this code.. anything in heading tag would be in one line
Demo
Add container-fluid div along with pull-left for <a>
<div class="panel-heading">
<div class="container-fluid">
<a href="#" class="pull-left">
<img src="Logo.png" width="10%" height="10%" alt="">IMG
</a>
<h1 align="center">Title</h1></div>
</div>
<div class="panel-heading">
<div class="container-fluid">
<div class="pull-left" style="background-color:lavender;">
<img src="logo.png" width="50px" height="50px" alt="">
</div>
<h1 align="center">Title</h1></div>
</div>
Give pixel size according to your requirement of image.

ul li breaking when its upper li have long text

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.

Image links to Twitter profile

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>