This question already has answers here:
Can I have multiple background images using CSS?
(8 answers)
Closed 6 years ago.
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="">
<meta name="author" content="">
<title>Main Website</title>
<link href="css/main.css" rel="stylesheet">
</head>
<body>
<nav>
<div>
<div>
<ul>
<li><a class="active" href="index.html">Home</a></li>
<li>Mens Clothing</li>
<li>Womens Clothng</li>
<li>Boys Clothing</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div>
<div>
<div class="accordion">
<ul>
<li>
<div class="caption">Slide 1</div>
<a href="#">
<img src='Slider_Image1.jpg'/></a>
</li>
<li>
<div class="caption">Slide 2</div>
<a href="#">
<img src='Slider_Image2.jpg'/></a>
</li>
<li>
<div class="caption">Slide 3</div>
<a href="#">
<img src='Slider_Image3.jpg'/></a>
</li>
</ul>
</div>
</div>
<div>
<div class="centre , fade ,">
<div class="thumbnail">
<a href="Nike_Shoes1.html">
<img src="Image1.jpg" alt="">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="Nike_Trainers.html">
<img src="Image2.jpg" alt="">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<img src="Image3.jpg" alt="">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="new.html">
<img src="Mens_Clothing.jpg" alt="Mens Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="women_clothing.html">
<img src="Womens_Clothing.jpg" alt="Womens Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<a href="boys_clothing.html">
<img src="Boys_Clothing.jpg" alt="Boys Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<img src="Converse_clothing.jpg" alt="Converse Clothing">
</div>
</div>
<div class="centre , fade">
<div class="thumbnail">
<img src="Adidas_clothing.jpg" alt="Adidas Clothing">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!-- Footer -->
<footer>
</footer>
</div>
Here is the code for a website I am developing and I am trying to add images for the background. What I am looking to do is add 2 images on either side of the webpage, I am not sure on how to go about this also while trying to add an image as my background I see a white area the image is not set as the background, any help is appreciated.
Your best bet would be to merge the two images into one image using an image editor and then setting the merged image as your background.
Just open paint glue the 2 images together and use it as background.
Related
I’m working on a website for a photographer and I already created a grid gallery with one photo of each session, I wish that after clicking an image a popup gallery would show that would let you slide through other photos of the specific session (not other pictures displayed in the grid gallery) if that makes sense.
There's a part of the html code I used for my gallery.
<section class="portfolio-section">
<header>
<h1>Portfolio</h1>
</header>
<div id="anchor2" class="portfolio-selection">
<div id="container">
<ul class="categories">
<li>ślub</li>
<li>chrzest</li>
<li>świąteczne</li>
<li>plener</li>
<li class="portfolio-more">zobacz więcej</li>
</ul>
</div>
</div>
</section>
<section class="portfolio-gallery">
<div class="portfolio">
<div class="gallery-container">
<div class="gallery-item">
<div class="image">
<img src="https://source.unsplash.com/1600x900/?couple" alt="couple">
</div>
<div class="text">Piotrek i Paulina</div>
</div>
</div>
<div class="gallery-container w-2 h-2">
<div class="gallery-item">
<div class="image">
<img src="https://source.unsplash.com/1600x900/?people" alt="couple">
</div>
<div class="text">Gosia i Tomasz</div>
</div>
</div>
<div class="gallery-container w-3">
<div class="gallery-item">
<div class="image">
<img src="https://source.unsplash.com/1600x900/?kids" alt="couple">
</div>
<div class="text">Gosia i Tomasz</div>
</div>
</div>
<div class="gallery-container">
<div class="gallery-item">
<div class="image">
<img src="https://source.unsplash.com/1600x900/?baby" alt="couple">
</div>
<div class="text">Gosia i Tomasz</div>
</div>
</div>
create a DIV with a CSS class of menu
The .menu DIV should contain 4 DIV elements having a class of item
Each .item DIV should have an IMAGE displaying a placeholder from https://placeholder.com/ and a PARAGRAPH with class of mdc-typography--headline6
I've tried this code and I've commented out the placeholders as im not being allowed to post pictures. gonna be so grateful
<div class="item">
<!--<img src="https://via.placeholder.com/150" />-->
<p1 class="mdc-typograpy--headline6"></p1>
</div>
<div class="item">
<!-- <img src="http://via.placeholder.com/150"/> --->
<p1 class="mdc-typograpy--headline6"></p1>
</div>
<div class="item">
<!--<img src="http://via.placeholder.com/150"/>--->
<p1 class="mdc-typograpy--headline6"></p1>
</div>
<div class="item">
<!--<img src="http://via.placeholder.com/150"/>--->
<p1 class="mdc-typograpy--headline6"></p1>
</div>
</div>
Here you go. It's <p> not <p1>
<div class="menu">
<div class="item">
<img src="https://via.placeholder.com/150"/>
<p class="mdc-typograpy--headline6"></p>
</div>
<div class="item">
<img src="https://via.placeholder.com/150"/>
<p class="mdc-typograpy--headline6"></p>
</div>
<div class="item">
<img src="https://via.placeholder.com/150"/>
<p class="mdc-typograpy--headline6"></p>
</div>
<div class="item">
<img src="https://via.placeholder.com/150"/>
<p class="mdc-typograpy--headline6"></p>
</div>
</div>
i think you have problem in write paragraph. you must write paragraph like <p> and closed by </p>.When you write a header , you need write like that <h1> and close by </h1>.
<html>
<head>
</head>
<body>
<div class="item">
<img src="http://via.placeholder.com/150"/>
<p >mdc-typograpy--headline6</p>
</div>
<div class="item">
<img src="http://via.placeholder.com/150" >
<p>mdc-typograpy--headline6</p>
</div>
<div class="item">
<img src="http://via.placeholder.com/150"/>
<p >mdc-typograpy--headline6</p>
</div>
</body>
</html>
So im working on my portfolio for a class project and Im struggling with aligning my projects on a single row. Here is what I have / need help with....
<div class="container">
<div class="row">
<div class="col-md-4">
<a href="https://codepen.io/Designird/pen/JwLQoj" target="_blank" class="project project-title">
<img class="img-thumbnail" src="https://i.imgur.com/8TGwqfY.jpg" alt="project">
<div class="project-tile">Howard Stern Tribute Page</div>
</a>
</div>
</div>
<div class="col-md-4">
<a href="https://codepen.io/Designird/pen/Jwemdd" target="_blank" class="project project-title">
<img class="img-thumbnail" src="https://i.imgur.com/UtN8xFJ.jpg" alt="project">
<div class="project-tile">Product Landing Page</div>
</a>
</div>
</div>
<div class="col-md-4">
<a href="https://codepen.io/Designird/pen/xmoWLB" target="_blank" class="project project-title">
<img class="img-thumbnail" src="https://i.imgur.com/lY9IvVn.jpg" alt="project">
<div class="project-tile">UFO Sighting Survey</div>
</a>
</div>
</div>
</div>
</div>
First thing I noticed was that you have too many closing </div> tags. You should indent your code properly so it would be easy to notice that. I added img-fluid class to images so they are responsive and do not overflow the container.
Check out the snippet below in full screen.
I removed many elements and I left what was important to solve the problem. i hope it helps.
You should also check out Bootstrap documentation, you have everything there. LINK
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.css">
<div class="container">
<div class="row">
<div class="col-md-4">
<a href="#">
<img class="img-fluid" src="https://i.imgur.com/8TGwqfY.jpg" alt="">
<div>Howard Stern Tribute Page</div>
</a>
</div>
<div class="col-md-4">
<a href="#">
<img class="img-fluid" src="https://i.imgur.com/UtN8xFJ.jpg" alt="">
<div>Product Landing Page</div>
</a>
</div>
<div class="col-md-4">
<a href="#">
<img class="img-fluid" src="https://i.imgur.com/lY9IvVn.jpg" alt="">
<div>UFO Sighting Survey</div>
</a>
</div>
</div>
</div>
I'm using bootstrap cards to build this layout on desktop:
So far so good, at this width everything is ok as well:
But from this width to desktop width the container is not filled:
The HTML to build the card with the images is:
<div class="card h-60">
<div>
<div class="row box">
<div class="box-content formal">
<div class="col-md-12">
<img class="imageban" src="img/crm.png" />
<span><b>CRM</b></span>
</div>
</div>
<div class="box-right">
<a href="#">
<img class="img-responsive" src="img/img1.jpg"/>
</a>
</div>
</div>
</div>
<div>
<div class="row box">
<div class="box-content report">
<div class="col-md-12">
<img class="imageban" src="img/report.png" />
<span><b>Report</b></span>
</div>
</div>
<div class="box-right">
<a href="#">
<img class="imageban" src="img/img4.jpg"/>
</a>
</div>
</div>
</div>
<div>
<div class="row box">
<div class="box-content formal">
<div class="col-md-12">
<img class="img-responsive" src="img/formal_notices.png" />
<span><b>Formal Notices</b></span>
</div>
</div>
<div class="box-content text">
<a href="#">
Open the Formal <br>Notice Document <br>Library
</a>
</div>
</div>
</div>
</div>
And the CSS is only this line:
.row.box{
max-width: 345px;
}
I'm stuck in this, any help would be nice. Thanks.
You can remove the class .box and use the Bootstrap classes instead col-md-4 col-xs-12.
Maybe I'm over thinking this.. How can I have an odd number of thumbnails using Bootstrap's grid. I have 7 thumbnail images at the bottom. I'd like to space them out of course using the grid. Maybe this isn't possible and should just use regular CSS?
Here's what I tried:
<div class="row-fluid">
<div class="span12">
<ul class="thumbnails">
<li class="span1">
<div class="thumbnail">
<img src="img/diningroom/1.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/2.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/3.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/4.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/5.jpg" alt="">
</div>
</li>
<li class="span2">
<div class="thumbnail">
<img src="img/diningroom/6.jpg" alt="">
</div>
</li>
<li class="span1">
<div class="thumbnail">
<img src="img/diningroom/6.jpg" alt="">
</div>
</li>
</ul>
</div>
</div>
You can customize bootstrap columns here (see #gridColumns).