1
I have the following problem: I opened a topic yesterday regarding some positions that were getting wrong, and that I was able to solve. However, another problem appeared which consists of the following: In this image is the effect that I seek:
And here’s the effect I got with my code:
Until then everything right, however, see what happens when I resize the screen of the site :
Note that on the screen of this site <section>
are one at the bottom of the other, with a thin edge separating the two, and the side edges have no, being exactly zeroed.
Now this is my resized screen:
Understand that my <section>
who comes after the <header>
already takes a distance that could not, besides presenting a border on the left and being half crooked. Well, follow my code for better understanding:
#sessao-1 {
margin-top: 210px;
}
#img-info {
margin: 0;
padding: 0;
}
#img-info li {
width: 33.333%;
display: inline-block;
float: left;
}
.img-1 {
background-image: url(http://www.kkuodesign.com/wordpress/wp-content/uploads/2009/11/assassins-creed-game-widescreen-wallpaper.png);
background-size: cover;
background-repeat: no-repeat;
padding-top: 59.42%;
border-right: 7px solid #000;
}
.img-2 {
background-image: url(http://www.1stwallpaper.com/wp-content/uploads/2015/05/the_last_of_us_video_games_hd_wallpapers-500x300.jpg);
background-size: cover;
background-repeat: no-repeat;
padding-top: 59.42%;
}
.img-3 {
background-image: url(http://www.1stwallpaper.com/wp-content/uploads/2015/06/Images-bakground-gaming-wallpaper-mortal-kombat-high-quality-hd-wallpapers-500x300.jpg);
background-size: cover;
background-repeat: no-repeat;
padding-top: 59.42%;
border-left: 7px solid #000;
}
.text {
background-color: #fff;
width: 100%;
height: 300px;
}
.text h1 {
font-family: 'Trade Winds', cursive;
font-size: 2em;
text-align: center;
padding: 15px;
}
.text p {
width: 350px;
max-width: 95%;
padding: 15px 40px;
font-family: 'Roboto', sans-serif;
font-size: .9em;
font-style: italic;
line-height: 20px;
}
@media(max-width: 800px) {
#img-info li {
display: block;
float: none;
width: 100%;
border: none;
}
.text p {
text-align: center;
margin: 0 auto;
}
}
<section id="sessao-1">
<ul id="img-info">
<li>
<div class="img-1">
<div class="text">
<h1>Lorem Ipsum Dolor</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</div>
</div>
</li>
<li>
<div class="img-2">
<div class="text">
<h1>Lorem Ipsum Dolor</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</div>
</div>
</li>
<li>
<div class="img-3">
<div class="text">
<h1>Lorem Ipsum Dolor</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</div>
</div>
</li>
</ul>
</section>
Obs: as I decrease the screen my lyrics start to be superimposed by my background-color. I’m pretty sure the way I did mine section
is wrong.
You are wearing bootstrap?
– Ivan Ferrer