HOW can I make this TIMELINE ONLY using HTML and CSS? - html

How can I make the timeline from this website https://www.dealema.pt/biografia/ ONLY using HTML and CSS (NO librarys)? And NO javascript or anything, just pure HTML and CSS.
I did the first image + text responsive, but I'm having hard time adding the rest... The "timeline-02" invades "timeline-01".
I want to make this as simple as possible and still look as identical as the timeline from the website. Doens't need to be perfect, just good enough.
My HTML code:
.timeline {
width: 100%;
margin-left: 115px;
margin-bottom: 115px;
}
.timeline:before {
content: ' ';
width: 1px;
height: 100%;
background: #181818;
position: absolute;
left: 50%;
}
.timeline-01 img {
float: left;
position: relative;
margin-left: 15%;
}
.timeline-01-text {
float: right;
margin-right: 5%;
font-family: Helvetica, Arial, sans-serif;
}
.timeline-01-text p {
color: #7e7e7e;
font-size: 15px;
line-height: 1.5;
}
.timeline-01 span {
position: absolute;
left: 50%;
width: 60px;
height: 60px;
line-height: 60px;
margin-left: -28px;
text-align: center;
font-size: 15px;
font-weight: 600;
color: #FFF;
background-color: #181818;
border-radius: 60px;
}
#media only screen and (max-width: 750px) {
.timeline:before {
left: 10%;
}
.timeline-01 span {
left: 10%;
}
.timeline-01 img {
display: none;
}
}
#media only screen and (min-width: 750px) {
.timeline-01-text {
float: right;
margin-left: 50%;
margin-right: 115px;
position: absolute;
font-family: Helvetica, Arial, sans-serif;
}
}
<section class="timeline">
<div class="timeline-01">
<img src="img/album-01.png" style="width: 170px; height: auto;">
<span class="timeline-01-year">2006</span>
<div class="timeline-01-text">
<h2>EXPRESSO DO SUBMUNDO</h2>
<br>
<p>Entre rimas e batidas, nasce o primeiro trabalho dos Dealema, o mítico “Expresso do Submundo”. Uma obra de coleccionador que faz parte da história do hip-hop em Portugal e que foi recentemente reeditado em formato K7, uma prenda aos fãs que nunca
tiveram acesso comercial a este disco.</p>
</div>
</div>
<div class="timeline-02">
<img src="img/album-01.png" style="width: 170px; height: auto;">
<span>2016</span>
<div class="timeline-02-text">
<h2>EXPRESSO DO SUBMUNDO</h2>
<br>
<p>Entre rimas e batidas, nasce o primeiro trabalho dos Dealema, o mítico “Expresso do Submundo”. Uma obra de coleccionador que faz parte da história do hip-hop em Portugal e que foi recentemente reeditado em formato K7, uma prenda aos fãs que nunca
tiveram acesso comercial a este disco.</p>
</div>
</div>
</section>

Related

Create a <div> on top of another <div>

