How to fix positioning horizontally? - html

I want to show a trailer and informational text next to it in my slick slider. However, they are positioned on top of each other whatever I try.
I have tried flexbox, and position them in rows. I also tried inline display, and float right and left for each div.
/* Styling the Trailer Slick Slider */
.single-item-rtl {
max-width: 1100px;
position: relative;
top: 0;
left: 0;
display: block;
margin-left: auto;
margin-right: auto;
float: left;
}
/* Styling the Trailer Content */
#captain-marvel,
#endgame {
display: inline-flex;
flex-direction: row;
max-width: 1000px;
}
<article id="secondThirdArticle">
<div class="middleh3">Trailers & New Releases</div>
</br>
<div class="inner-grid">
<div dir="rtl" class="single-item-rtl">
<div id="captain-marvel">
<div>
<h4> Captain Marvel </h4>
<p>The MCU’s most powerful hero is set to land on the big screen. Brie Larson stars as Carol Danvers, aka Captain Marvel, alongside Samuel L. Jackson as Nick Fury, and Jude Law as Walter Lawson. In the midst of an inter-galactic war that threatens
to destroy the Earth, Carol Danvers must rise to a seemingly impossible challenge. Following the post-credit teaser of Avengers: Infinity War Part One, Captain Marvel is one of the most eagerly anticipated films of the year.</p>
</div>
<div>
<iframe width="504" height="284" src="https://www.youtube.com/embed/Z1BCujX3pw8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</br>
</div>
<div id="endgame">
<div>
<h4> Avengers: Endgame </h4>
<p>The grave course of events set in motion by Thanos that wiped out half the universe and fractured the Avengers ranks compels the remaining Avengers to take one final stand in Marvel Studios' grand conclusion to twenty-two films, Avengers: Endgame.</p>
</div>
<div>
<iframe width="504" height="284" src="https://www.youtube.com/embed/TcMBFSGVi1c" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</br>
</div>
</div>
</div>
</br>
See All Trailers
</article>
`
I want some centred text with a header on the side of the trailer. They end up on top of each other. See website: http://www.student.city.ac.uk/~aczc972/

On the parent, use
display: flex;
align-items: center;
and it will line them up left-right. Just make sure the other components are direct children of the parent you put these styles on!

Use the grid exhibition layout. Basically you set a two columns: the text column and the trailer column and make sure that both occupy the role parent div. By doing so, you will properly separate both contents.
You may also search more properties of it such as spacing and better ways for organize your template. But basically, you could separate divs as follows:
html:
<div id="captain-marvel">
<div id="captain-marvel-title><h4> Captain Marvel </h4>
<p>The MCU’s most powerful hero is set to land on the big screen. Brie Larson stars as Carol Danvers, aka Captain Marvel, alongside Samuel L. Jackson as Nick Fury, and Jude Law as Walter Lawson. In the midst of an inter-galactic war that threatens to destroy the Earth, Carol Danvers must rise to a seemingly impossible challenge. Following the post-credit teaser of Avengers: Infinity War Part One, Captain Marvel is one of the most eagerly anticipated films of the year.</p>
</div>
<div id="captain-marvel-trailer">
<iframe width="504" height="284" src="https://www.youtube.com/embed/Z1BCujX3pw8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
css:
#captain-marvel{
display:grid;
grid-template-columns: 1fr 1fr;
}
#captain-marvel-title{
grid-column:1;
background: red;
}
#captain-marvel-trailer{
grid-column:2;
background: blue;
}
I colored the div so you can see the delimitation between both.
For more information, please check this link
Hope it helps!

/* Styling the Trailer Content */
#captain-marvel, #endgame {
display: inline-flex;
flex-direction: row;
max-width: 1000px;
width: 100%;
}
.left {
float: left;
width: 50%;
}
.right {
float: right;
width: 50%;
}

Related

How can I show Facebook link in a grid?

I need help with this <iframe>, I can't insert into the grid layout. I can insert the <iframe> to every part of the website except this grid layout.
Thank you for any help.
.lluncamp2 {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 30px;
}
.lluncamp2 img {
object-fit: cover;
width: 100%;
max-height: 200px;
}
<div class="lluncamp2">
<div>
<ul>Laundry room-
<li>Coin operated Washing machine</li>
<li>Tumble dryer</li>
<li>FREE Fridge/ Freezer</li>
<li>Shaving and electricity points</li>
</ul>
</div>
<div>
<iframe src="https://www.facebook.com/plugins/video.php?height=314&href=https%3A%2
F%2Fwww.facebook.com%2Fkosmic.suture%2Fvideos%2F1936825236449065%2F&show_text=false&width=560" max-width="560" max-height="314" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write;
encrypted-media; picture-in-picture; web-share" allowFullScreen="true"></iframe></div>
<div>Ample field space to enjoy and play</div>
<div>Chemical disposal point</div>
<div>FREE hot water in both the showers and dishwashing room</div>
<div>Coin operated launderette</div>
</div>
If that is your actual HTML, then the problem is the line break on your src attribute of the iframe tag. It runs fine for me if I change your iframe to:
.lluncamp2 {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 30px;
}
.lluncamp2 img {
object-fit: cover;
width: 100%;
max-height: 200px;
}
<div class="lluncamp2">
<div>
<ul>Laundry room-
<li>Coin operated Washing machine</li>
<li>Tumble dryer</li>
<li>FREE Fridge/ Freezer</li>
<li>Shaving and electricity points</li>
</ul>
</div>
<div>
<iframe src="https://www.facebook.com/plugins/video.php?height=314&href=https%3A%2F%2Fwww.facebook.com%2Fkosmic.suture%2Fvideos%2F1936825236449065%2F&show_text=false&width=560" max-width="560" max-height="314" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write;
encrypted-media; picture-in-picture; web-share" allowFullScreen="true"></iframe></div>
<div>Ample field space to enjoy and play</div>
<div>Chemical disposal point</div>
<div>FREE hot water in both the showers and dishwashing room</div>
<div>Coin operated launderette</div>
</div>

My web page is getting cut off and won't scroll on mobile devices

My web page won't scroll on mobile devices. It works if you resize the window on desktop, but if you view the page on an actual mobile device then there is no ability to scroll. This is causing only half of the page's content to be visible.
I've tried setting the body height to 100%.
* {margin: 0; padding: 0, box-sizing: border-box;}
.news-module {
width: 100%;
float: left;
height: auto;
}
.news-sub-module {
width: 70vw;
height: auto;
margin: 2vw 5vw 3vw 5vw;
padding: 4vw;
float: left;
color: black;
cursor: pointer;
}
.news-sub-module:nth-child(even) {
float: right;
}
.header-style-one {
width: 100%;
}
.news-more {
float: left;
margin: 1vw 0 0 0;
}
<div class="news-module">
<div class="news-sub-module">
<div class="news-date">
06.12.2019 </div>
<div class="header-style-one">
Meet Italy’s Most Passionate Tomato Farmer
</div>
<div class="news-description">
August in Italy: businesses are closed, cities have emptied out, towns are deserted—everyone is at the beach. Everyone, that is, except for tomato farmers in the Campania region, Italy’s tomato capital. Here, in late summer, trucks loaded with the vibrant, just-harvested fruits crowd tiny, one-lane streets...
</div>
<div class="news-more">
→ Read More
</div>
</div>
<div class="news-sub-module">
<div class="news-date">
06.11.2019</div>
<div class="header-style-one">
Q+A with Winemaker Steve Matthiasson
</div>
<div class="news-description">
Steve Matthiasson was perhaps the most in-demand viticulturist in Napa when he and his wife, Jill, decided to start their own wine label. We caught up with Steve in the middle of this year’s grape harvest to talk about one of his favorite subjects: gathering friends to eat, drink and be merry...
</div>
<div class="news-more">
→ Read More
</div>
</div>
<div class="news-sub-module">
<div class="news-date">
05.15.2019 </div>
<div class="header-style-one">
Spring’s Most Sensitive, and Bountiful, Vegetable
</div>
<div class="news-description">
“People say gambling came to New Jersey with the casinos,” laughs Tom Sheppard of Sheppard Farms in Cumberland County, New Jersey. “But gambling came with the first farmers. Out there in the field, mother nature can do all kinds of things to you.”...
</div>
<div class="news-more">
→ Read More
</div>
</div>
<div class="news-sub-module">
<div class="news-date">
05.10.2019 </div>
<div class="header-style-one">
Can an American Parmesan Dethrone the King of Cheeses?
</div>
<div class="news-description">
Parmesan cheese is at the heart of Italian cuisine, and the greatest of all of Parmesans is Parmigiano Reggiano. So when you’re looking for a cheese to grate over a saucy tangle of pasta, there is no substitute. The Schuman family believes they can change all that...
</div>
<div class="news-more">
→ Read More
</div>
</div>
</div>
I want the ability to scroll on mobile instead of having the content getting cut off.

HTML CSS Formatting

The bottom paragraph on this HTML page is not following the other <p> in this HTML site. It may be because I forgot to end something, but I don't know.
<!DOCTYPE html>
<html lang="en">
<body style=";">
<head>
<body background="https://images.rapgenius.com/92abc49a4468f440d86e3c66541f0a2b.1000x991x1.jpg">
<title>Video Editor As A Career</title>
<style>
header{
background-color: #c6c6c6;
padding: 30px;
text-align: center;
font-size: 35px;
color: black;
}
p {
color: red;
font-size: 20px;
font-family: Helvetica;
}
nav ul {
list-style-type: none;
padding: 10;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 25%;
background-color: #f1f1f1;
position: fixed;
height: 40%;
overflow: auto;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
text-decoration: none;
}
li a.active {
background-color: #4CAF50;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
section:after {
content: "";
display: table;
clear: both;
padding: 20;
}
#media (max-width: 600px) {
nav, article {
width: 100%;
height: auto;
}
}
</head>
</style>
<body>
<header style="font-family:comic sans ms;"><u><b>Video Editor As A Career</b></u></header>
<section>
<nav>
<ul>
<li>MyBlueprint </li>
<li>The Role of A Video Editor</li>
<li>Software</li>
<li>Requirements To Be A Video Editor</li>
<li>What Does A Video Editor Do</li>
<li>Colleges and Universities</li>
<li>Demand</li>
</ul>
</nav>
<div style="margin-left:25%;padding:1px 16px;height:1000px;">
<article>
<a name="targetname1"></a>
<h1 style="color:white;"> <center><b>The Role of A Video Editor</b></center></h1>
<p style="color:white;"> Have you ever seen any of those flashy commercials advertising a brand new product or a very high quality video on Youtube? Chances are is that the video was created by a video editor. Large companies like Microsoft or Cheerios have dedicateds video editors to make their new products look the best, sometimes even better! A video editor must attend either a University, College or Apprenticeship, which would have to be related to film. </p>
link text
<br>
<br>
<hr size=6 width=675 color="white">
<br>
<a name="targetname"></a>
<h1 style="color:white;"> <center><a style="color:white;" href="https://searchmicroservices.techtarget.com/definition/software"><b> Software</b></a></center></h1>
<p style="color:white;">Of course to edit videos you need some sort of software. Professionals use software such as Adobe Premiere or Vegas Pro 16 (older versions of these softwares are not to shabby). In theses softwares you are able to add keyframes, trim/cut the video and many other stylish features. Also a part of video editing is editing audio. For smaller companies you may be asked to not only to edit the video, but also edit the audio. This is no problem with Audacity which is free! </p>
<a href="https://www.audacityteam.org/">
<img src="https://www.audacityteam.org/wp-content/themes/wp_audacity/img/logo.png" width"150" height="150"></a>
<a href="https://www.vegascreativesoftware.com/ca/vegas-pro/">
<img align="right" src="https://vignette.wikia.nocookie.net/logopedia/images/0/0a/Sony_Vegas_Pro_14_icon.png/revision/latest?cb=20160925095337" width"150" height="150"></a>
<br>
<hr size=6 width=675 color="white">
<br>
<a name="targetname2"></a>
<table border="1" cellpadding="5" cellspacing="5">
<caption style="color:white;font-size:150%;" align="top"> <b>Requirements To Be A Video Editor</b></caption>
<tr><center>
<th bgcolor="#ffffcc"> A Masters Degree In Film Production</th>
<th bgcolor="#ffffcc"> Film Degree </th>
<th bgcolor="#ffffcc"> A Bachelor's Degree of Fine Arts</th></center>
<tr>
</table>
<br>
<p style="color:white;"> Video/film editing could be very profitable. The best of the best were able to make over $120,000! In Ontario the provincial average is $49,000, but with a high of $76,000. There is also other ways to make money such as websites like Youtube, Vimeo, Instagram and many other social platforms which would allow you to make money from ads on the website. Some have been able to make these video editing on these sites a full time job and have been very profitable!
<hr size=6 width=675 color="white">
<center>
<a name="targetname3"></a>
<h1 style="color:white;">What Does A Video Editor Do?<h1>
<iframe width="560" height="315" src="https://www.youtube.com/embed/lRgLUTXnZ6I" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center>
<hr size=6 width=675 color="white">
<center>
<a name="targetname6"></a>
<h1 style="color:white;"><b>Colleges and Universities With Editing/Film Courses</b><h1>
<br>
<a href="http://sites.utoronto.ca/ic/mediaproduction/index.html">
<img src="https://media.licdn.com/dms/image/C560BAQE2yEMrkNmDVw/company-logo_200_200/0?e=2159024400&v=beta&t=b_kXBEkvYUuMueM85D5Il458Ekzgy8OEj5SPITi6P8w"></a>
<a href="https://www.okanagan.bc.ca/home.html">
<img src="https://pbs.twimg.com/profile_images/322923752/OKCollegeCol_400x400.gif" height="200px" width="200px" ></a>
<a href="https://stanfordvideo.stanford.edu/editing/">
<img src="https://upload.wikimedia.org/wikipedia/en/thumb/b/b7/Stanford_University_seal_2003.svg/1200px-Stanford_University_seal_2003.svg.png" height="200px" width="200px"></center></a>
<br>
<hr size=6 width=675 color="white">
<br>
<center><h1 style="color:white;"><b>The Life Of A Film/Video Editor</b><h1>
<a name="targetname5"></a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/rB2_KSKVzko" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<hr size=6 width=675 color="white">
<center><h2 style="color:white;font-size:100%"><b>Companies Which Need Video/Editors</b><h2></center>
<a name="targetname6"></a>
**/Here is where the problem is, from here on down/**
<p1 style="color:white;font-size:50%"> Companies which currently require Video/Film editing services include, Universal needs a Graphic Designer and Animation Specialist. Also, Disney needs a Multiplatform Editor. So if you ever wanted to work in the movie business, maybe video editing is your way to go. A company more local, Pureblink requires an Editor/Motion Graphics Designer. There are many more opportunities for Video Editors everywhere!</p1>
<br>
<br>
<br>
Work Cited Page
</body>
</html>
Charis is right - the p1 tags at the bottom are the problem. Paragraph tags are marked with p - not p1, p2, p3, etc like headline tags i.e. h1, h2, h3, etc. This is what Charis was talking about.
As long as you replace the starting and closing p1 tags with p tags you'll be good to go.
<!DOCTYPE html>
<html lang="en">
<body style=";">
<head>
<body background="https://images.rapgenius.com/92abc49a4468f440d86e3c66541f0a2b.1000x991x1.jpg">
<title>Video Editor As A Career</title>
<style>
header{
background-color: #c6c6c6;
padding: 30px;
text-align: center;
font-size: 35px;
color: black;
}
p {
color: red;
font-size: 20px;
font-family: Helvetica;
}
nav ul {
list-style-type: none;
padding: 10;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 25%;
background-color: #f1f1f1;
position: fixed;
height: 40%;
overflow: auto;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
text-decoration: none;
}
li a.active {
background-color: #4CAF50;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
section:after {
content: "";
display: table;
clear: both;
padding: 20;
}
#media (max-width: 600px) {
nav, article {
width: 100%;
height: auto;
}
}
</head>
</style>
<body>
<header style="font-family:comic sans ms;"><u><b>Video Editor As A Career</b></u></header>
<section>
<nav>
<ul>
<li>MyBlueprint </li>
<li>The Role of A Video Editor</li>
<li>Software</li>
<li>Requirements To Be A Video Editor</li>
<li>What Does A Video Editor Do</li>
<li>Colleges and Universities</li>
<li>Demand</li>
</ul>
</nav>
<div style="margin-left:25%;padding:1px 16px;height:1000px;">
<article>
<a name="targetname1"></a>
<h1 style="color:white;"> <center><b>The Role of A Video Editor</b></center></h1>
<p style="color:white;"> Have you ever seen any of those flashy commercials advertising a brand new product or a very high quality video on Youtube? Chances are is that the video was created by a video editor. Large companies like Microsoft or Cheerios have dedicateds video editors to make their new products look the best, sometimes even better! A video editor must attend either a University, College or Apprenticeship, which would have to be related to film. </p>
link text
<br>
<br>
<hr size=6 width=675 color="white">
<br>
<a name="targetname"></a>
<h1 style="color:white;"> <center><a style="color:white;" href="https://searchmicroservices.techtarget.com/definition/software"><b> Software</b></a></center></h1>
<p style="color:white;">Of course to edit videos you need some sort of software. Professionals use software such as Adobe Premiere or Vegas Pro 16 (older versions of these softwares are not to shabby). In theses softwares you are able to add keyframes, trim/cut the video and many other stylish features. Also a part of video editing is editing audio. For smaller companies you may be asked to not only to edit the video, but also edit the audio. This is no problem with Audacity which is free! </p>
<a href="https://www.audacityteam.org/">
<img src="https://www.audacityteam.org/wp-content/themes/wp_audacity/img/logo.png" width"150" height="150"></a>
<a href="https://www.vegascreativesoftware.com/ca/vegas-pro/">
<img align="right" src="https://vignette.wikia.nocookie.net/logopedia/images/0/0a/Sony_Vegas_Pro_14_icon.png/revision/latest?cb=20160925095337" width"150" height="150"></a>
<br>
<hr size=6 width=675 color="white">
<br>
<a name="targetname2"></a>
<table border="1" cellpadding="5" cellspacing="5">
<caption style="color:white;font-size:150%;" align="top"> <b>Requirements To Be A Video Editor</b></caption>
<tr><center>
<th bgcolor="#ffffcc"> A Masters Degree In Film Production</th>
<th bgcolor="#ffffcc"> Film Degree </th>
<th bgcolor="#ffffcc"> A Bachelor's Degree of Fine Arts</th></center>
<tr>
</table>
<br>
<p style="color:white;"> Video/film editing could be very profitable. The best of the best were able to make over $120,000! In Ontario the provincial average is $49,000, but with a high of $76,000. There is also other ways to make money such as websites like Youtube, Vimeo, Instagram and many other social platforms which would allow you to make money from ads on the website. Some have been able to make these video editing on these sites a full time job and have been very profitable!
<hr size=6 width=675 color="white">
<center>
<a name="targetname3"></a>
<h1 style="color:white;">What Does A Video Editor Do?<h1>
<iframe width="560" height="315" src="https://www.youtube.com/embed/lRgLUTXnZ6I" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center>
<hr size=6 width=675 color="white">
<center>
<a name="targetname6"></a>
<h1 style="color:white;"><b>Colleges and Universities With Editing/Film Courses</b><h1>
<br>
<a href="http://sites.utoronto.ca/ic/mediaproduction/index.html">
<img src="https://media.licdn.com/dms/image/C560BAQE2yEMrkNmDVw/company-logo_200_200/0?e=2159024400&v=beta&t=b_kXBEkvYUuMueM85D5Il458Ekzgy8OEj5SPITi6P8w"></a>
<a href="https://www.okanagan.bc.ca/home.html">
<img src="https://pbs.twimg.com/profile_images/322923752/OKCollegeCol_400x400.gif" height="200px" width="200px" ></a>
<a href="https://stanfordvideo.stanford.edu/editing/">
<img src="https://upload.wikimedia.org/wikipedia/en/thumb/b/b7/Stanford_University_seal_2003.svg/1200px-Stanford_University_seal_2003.svg.png" height="200px" width="200px"></center></a>
<br>
<hr size=6 width=675 color="white">
<br>
<center><h1 style="color:white;"><b>The Life Of A Film/Video Editor</b><h1>
<a name="targetname5"></a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/rB2_KSKVzko" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<hr size=6 width=675 color="white">
<center><h2 style="color:white;font-size:100%"><b>Companies Which Need Video/Editors</b><h2></center>
<a name="targetname6"></a>
**/Here is where the problem is, from here on down/**
<p style="color:white;font-size:50%"> Companies which currently require Video/Film editing services include, Universal needs a Graphic Designer and Animation Specialist. Also, Disney needs a Multiplatform Editor. So if you ever wanted to work in the movie business, maybe video editing is your way to go. A company more local, Pureblink requires an Editor/Motion Graphics Designer. There are many more opportunities for Video Editors everywhere!</p>
<br>
<br>
<br>
Work Cited Page
</body>
</html>
p1 tag that you use seems wrong.p element is not used as h element to have different "deegrees" based on the size you want to create.

Centering 2 elements adjacent to each other in CSS/HTML

I have two elements (map + description inside a box). When on a large screen, both elements appear on the same line, which is good. However, they stay on the left of the page and I would like them to sit in the middle.
Here is a fiddle of the below:
.map {
float: left padding: 10px;
width: 410px;
border: 1px solid black;
display: inline-block;
}
.map1 {
float: right padding: 10px;
width: 410px;
border: 1px solid black;
display: inline-block;
}
p {
float: left;
width: 100%;
}
<div class="map">
<iframe src="https://ctrc00.carto.com/builder/e2f49f3c-b793-11e6-9ceb-0ef24382571b/embed" width="100%" height="540" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<p><i>
<u>Map 1: <strong>12,083 listings</strong> (Sept.2016)</i>
</u>
<h4><span style="color: #FFA500;"><strong>Activity:</strong></span></h4>
<br>
<strong>183</strong> estimated nights/year
<br>
<strong>$127</strong> price/night
<br>
<strong>50.2%</strong> estimated occupancy
<br>
<strong>$1920</strong> estimated income/month
<br>
<h4><span style="color: #FFA500;"><strong>Listing per Host:</strong></span></h4>
<br>
<strong>38.2%</strong> multi-listings
<br>
<strong>62.0%</strong> single listings
<br>
<br>
<h4><span style="color: #FFA500;"><strong>Room Type:</strong></span></h4>
<br>
<strong>55.3%</strong> entire homes/apartment
<br>
<strong>42.6%</strong> private rooms
<br>
<strong>2.1%</strong> shared rooms
<br>
</p>
</div>
<p>
<div class="map1">
<iframe src="https://ctrc00.carto.com/builder/221c9570-b794-11e6-ad89-0e8c56e2ffdb/embed" width="100%" height="540" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<p><i><u>Map 2: <strong>15,640 listings</strong> (Sept.2016)</p></i>
</u>
<h4><span style="color: #FFA500;"><span style="color: #FFA500;"><strong>Activity:</strong></span></h4>
<br>
<strong>60</strong> estimated nights/year
<br>
<strong>$196</strong> price/night
<br>
<strong>16.3%</strong> estimated occupancy
<br>
<strong>$759</strong> estimated income/month
<br>
<br>
<h4><span style="color: #FFA500;"><strong>Listing per Host:</strong></span></h4>
<br>
<strong>28.5%</strong> multi-listings
<br>
<strong>71.5%</strong> single listings
<br>
<br>
<h4><span style="color: #FFA500;"><strong>Room Type:</strong></span></h4>
<br>
<strong>60.3%</strong> entire homes/apartment
<br>
<strong>37.9%</strong> private rooms
<br>
<strong>1.8%</strong> shared rooms
<br>
</p>
</div>
Above and under, I have some simple text/paragraph that are in the middle.
Just place your whole html code inside this
<div class="container"> </div>
and add one class only
.container{
display: flex;justify-content: center;width:100%;
}
.container {
justify-content: center;
display: flex;
}
<div class="container">
<p class="map_airbnb"><iframe src="https://prox.carto.com/builder/4dedf917-eb0c-4121-8c6d-f4ab2a6b75d3/embed" width="100%" height="540" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<strong>Activity:</strong><br><br>
183 estimated nights/year<br>
$127 price/night<br>
50.2% estimated occupancy<br>
$1920 estimated income/month<br><br>
<strong>Listing per Host:</strong><br>
38.2% multi-listings<br>
62.0% single listings <br><br>
<strong>Room Type:</strong><br>
55.3% entire homes/apartment<br>
42.6% private rooms <br>
2.1% shared rooms <br>
</p>
<p class="map_airbnb1"><iframe src="https://prox.carto.com/builder/4dedf917-eb0c-4121-8c6d-f4ab2a6b75d3/embed" width="100%" height="540" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<strong>Activity:</strong><br><br>
60 estimated nights/year<br>
$196 price/night<br>
16.3% estimated occupancy<br>
$759 estimated income/month<br><br>
<strong>Listing per Host:</strong><br>
28.5% multi-listings<br>
71.5% single listings <br><br>
<strong>Room Type:</strong><br>
60.3% entire homes/apartment<br>
37.9% private rooms <br>
1.8% shared rooms <br>
</p>
</div>
Put an external div or container to your maps and use justify-content:center
Use CSS Flexbox. Wrap these maps inside a container (in my case map_holder).
Have a look at the snippet below (Use full screen):
.map_holder {
display: flex;
justify-content: center;
}
body {
margin: 0;
}
<div class="map_holder">
<p class="map_airbnb"><iframe src="https://prox.carto.com/builder/4dedf917-eb0c-4121-8c6d-f4ab2a6b75d3/embed" width="100%" height="540" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<strong>Activity:</strong><br><br>
183 estimated nights/year<br>
$127 price/night<br>
50.2% estimated occupancy<br>
$1920 estimated income/month<br><br>
<strong>Listing per Host:</strong><br>
38.2% multi-listings<br>
62.0% single listings <br><br>
<strong>Room Type:</strong><br>
55.3% entire homes/apartment<br>
42.6% private rooms <br>
2.1% shared rooms <br>
</p>
<p class="map_airbnb1"><iframe src="https://prox.carto.com/builder/4dedf917-eb0c-4121-8c6d-f4ab2a6b75d3/embed" width="100%" height="540" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<strong>Activity:</strong><br><br>
60 estimated nights/year<br>
$196 price/night<br>
16.3% estimated occupancy<br>
$759 estimated income/month<br><br>
<strong>Listing per Host:</strong><br>
28.5% multi-listings<br>
71.5% single listings <br><br>
<strong>Room Type:</strong><br>
60.3% entire homes/apartment<br>
37.9% private rooms <br>
1.8% shared rooms <br>
</p>
</div>
Hope this helps!
You can use media queries for that, so just update your css like this:
.map_airbnb {
float:left;
width: 50%;
}
.map_airbnb1 {
float:right;
width: 50%;
}
#media screen and (max-width: 480px) {
.map_airbnb,
.map_airbnb1 {
width: 100%;
}
}
Here your original with this update https://jsfiddle.net/9ssukjg4/
Wrap both blocks in a div and use css3 flexbox. Fiddle. – Muhammad Usman 3 mins ago

How can I align a group text with seperate Widgets

I want the text labeled
"I want this text aligned with the bottom widget
" to be aligned with bottom widget.
How do I achieve this? HTML ->
<div class="albums">
<iframe class="albumWidget" src="https://widgets.itunes.apple.com/widget.html?c=no&brc=FFFFFF&blc=FFFFFF&trc=FFFFFF&tlc=FFFFFF&d=&t=&m=music&e=album&w=325&h=370&ids=258634938&wt=discovery&partnerId=&affiliate_id=&at=10lumY&ct=" frameborder=0 style="overflow-x:hidden;overflow-y:hidden;width:325px;height: 370px;border:0px; display=inline;"></iframe>
<h3>Only Built 4 Cuban Linx (1995)</h3>
<p>
" Most cd's I buy, I get sick of in a few weeks or even days. However, this album is so perfectly balanced and groundbreaking that I get chills everytime I listen to it. When I listen to it, it just boggles my mind. " -- A customer
</p>
<p>
“ Beats by RZA are sharp like a razor. ” -- A. Sidletsky
</p>
</div>
<div class="albums">
<iframe class="albumWidget" src="https://widgets.itunes.apple.com/widget.html?c=no&brc=FFFFFF&blc=FFFFFF&trc=FFFFFF&tlc=FFFFFF&d=&t=&m=music&e=album&w=325&h=370&ids=328405814&wt=discovery&partnerId=&affiliate_id=&at=10lumY&ct=" frameborder=0 style="overflow-x:hidden;overflow-y:hidden;width:325px;height: 370px;border:0px;"></iframe>
<p>I want this text aligned with the bottom widget</p>
</div>
CSS ->
.albums {
}
iframe.albumWidget {
float:right;
clear: right;
margin-bottom: 20px;
}
Here's a link to website so you can have look http://raekwon.gteaay.com/discs-baby
Here's a link to a screenshot that shows the website the way I need it to be http://raekwon.gteaay.com
i do not know if this can help.. do check my fiddle
http://jsfiddle.net/ayiem999/HFs2k/
.albums {
}
iframe.albumWidget {
float:right;
clear: right;
margin-bottom: 20px;
}
p{
float:right;
clear: right;
margin-bottom: 20px;
}
<div class="albums">
<iframe class="albumWidget" src="https://widgets.itunes.apple.com/widget.html?c=no&brc=FFFFFF&blc=FFFFFF&trc=FFFFFF&tlc=FFFFFF&d=&t=&m=music&e=album&w=325&h=370&ids=258634938&wt=discovery&partnerId=&affiliate_id=&at=10lumY&ct=" frameborder=0 style="overflow-x:hidden;overflow-y:hidden;width:325px;height: 370px;border:0px; display=inline;"></iframe>
<h3>Only Built 4 Cuban Linx (1995)</h3>
<div>
" Most cd's I buy, I get sick of in a few weeks or even days. However, this album is so perfectly balanced and groundbreaking that I get chills everytime I listen to it. When I listen to it, it just boggles my mind. " -- A customer
</div>
<div>
“ Beats by RZA are sharp like a razor. ” -- A. Sidletsky
</div>
</div>
<div class="albums">
<iframe class="albumWidget" src="https://widgets.itunes.apple.com/widget.html?c=no&brc=FFFFFF&blc=FFFFFF&trc=FFFFFF&tlc=FFFFFF&d=&t=&m=music&e=album&w=325&h=370&ids=328405814&wt=discovery&partnerId=&affiliate_id=&at=10lumY&ct=" frameborder=0 style="overflow-x:hidden;overflow-y:hidden;width:325px;height: 370px;border:0px;"></iframe>
<p class="hi">I want this text aligned with the bottom widget</p>
</div>
This works! And it uses class (reusable, write once and apply class where needed), which the correct way to do it.
.albums {
position: absolute;
}
.reviews {
float: left;
height: 50%;
width: 50%;
}
.albumWidget {
height: 50%;
width: 50%;
float: left;
}
<section class="albums">
<section class="reviews">
<h3>Only Built 4 Cuban Linx (1995)</h3>
<p>
" Most cd's I buy, I get sick of in a few weeks or even days. However, this album is so perfectly balanced and groundbreaking that I get chills everytime I listen to it. When I listen to it, it just boggles my mind. " -- A customer
</p>
<p>
“ Beats by RZA are sharp like a razor. ” -- A. Sidletsky
</p>
</section>
<iframe class="albumWidget" src="https://widgets.itunes.apple.com/widget.html?c=no&brc=FFFFFF&blc=FFFFFF&trc=FFFFFF&tlc=FFFFFF&d=&t=&m=music&e=album&w=325&h=370&ids=258634938&wt=discovery&partnerId=&affiliate_id=&at=10lumY&ct=" frameborder=0 style="overflow-x:hidden;overflow-y:hidden;width:325px;height: 370px;border:0px;"></iframe>
<section class="reviews">
<h3>Only Built 4 Cuban Linx II (2009)</h3>
<p>" Raekwon's sound takes listeners back to gritty Shaolin of the 1990s; however, the production does not sound like leftover beats from that era. Instead, it is a fresh, new take on NYC street life and drama. " -- Intellectualista </p>
</section>
<iframe class="albumWidget" src="https://widgets.itunes.apple.com/widget.html?c=no&brc=FFFFFF&blc=FFFFFF&trc=FFFFFF&tlc=FFFFFF&d=&t=&m=music&e=album&w=325&h=370&ids=328405814&wt=discovery&partnerId=&affiliate_id=&at=10lumY&ct=" frameborder=0 style="overflow-x:hidden;overflow-y:hidden;width:325px;height: 370px;border:0px;"></iframe>
</section>