How to Create Movie Ticket using CSS


Posted on March 3, 2021, at 8:00 PM [IST], created by Admin, Website: codewithbishal.com



CSS Movie Ticket :

What is a movie ticket using CSS?

=> Our awesome, movie ticket using CSS gives visitors an attractive, responsive, and movie ticket using CSS. You can also add these to your website or to your portfolio and can create a great impression in front of your visitors.

How can I use this movie ticket using CSS?

=> You can easily copy the code or can download the code from our website and can simply paste it anywhere to get the movie ticket using CSS.

Do I need to know how to code?

=> No, you don't need to know how to code you can simply copy code from here and paste it wherever you want your movie ticket using CSS. Also, you can try it on our website using the "TRY IT NOW" option or can download the code using the "Download" button below.


Movie Card

Movie Ticket created using CSS


Is it safe to use the movie ticket using CSS in HTML?

=> Yes, it's completely safe to use the movie ticket using CSS.

What are the advantages of the movie ticket using CSS?

=> movie ticket using CSS is a very good way for selling movie tickets online.

How can I download the source code of the movie ticket using CSS?

=> Scroll the page to the bottom there you will find our download button to download the code.

Overview of the Blog :

=> In this blog, you can learn, how to make a movie ticket using CSS using HTML and CSS By Code With Bishal. Just Copy The Code From Here And Paste It Into Your Website or portfolio. To Preview scroll the page to the beginning. If you are having any problem viewing the code just refresh the page. The movie ticket using CSS is a lightweight and easy-to-use HTML and CSS code that creates a movie ticket using CSS for you.