I'm trying to create a div (text) on top of another div (rotated white plane). When I create a new div the text is being placed behind and on a lower layer as the previous plane. This is the current website (I'm trying to get text under the bottle image):
Click here
My code (CSS & HTML):
/* Navigation Bar */
.topnav a {
float: left;
color: lightgray;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
vertical-align: center;
}
.topnav a.logo {
float: left;
text-align: center;
padding: 0px 0px;
text-decoration: none;
font-size: 17px;
}
.topnav a.index:hover {
background-color: #ddd;
color: black;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #FC8E11;
font-weight: bold;
color: white;
}
.topnav {
background-color: #333;
overflow: hidden;
font-family: arial;
}
/* Body settings */
body {
margin: 0px;
padding: 0px;
background-color: #FFFF;
height: 2000px;
overflow-x: hidden;
}
.content {
position: relative;
}
.plane {
background-color: white;
width: 120%;
-ms-transform: rotate(5deg);
transform: rotate(5deg);
height: 370px;
position: absolute;
bottom: -140px;
left: -10%;
}
.plane2 {
background-color: #FC8E11;
position: absolute;
width: 100%;
height: 870px;
left: 0;
top: 0px;
z-index: -5;
}
.titletext {
text-align: middle;
}
.product_image {
margin-left: auto;
margin-right: auto;
width: 800px;
padding-top: 40px;
}
.container {
margin: 0;
padding: 0;
width: 50%;
margin-left: auto;
margin-right: auto;
padding-top: 220px;
}
.tekst {
width: 100%;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 16px;
}
<!--Navigation Bar-->
<div class="topnav">
<a class="logo" href="index.html"><img src="/images/logo_groot.png" alt="logo" width="48" height="48" align="left"></a>
<a class="index active" href="index.html">Over ons</a>
<a class="index" href="verkooplocaties.html">Verkooplocaties</a>
<a class="index" href="contact.html">Contact</a>
</div>
<div class="content">
<!--Illustration-->
<div class="product_image">
<img src="/images/illustration.png" width="800px" height="800px">
</div>
<!--Planes-->
<div class="plane2"></div>
<div class="plane"></div>
</div>
<div class="container">
<!--Text-->
<div class="tekst">
<p> Heb je tijdens het sporten sleutels of pin- & sportpassen bij je? Hinderen deze spullen je soms bij het sporten? BottleBuidel is een houder voor je drinkfles waar je deze spullen in kan bewaren tijdens het sporten. Door de flexibele stof past de BottleBuidel
om iedere sportfles en kun je daardoor altijd je spullen bij je houden zonder dat je deze hoeft te bewaren in je broekzakken of op de grond. De BottleBuidel is gemaakt van geupcyclede (gewassen!) sportbroeken waardoor het bijdraagt aan een duurzamere
wereld! Meer informatie over het product, verkooplocaties en de prijs is te vinden op de product pagina.</p>
</div>
</div>
you can try giving z-index to the div maybe z-index is the order of something in the z dimension lets say if you want the second div to be in front you can give it the z-index of one
the code looks like this:
z-index:1;

Can the scroll go down every time i reload the page?

Hello guys im implementing a chat, the issue is that every time that i reload the page the scroll is always on the top of the chat and i want on the bottom, i tried with jquery but doesnt work.
This is my html:
<body>
<div class="chatbox">
<div class="chatlogs">
<div class="chat friend">
<div class="user-photo"></div>
<p class="chat-message">What's up, Brother ..!!</p>
</div>
<div class="chat friend">
<div class="user-photo"></div>
<p class="chat-message">What's up, Brother ..!!</p>
</div>
<div class="chat self">
<div class="user-photo"></div>
<p class="chat-message">What's up ..!!</p>
</div>
<div class="chat self">
<div class="user-photo"></div>
<p class="chat-message">A única área que eu acho, que vai exigir muita atenção nossa, e aí eu já aventei a hipótese de até criar um ministério. É na área de... Na área... Eu diria assim, como uma espécie de analogia com o que acontece na área agrícola.</p>
</div>
<div class="chat friend">
<div class="user-photo"></div>
<p class="chat-message">No meu xinélo da humildade eu gostaria muito de ver o Neymar e o Ganso. Por que eu acho que.... 11 entre 10 brasileiros gostariam. Você veja, eu já vi, parei de ver. Voltei a ver, e acho que o Neymar e o Ganso têm essa capacidade de fazer a gente olhar.
Todos as descrições das pessoas são sobre a humanidade do atendimento, a pessoa pega no pulso, examina, olha com carinho. Então eu acho que vai ter outra coisa, que os médicos cubanos trouxeram pro brasil, um alto grau de humanidade.
</p>
</div>
</div>
<div class="chat-form">
<textarea></textarea>
<button>Send</button>
</div>
</div>
And this is my css:
* {
margin: 0;
padding: 0;
font-family: tahoma, sans-serif;
box-sizing: border-box;
}
body {
background: #1ddced;
}
.chatbox {
width: 500px;
min-width: 390px;
height: 600px;
background: #fff;
padding: 25px;
margin: 20px auto;
box-shadow: 0 3px #ccc;
}
.chatlogs {
padding: 10px;
width: 100%;
height: 450px;
overflow-x: hidden;
overflow-y: scroll;
}
.chatlogs::-webkit-scrollbar {
width: 10px;
}
.chatlogs::-webkit-scrollbar-thumb {
border-radius: 5px;
background: rgba(0,0,0,.1);
}
.chat {
display: flex;
flex-flow: row wrap;
align-items: flex-start;
margin-bottom: 10px;
}
.chat .user-photo {
width: 60px;
height: 60px;
background: #ccc;
border-radius: 50%;
}
.chat .chat-message {
width: 80%;
padding: 15px;
margin: 5px 10px 0;
border-radius: 10px;
color: #fff;
font-size: 20px;
}
.friend .chat-message {
background: #1adda4;
}
.self .chat-message {
background: #1ddced;
order: -1;
}
.chat-form {
margin-top: 20px;
display: flex;
align-items: flex-start;
}
.chat-form textarea {
background: #fbfbfb;
width: 75%;
height: 50px;
border: 2px solid #eee;
border-radius: 3px;
resize: none;
padding: 10px;
font-size: 18px;
color: #333;
}
.chat-form textarea:focus {
background: #fff;
}
.chat-form button {
background: #1ddced;
padding: 5px 15px;
font-size: 30px;
color: #fff;
border: none;
margin: 0 10px;
border-radius: 3px;
box-shadow: 0 3px 0 #0eb2c1;
cursor: pointer;
-webkit-transaction: background .2s ease;
-moz-transaction: backgroud .2s ease;
-o-transaction: backgroud .2s ease;
}
.chat-form button:hover {
background: #13c8d9;
}
One more question, can i block horizontal scroll not only hide.
I hope you guys can help, thanks.
You're primarily looking for the javascript native scrollIntoView function. Though in lieu of anything else you'll still need jQuery for finding your element to scroll to.
$(document).ready(function () {
$('.chat.friend').last()[0].scrollIntoView();
})
Cool options such as smooth scrolling and compatibility at https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
As for blocking horizontal slide, I'm not quite sure what you mean. You've already got it wrapping words appropriately. If you're looking to prevent very long words or URLs from going off the edge, then look into https://www.w3schools.com/cssref/css3_pr_word-break.asp, e.g.,
word-break: break-all;
If you're meaning images, then you'll need to see the max-width property for images
img {
max-width: 100%;
}
Try putting MaintainScrollPositionOnPostback="true" in your page declaration. Setting this to true will keep the user at the same place on the screen after a postback occurs.
You can read more about it here.