In this blog, there are fifth sections on the webpage, in the first section, you can get a preview of the blog, in the second section there are few FAQs and an overview of the blog, in the third section there are few more coding blogs you might like, in the fourth section you can Try our movie ticket using CSS using the "TRY IT NOW" button, after that, you can copy the code and paste it [that's the fifth section] and from the last section You can download the source code.


Movie Card

Movie Ticket using CSS




Movie Card

Movie Ticket after hover over the thumbnail




Movie Card

Movie Ticket after hover over the Buttons


You might like this :

How to create animated navbar Random Password generator using JavaScript
How to create responsive Column cards Count down timer using JavaScript Pure HTML budget calculator





Step by step guide of creating a movie ticket using CSS:

So this time I have something interesting you can put this where your clients or visitors will land or landing page and They can buy movie tickets easily. The first step is to add the broiler plate of HTML, you can add this from below. (if you want to create social media buttons then click here.

Step 1

=> Add the Broiler plate of HTML
              
<!DOCTYPE html>
<html>
<head>
<title>movie ticket using CSS - Code With Bishal</title>
</head>
<!-- created by Code With Bishal - www.codewithbishal.com -->
<body>
</body>
</html>

After adding the broiler plate of HTML add the header text and movie information

<div class="wrapper">
<div class="movie_card">
<div class="left">
<div class="datails">
<h1>Mission: Impossible – Fallout</h1>
<div class="head">
<p class="rated">PG - 13</p>
<p class="year">2021</p>
<p class="genre">Action | Adventure </p>
<p class="time">2h 30m</p>
</div>
</div>
</div>
</div>
</div>

Then add the movie information

<p class="description">Lorem ipsum
   dolor sit amet consectetur
   adipisicing elit. Magni, hic.
 Lorem ipsum dolor, sit amet consectetur adipisicing
  elit. Minima, voluptatum!</p>
<a class="read_more"
 href="https://codewithbishal.com"
 target="_blank" title="Read More">Read More</a>

then add buttons to your movie card so that people can watch the trailer, download the trailer, to rate the movie, amd to bookmark it

<div class="buttons">
<button title="Click to view trailer">
<i class="fas fa-play"></i> SEE TRAILER
</button>
<button title="Download the trailer">
<i class="fas fa-download"></i> DOWNLOAD
</button>
<button title="Rating">
<i class="fas fa-thumbs-up"></i> 97%
</button>
<button title="Bookmark">
<i class="fas fa-star"></i>
</button>
</div>	

then add the movie thumbnail picture

<div class="c_right">
<div class="img_c">
<img src="https://upload.wikimedia.org/wikipedia/en/f/ff/MI_%E2%80%93_Fallout.jpg" alt="Movie IMG">
</div>
<div class="play_btn">
<a href="https://codewithbishal.com" target="_blank" title="Play Trailer">
<i class="fas fa-play-circle"></i>
</a>
</div>
</div>

Now, let's add the CSS or style to our HTML file and this will do the styling of our movie ticket. So our second step is to add the CSS file, you can copy the code from below

Step 2)

=> Add CSS (External or Internal)

If you are using External CSS then create a file

                
                    style.css
                

And add code :

                
<link rel="stylesheet" href="style.css">

If you want to use Internal CSS than add

                <style>   </style>

tag Between

                <head>   </head>
then add the CSS code between style tag or inside
style.css
to reset margin, padding and to set font-family.

body{
	margin: 0;
	padding: 0;
	font-family: 'Poppins', sans-serif;
}

Now, add style to the movie card

.movie_card {
color: #fff;
height: 390px;
margin: 50px auto;
display: flex;
max-width: 100%;
background: linear-gradient(#373B44, #4286f4);
box-shadow: 0 0 40px rgba(0,0,0,0.3);
}
                

The below code will add style to the movie ticket

.left {
	width: 80%;
}

.datails {
	width: 90%;
	padding: 30px;
	margin-top: -25px;
}
.c_right img {
	height: 390px;
  width:100%;
}
.head {
	width: 100%;
	display: flex;
	justify-content: space-between;
}

.rated, .year, .genre, .time {
	color: #fff;
	padding: 10px;
	font-weight: bold;
	border-radius: 15px;
}

.rated {
	box-shadow: 0 0 50px rgba(0, 0, 0, 0.568);
}
a {
	color: black;
	display: block;
	text-decoration: none;
	outline: none;
}
.buttons {
	margin-left: -10px;
}
button, .rated, .play_btn{
	background: linear-gradient(#b24591c9, #f15f7ac4);
}
button {
	color: #fff;
	border: none;
	padding: 20px;
	outline: none;
	font-size: 12px;
	margin-top: 30px;
	margin-left: 5px;
	border-radius: 12px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.616);
	cursor: pointer;
	transition: 200ms ease-in-out;
}

button:hover {
	transform: scale(1.1);
}
.play_btn {
	height: 100%;
	margin: -394px auto;
	position: relative;
	text-align: center;
	background: linear-gradient(#fc5c7c65, #6a82fb5b);
	box-shadow: 0 0 50px rgba(0,0,0,0.2);
}
.fa-play-circle {
	color: black;
	font-size: 160px;
	margin-top: 110px;
	animation: bounce 1s infinite;
}
.c_right:hover{
	cursor: pointer;
	transform: scale(1.1);
}
.credits{
  font-size: 20px;
}
@keyframes bounce {
	from{opacity: 1;}
	to{opacity: 0;}
}

Now, to make the ticket responsive add these code

@media (max-width: 700px){
  .movie_card{
    display: block;
  }
}
@media (max-width: 600px){
  button{
    display: none;
  }
}

We have successfully added style to our movie ticket.

OR copy the code from below


Step 1) Add your HTML Code -

HTML Code

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css"> <title>Movie Tickets - Code With Bishal</title>
</head>
<!-- created by Code With Bishal - www.codewithbishal.com -->
<body>
<div class="wrapper"> <div class="movie_card"> <div class="left"> <div class="datails"> <h1>Mission: Impossible – Fallout</h1> <div class="head"> <p class="rated">PG - 13</p> <p class="year">2021</p> <p class="genre">Action | Adventure </p> <p class="time">2h 30m</p> </div> <p class="description">Lorem ipsum dolor sit amet consectetur adipisicing elit. Magni, hic. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Minima, voluptatum!</p> <a class="read_more" href="https://codewithbishal.com" target="_blank" title="Read More">Read More</a> <div class="buttons"> <button title="Click to view trailer"> <i class="fas fa-play"></i> SEE TRAILER </button> <button title="Download the trailer"> <i class="fas fa-download"></i> DOWNLOAD </button> <button title="Rating"> <i class="fas fa-thumbs-up"></i> 97% </button> <button title="Bookmark"> <i class="fas fa-star"></i> </button> </div> </div> </div> <div class="c_right"> <div class="img_c"> <img src="https://upload.wikimedia.org/wikipedia/en/f/ff/MI_%E2%80%93_Fallout.jpg" alt="Movie IMG"> </div> <div class="play_btn"> <a href="https://codewithbishal.com" target="_blank" title="Play Trailer"> <i class="fas fa-play-circle"></i> </a> </div> </div> </div> </div> </body>
</html>

Step 2) Add your CSS Code -

CSS Code

<style>
body{
	margin: 0;
	padding: 0;
	font-family: 'Poppins', sans-serif;
}
.movie_card {
	color: #fff;
	height: 390px;
	margin: 50px auto;
	display: flex;
  max-width: 100%;
	background: linear-gradient(#373B44, #4286f4);
	box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

.left {
	width: 80%;
}

.datails {
	width: 90%;
	padding: 30px;
	margin-top: -25px;
}
.c_right img {
	height: 390px;
  width:100%;
}
.head {
	width: 100%;
	display: flex;
	justify-content: space-between;
}

.rated, .year, .genre, .time {
	color: #fff;
	padding: 10px;
	font-weight: bold;
	border-radius: 15px;
}

.rated {
	box-shadow: 0 0 50px rgba(0, 0, 0, 0.568);
}
a {
	color: black;
	display: block;
	text-decoration: none;
	outline: none;
}
.buttons {
	margin-left: -10px;
}
button, .rated, .play_btn{
	background: linear-gradient(#b24591c9, #f15f7ac4);
}
button {
	color: #fff;
	border: none;
	padding: 20px;
	outline: none;
	font-size: 12px;
	margin-top: 30px;
	margin-left: 5px;
	border-radius: 12px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.616);
	cursor: pointer;
	transition: 200ms ease-in-out;
}

button:hover {
	transform: scale(1.1);
}
.play_btn {
	height: 100%;
	margin: -394px auto;
	position: relative;
	text-align: center;
	background: linear-gradient(#fc5c7c65, #6a82fb5b);
	box-shadow: 0 0 50px rgba(0,0,0,0.2);
}
.fa-play-circle {
	color: black;
	font-size: 160px;
	margin-top: 110px;
	animation: bounce 1s infinite;
}
.c_right:hover{
	cursor: pointer;
	transform: scale(1.1);
}
.credits{
  font-size: 20px;
}
@keyframes bounce {
	from{opacity: 1;}
	to{opacity: 0;}
}
@media (max-width: 700px){
  .movie_card{
    display: block;
  }
}
@media (max-width: 600px){
  button{
    display: none;
  }
}
</style>




Leave a Comment:

Search