trying to make my background image transparent

here is part of the CSS code, i cant seem to figure it out.
#About{
height:500px;
background: url("murano.jpg") no-repeat center;
}
I want to decrease the opacity of the imported background image
Add Opacity with your css
#About{
opacity :0.4;
height:500px;
background: url("murano.jpg") no-repeat center;
}
the best solution would be to create another div inside your #about div and position that div absolute while position your #about div to relative and give the background of this newly added div as rgba(0,0,0,0.5) where 0.5 represents the opacity
there is no css rule to provide opacity to background images.
when you put the opacity of #about div to 0.4 of course its child will inherit this property and any text inside about div will get the opacity of 0.4
<div id="about">
<div class="absolute">
</div>
</div>
#about{
position:relative;
background:url(..);
}
.absolute{
position:absolute;
background:rgba(0,0,0,0.5);
}
Use background-color: rgba(255, 255, 0, 0.3);
The 0.3 being the the alpha(opacity channel).
OR
Add an extra div to hold the background, and change the opacity there.
opacity: 0.4; filter:alpha(opacity=40);
Example :
#background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('http://i40.tinypic.com/3531bba.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100%;
opacity: 0.4;
filter: alpha(opacity=40);
}
.head {
width: 150px;
height: 160px;
}
body {
font-family: tahoma, helvetica, arial, sans-serif;
font-size: 12px;
text-align: center;
background: #000;
color: #ddd4d4;
padding-top: 12px;
line-height: 2;
}
td,
th {
font-size: 12px;
text-align: left;
line-height: 2;
}
#wrapper {
margin: auto;
text-align: left;
width: 832px;
position: relative;
padding-top: 27px;
}
#body {
background: url(images/body_bg_1.gif) repeat-y;
width: 832px;
}
#bodyi {
background: url(images/body_top_1.gif) no-repeat;
width: 832px;
}
#bodyj {
background: url(images/body_bot_1.gif) bottom no-repeat;
padding: 1px 0;
}
#body2 {
background: url(images/body_bg_2.gif) repeat-y;
width: 832px;
}
#bodyi2 {
background: url(images/body_top_2.gif) no-repeat;
width: 832px;
}
#bodyj2 {
background: url(images/body_bot_2.gif) bottom no-repeat;
padding: 1px 0;
}
h1,
h2,
h3,
#nav,
#nav li {
margin: 0;
padding: 0;
}
#nav {
font-size: 10px;
position: absolute;
right: 0;
top: 12px;
line-height: 1.2;
padding-left: 120px;
}
#nav li {
float: left;
width: 108px;
list-style: none;
margin-left: 2px;
border-bottom: 1px solid black;
}
#nav a {
background: #738d09;
color: #2e3901;
font-weight: bold;
text-decoration: none;
display: block;
text-align: center;
padding: 1px 0;
}
#sidebar {
float: left;
width: 250px;
padding-left: 4px;
}
#sidebar .content {
padding-left: 24px;
}
#sidebar .content img {
float: left;
clear: left;
margin: 5px 5px 5px 0;
}
#sidebar .divider {
background: url(images/left_splitter.gif) center no-repeat;
height: 5px;
width: 169px;
}
#content {
float: right;
width: 462px;
}
#content1 {
float: left;
width: 800px;
}
#content1 .content {
margin: 7px 35px 7px 20px;
padding-left: 20px;
}
#content .content {
margin: 7px 55px 7px 17px;
}
#content .content table {
width: 310px;
margin-right: 0px;
}
#content .content table td,
#content .content table th {
padding-right: 10px;
}
#content .content table td.download {
text-align: right;
padding-right: 0px;
}
#content .divider {
background: url(images/right_splitter.gif) repeat-x;
height: 5px;
}
h1 {
position: absolute;
left: 0;
top: 0;
}
h2 {
font-size: 10px;
color: #cf9118;
margin: 1em 0;
}
h3 {
font-size: 10px;
margin: 1em 0;
}
h5 {
font-size: 20px;
color: #cf9118;
margin: 1em 0;
text-align: center;
}
h6 {
font-size: 18px;
margin: 1em 0;
}
p {
margin: 1em 0;
}
img {
border: 0;
}
img.left {
float: left;
margin-right: 14px;
}
img.right {
float: right;
margin-left: 14px;
}
.readmore {
text-align: right;
}
.hidden {
visibility: hidden;
}
.clear {
clear: both;
}
a {
color: #f0b33c;
font-weight: bold;
text-decoration: none;
}
a:visited {
color: #cf9118;
}
a:hover {
text-decoration: underline;
}
table a {
text-decoration: underline;
font-weight: normal;
color: #7f7c79;
}
#power {
color: #fff;
text-align: center;
}
#power a {
color: #fff;
}
<div id="background"></div>
<div class="head">
</div>
<div id="wrapper">
<ul id="nav">
<li>Inicio
</li>
<li>Sobre a banda
</li>
<li>Membros
</li>
<li>Bilhetes
</li>
<li>Galeria
</li>
<li>Área Pessoal
</li>
</ul>
<h1></h1>
<div id="body">
<div id="bodyi">
<div id="bodyj">
<div id="sidebar">
<div class="content">
<h2>Galeria de imagens</h2>
<p>Aqui poderá encontrar uma galeria de imagens da banda, com fotos de concertos, entre outras imagens.</p>
<p class="readmore">Ver
</p>
</div>
<div class="content">
<h2>Noticias</h2>
<h3>18 de Abril, 2011</h3>
<h4>"So Far Away" vai ter videoclip</h4>
<p>Muitos se questionavam se o mais recente single dos Avenged Sevenfold, "So Far Away", ia ter direito a um videoclip. Eis que surge a boa notícia para os fãs dos A7X: So Far Away vai ter videoclip. Já foram divulgadas algumas fotos do set de
filmagens.</p>
<h3>10 de Março, 2011</h3>
<h4>A7X nomeados para a Metal Hammer Golden Gods Awards 2011</h4>
<p>Os Avenged Sevenfold foram nomeados para a Metal Hammer Golden Gods Awards 2011 em duas categorias. As categorias onde os A7X estão a participar são as seguintes:
<p>
- Best International Band (Melhor Banda Internacional)
<p>
- Best Shredder (com o Synyster Gates) (Melhor Shredder)</p>
</div>
</div>
<div id="content">
<center>
<img src="images/avengeds.jpg" width="346" height="234" alt="four men walking" />
</center>
<div class="content">
<h2>O album mais recente</h2>
<img src="images/nightmare.jpg" width="82" height="80" alt="Unwired album cover" class="left" />
<p>Os californianos Avenged Sevenfold estão de volta aos discos com "Nightmare". Solos de guitarra, vocalizações rasgadas e um som contagiante continuam a ser a base do sucesso de uma das bandas de heavy-metal com mais fãs no mundo inteiro. Fundados
em 1999 por M. Shadows, Synyster Gates, Zacky Vengeance, Johnny Christ e The Rev - baterista que faleceu em Dezembro de 2009 passado e que foi substituido neste disco por Mike Portnoy, dos Dream Theater - os Avenged Sevenfold já contam com
cinco discos de originais na sua carreira.</p>
<div class="divider"></div>
<h2>Musicas com maior sucesso</h2>
<table summary="track downloads" border="0" cellspacing="0">
<tr>
<th width="55%">Faixa</th>
<th>Album</th>
<th class="hidden">Dowload links</th>
</tr>
<tr>
<td>Bat Country</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Beast and the Harlot</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Seize the Day</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Almost Easy</td>
<td>Avenged Sevenfold</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Afterlife</td>
<td>Avenged Sevenfold</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Nightmare</td>
<td>Nightmare</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Welcome to the Family</td>
<td>Nightmare</td>
<td class="download">Ouvir
</td>
</tr>
</table>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div align="right">
<font size="2">text</font>
</div>
</div>
you would want to add the background to the #about:after and then apply the transparency to that. there is no way to add the transparency directly to the background as far as I know.
here is a link to a good article on this.

Add scrolling to avoid overlapping

I need to insert more scrolling so that the user can scroll more and see the content properly and not behind another text.. How could I do that or something like that as long as users can properly display the content. Here's my code (I know it's messy but I am new at this):
<html>
<head>
<title>The Dream - Cos'è</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<body>
<!-- Create navigation bar-->
<style>
#TopBar{
position:fixed;
top:0;
left:0;
width:100%;
height:40px;
background-color:#181818;
}
</style>
<div id="TopBar"></div>
<!-- Create Page Links -->
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
color: white;
position: fixed;
font-family: sans-serif;
font-size: 20px;
padding-left: 163px;
}
</style>
<style>
li {
display: inline;
margin: 5px;
}
</style>
<style>
a{color: #ffffff;
text-decoration:none;
}
</style>
<ul>
<li>Cos'è</li>
<li>Chi Siamo</li>
</ul>
<style>
al {
list-style-type: none;
margin: 0;
padding: 0;
color: white;
position: fixed;
font-family: sans-serif;
font-size: 20px;
right: 140px;
}
</style>
<style>
li {
display: inline;
margin: 5px;
}
</style>
<style>
a{color: #ffffff;
text-decoration:none;
}
</style>
<al>
<li>News</li>
<li>Video</li>
<li>Gallery</li>
</al>
<!-- Create Text "#thedream"-->
<style> h2
{
position:fixed;
right:50px;
bottom:15px;
color:black;
z-index: 0;
}
</style>
<h2>#THEDREAM</h2>
<!-- Add Social Text and Links -->
<style>
h3 {
position:fixed;
left:50px;
bottom:35px;
color:black;
z-index: 0;
}
</style>
<h3>Seguici Su:</h3>
<a href="https://www.facebook.com/pages/TheDream-IL-FILM/668675889932418?ref=aymt_homepage_panel">
<img src="FB-logo.png" alt="FB Icon" style="position:fixed;bottom:22px;left:57px;width:29px;height:29px;border:0;z-index:1;">
</a>
<a href="https://www.youtube.com/channel/UC-0xXwA-gAqNPtcMwMnI-8Q">
<img src="YouTube-logo.png" alt="YT Icon" style="position:fixed;bottom:10px;left:82px;width:55px;height:55px;border:0;z-index:1;">
</a>
<style>
div {
background-color: white;
top: 40px;
margin: 0;
}
</style>
<!-- Bio 1 -->
<div>
<style>
h5 {
list-style-type: none;
margin: 0;
position: relative;
font-size: 20pt;
font-family: sans-serif;
left: 175px;
top: 50px;
color:#585858;
z-index: -1;
}
</style>
<h5>Gianfranco Marascia</h5>
<style>
p1{
list-style-type: none;
margin-right: 133px;
position: absolute;
font-size: 15pt;
font-family: sans-serif;
left: 175px;
top:100px;
color:black;
z-index: -1;
}
</style>
<style>
a.class1{color: black;
text-decoration:underline;
}
</style>
<p1><img src="Gianfranco.jpg" width="150" height="150" float= "left" hspace= "5px" align= "left">
Gianfranco Marascia nasce a Palermo nel 1995. Egli cresce a Baucina, un paese nella provincia di Palermo nell'entro terra siciliano. E' un ragazzo molto estroverso con la passione per i computer e, soprattutto, per il video/foto editing. Già da giovane inzia a girare video musicali con altri talenti compaesani come il percussionista Santi Orlando e la cantante Raffaella Poma. Visto non solo il suo talento per i video musicali ma anche per gli eventi paesani egli decide di passare alla scrittura del primo suo cortometraggio: The Dream.
</p1>
</div>
<!-- Bio #2 -->
<style>
h6 {
list-style-type: none;
margin: 0;
position: absolute;
font-size: 20pt;
font-family: sans-serif;
right: 133px;
top:275px;
color:#585858;
z-index: -1;
}
</style>
<h6>Dario Ferrara</h6>
<style>
p2{
list-style-type: none;
margin-left: 175px;
position: absolute;
font-size: 15pt;
font-family: sans-serif;
right: 133px;
top:325px;
color:black;
z-index: -1;
}
</style>
<p2><img src="Dario.jpg" width="150" height="150" float= "right" align= "right">
Dario Ferrara nasce il 28 agosto 1985. Laurea triennale in Sassofono Classico, carattere estroverso, passione per la musica, informatica, hi-tech, calcio e recitazione. Attualmente studia presso l'Universita' di Medicina e Chirurgia di Verona con l'obiettivo di conseguire la laurea in Scienze Infermieristiche.
</p2>
<!-- Bio 3 -->
<style>
h7 {
list-style-type: none;
margin: 0;
position: absolute;
font-size: 20pt;
font-family: sans-serif;
left: 175px;
top: 500px;
color:#585858;
z-index: -1;
}
</style>
<h7><b>Alex Cali</b></h7>
<style>
p3{
list-style-type: none;
margin-right: 133px;
position: absolute;
font-size: 15pt;
font-family: sans-serif;
left: 175px;
top:550px;
color:black;
z-index: -1;
}
</style>
<p3><img src="Me.jpg" width="150" height="150" float= "left" hspace= "5px" align= "left">
Alex Cali nasce a Palermo il 18 Gennaio 1997 e cresce in un piccolo paese della Sicilia, Ventimiglia di Sicila. Fin da piccolo sviluppa una passion per Il cinema e per la tecnologia, in particolare per i computer e dispositivi multimediali. Alla tenera eta di 17 si trasferisce in Canada dove procede i suoi studi superiori al St. Maximilian Kolbe CHS dove impara a programmare in Java, Turing e HTML/CSS. A settembre andrà al Seneca College dove studiera per conseguire una laurea in Sviluppo del Software.
</p3>
</body>
</html>``
One first suggestion:
<!DOCTYPE html>
<html>
<head>
<title>The Dream - Cos'è</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
#TopBar{
position:fixed;
top:0;
left:0;
width:100%;
height:40px;
background-color:#181818;
}
ul {
display: block;/*list-style-type: none;*/
margin: 0 0 0 180px;
padding: 0;
color: white;
position: fixed;
font-family: sans-serif;
font-size: 20px;
}
li {
display: inline;
margin: 5px;
}
a {color: #ffffff;
text-decoration:none;
}
li.one {
display: inline;
margin: 5px;
}
li.one a {
color: #ffffff;
text-decoration:none;
}
a.class1 {color: black;
text-decoration:underline;
}
al {
display: block;/*list-style-type: none;*/
margin: 0;
padding: 0;
color: white;
position: fixed;
font-family: sans-serif;
font-size: 20px;
right: 180px;
}
div {
background-color: white;
top: 40px;
margin: 0;
}
p1{
display: block;/*list-style-type: none;*/
margin-right: 180px;
position: absolute;
font-size: 15pt;
font-family: sans-serif;
left: 180px;
top:100px;
color:black;
z-index: -1;
}
p2{
display: block;/*list-style-type: none;*/
margin-left: 180px;
position: absolute;
font-size: 15pt;
font-family: sans-serif;
margin-right: 180px;
top:325px;
color:black;
z-index: -1;
}
p3{
display: block;/*list-style-type: none;*/
margin-right: 180px;
position: absolute;
font-size: 15pt;
font-family: sans-serif;
left: 180px;
top:550px;
color:black;
z-index: -1;
}
p1, p2, p3 {
text-align:justify;
height:160px;
overflow-y:scroll;
}
h2 {
position:fixed;
right:50px;
bottom:15px;
color:black;
z-index: 0;
font-size: 110%;
}
h3 {
position:fixed;
left:50px;
bottom:35px;
color:black;
z-index: 0;
}
h5 {
display: block;/*list-style-type: none;*/
margin: 0;
position: relative;
font-size: 20pt;
font-family: sans-serif;
left: 180px;
top: 50px;
color:#585858;
z-index: -1;
}
h6 {
display: block;/*list-style-type: none;*/
margin: 0;
position: absolute;
font-size: 20pt;
font-family: sans-serif;
right: 180px;
top:275px;
color:#585858;
z-index: -1;
}
h7 {
display: block;/*list-style-type: none;*/
margin: 0;
position: absolute;
font-size: 20pt;
font-family: sans-serif;
left: 180px;
top: 500px;
color:#585858;
z-index: -1;
}
div.clear {
clear:all;
}
</style>
</head>
<body>
<div id="TopBar"></div>
<ul>
<li>Cos'è</li>
<li>Chi Siamo</li>
</ul>
<al>
<li class="lione">News</li>
<li class="lione">Video</li>
<li class="lione">Gallery</li>
</al>
<h2>#THEDREAM</h2>
<h3>Seguici Su:</h3>
<a href="https://www.facebook.com/pages/TheDream-IL-FILM/668675889932418?ref=aymt_homepage_panel">
<img src="FB-logo.png" alt="FB Icon" style="position:fixed;bottom:22px;left:57px;width:29px;height:29px;border:0;z-index:1;">
</a>
<a href="https://www.youtube.com/channel/UC-0xXwA-gAqNPtcMwMnI-8Q">
<img src="YouTube-logo.png" alt="YT Icon" style="position:fixed;bottom:10px;left:82px;width:55px;height:55px;border:0;z-index:1;">
</a>
<div>
<h5>Gianfranco Marascia</h5>
<p1><img src="Gianfranco.jpg" width="150" height="150" float="left" style="margin: 0 10px 0 0" align= "left">
Gianfranco Marascia nasce a Palermo nel 1995. Egli cresce a Baucina, un paese nella provincia di Palermo nell'entro terra siciliano.
È un ragazzo molto estroverso con la passione per i computer e, soprattutto, per il video/foto editing. Già da giovane inzia a girare
video musicali con altri talenti compaesani come il percussionista
Santi Orlando
e la cantante Raffaella Poma.
Visto non solo il suo talento per i video musicali ma anche per gli eventi paesani egli decide di passare alla scrittura del primo
suo cortometraggio: The Dream.</p1>
</div>
<h6>Dario Ferrara</h6>
<p2><img src="Dario.jpg" width="150" height="150" float= "right" style="margin: 0 0 0 10px" align= "right">
Dario Ferrara nasce il 28 agosto 1985. Laurea triennale in Sassofono Classico, carattere estroverso, passione per la musica,
informatica, hi-tech, calcio e recitazione. Attualmente studia presso l'Universita' di Medicina e Chirurgia di Verona con
l'obiettivo di conseguire la laurea in Scienze Infermieristiche.</p2>
<h7><b>Alex Cali</b></h7>
<p3><img src="Me.jpg" width="150" height="150" float= "left" style="margin: 0 10px 0 0" align= "left">
Alex Cali nasce a Palermo il 18 Gennaio 1997 e cresce in un piccolo paese della Sicilia, Ventimiglia di Sicila.
Fin da piccolo sviluppa una passion per Il cinema e per la tecnologia, in particolare per i computer e dispositivi
multimediali. Alla tenera eta di 17 si trasferisce in Canada dove procede i suoi studi superiori al St. Maximilian
Kolbe CHS dove impara a programmare in Java, Turing e HTML/CSS. A settembre andrà al Seneca College dove studiera
per conseguire una laurea in Sviluppo del Software.</p3>
</body>
</html>
See also: http://jsfiddle.net/bf50t4ty/2/
Personally, I would have re-written most of the code differently, but here I tried most to edit your MWE. Several other things should be fixed then and some more order should be done.
The CSS lines implementing what you asked for are
height:160px;
overflow-y:scroll;
in
p1, p2, p3 {
text-align:justify;
height:160px;
overflow-y:scroll;
}

Layout changes when I switch resolution

I'm making a website (in Dutch) and I work on a laptop with a external screen. The external screen has another resolution then my laptop screen so the site comes out distorted when viewed on the other screen. How do I fix this?
<!DOCTYPE HTML>
<html>
<head> <style type="text/css">
body {
background-color: #D8D8D8;
}
nav {
/* Dit is voor de menubalk bovenin. */
position: relative;
background-color: black;
width: 100%;
height: 110px;
top: -16px;
left: -7.8px;
padding: 8px;
}
.menutekst1 {
position: relative;
width: 150px;
display: inline;
border-color: white;
color: white;
list-style-type: none;
float: right;
font-size: 39px;
top: 10px;
right: 40px;
font-family: verdana;
}
.menutekst2 {
position: relative;
display: inline;
border-color: white;
color: white;
list-style-type: none;
float: right;
font-size: 39px;
top: 10px;
right: 25px;
font-family: verdana;
}
.menutekst3 {
position: relative;
display: inline;
border-color: white;
color: white;
list-style-type: none;
float: right;
font-size: 39px;
top: 10px;
right: 50px;
font-family: verdana;
}
.menutekst4 {
position: relative;
display: inline;
border-color: white;
color: white;
list-style-type: none;
float: right;
font-size: 39px;
top: 10px;
font-family: verdana;
}
#logo {
/* Dit is voor het logo rechts bovenin. */
position: absolute;
top: 30px;
left: 0px;
width: 300px;
}
#facebook {
/* Dit is voor het Facebook logo rechts bovenin. */
position: absolute;
top: 30px;
left: 320px;
width: 70px;
}
#hometekst {
/* Dit is voor de tekst op de home pagina. */
position: relative;
text-align: center;
font-size: 20px;
font-family: Verdana;
}
#home1 {
position: relative;
display: inline;
width: 250px;
height: 161px;
float: left;
left: 0px;
/* left: 40px; */
}
#home2 {
position: relative;
display: inline;
width: 320px;
height: 161px;
float: right;
left: px;
right: 250px; */
}
#home3 {
position: relative;
display: inline;
width: 250px;
height: 161px;
float: right;
/* right: 50px; */
}
</style>
</head>
<body>
<nav>
<ul>
<img id="logo" src="Foto/logoalgemeen.png" />
<img id="facebook" src="Foto/facebookalgemeen.png" />
<div class="menutekst4"><li>Contact </li></div>
<div class="menutekst2"><li>Wat doen wij </li></div>
<div class="menutekst3"><li>Producten</li></div>
<div class="menutekst1"><li>Home</li></div>
</ul>
</nav>
<p id="hometekst">
<strong>Welkom bij VE-Screen</strong><br>
Ve-stoffering is een betrouwbare partner, denkt met u mee<br>
en weet wat kwaliteit is of het nu gaat om uw woning, schip<br>
of kantoor.<br>
Onze kracht is de ervaring en goede samenwerking met u<br>
als klant, de interieurbouwers en andere aannemers zodat<br>
alles perfect op elkaar afgestemd en opgeleverd wordt.<br>
Desgewenst incl. stoffering van banken, het leveren van<br>
matrassen en bedtextiel en natuurlijk het plaatsen van ons<br>
eigen Ve-screen zonwering.
</p>
<img id="home3" src="Foto/home3.png" />
<img id="home2" src="Foto/home2.png" />
<img id="home1" src="Foto/home1.png" />
</body>
</html>
I think it's because you're using the width as a percentage, then positioning your buttons absolutely. This means that the 100% value will adapt to the screen size but not the buttons' positions as they will always be absolutely positioned using the same values for each screen.
One solution could be to use one precise width value, another solution would be not to absolutely position the buttons and instead use the floatproperty for the buttons. Hope this helps.