viewport komande sluze da napravi responsive stranice
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
HTML
.
.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-----------------------------1
<title>Document</title>
---------------------- <!-- interni style IDE ISPOD title u HEAD tag--> --------------------
<!-- interni style -->
<!-- <style>
a{
font-size: 20px;
color: green;
}
</style> -->
<!-- eksterni style -->
------------- SADRZI <link rel="stylesheet" href="style.css"> i IDE ISPOD title u HEAD tag ---------------
<!-- <link rel="stylesheet" type="css/text" href="style.css"> -->
<!-- <link rel="stylesheet" type="css" href="style.css"> -->
<link rel="stylesheet" href="style.css">
<!-- <link rel="stylesheet" href="/style.css"> -->
-----------------------------------2
</head>
<body>
-----------------------------------3 <header>
<!-- inline style -->
<!-- <h1 style="color: blue;" font-size="40px">Dobrodosli na moju stranicu</h1> -->
-----------------------------------3
<h1>Dobrodosli na moju stranicu</h1>
</header>
<nav>
<a class="first" href="#about"></a>
<a class="second" href="#photo"></a>
<a class="third" href="#contact"></a>
</nav>
<main>
<section class="sec sectionAbout">
<!-- <h2 id="about" style="color: red;">About</h2> -->
<h2 id="about"About></h2>
<p>To je Marija, nas predavac na kursu</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Ipsa, fugiat expedita porro tenetur animi nihil voluptatum incidunt
tempora et sit temporibus quas, corporis sequi iusto laudantium!
Rerum voluptatibus nemo veniam.</p>
</section>
<section class="sec sectionPhoto">
<h2 id="photo">My photo</h2>
<img src="https://fotostudio-beograd.rs/wp-content/uploads/2024/12/Fotografisanje-za-CV-2.jpg" alt="My photo">
<p class="opisSlike">Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum possimus, eveniet at ullam consequuntur nemo aut ad. Ullam velit quibusdam maxime accusantium dolores iure illo voluptatum ad ratione. Est, voluptatum.</p>
</section>
<section>
<h2>Contact</h2>
<p>Adresa: Vojvodjansak 3</p>
<p>Telefon: +381123456789</p>
</section>
</main>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-----------------------------1
<title>Document</title>
---------------------- <!-- interni style IDE ISPOD title u HEAD tag--> --------------------
<!-- interni style -->
<!-- <style>
a{
font-size: 20px;
color: green;
}
</style> -->
-----------------------------------1
-----------------------------------2
<!-- eksterni style -->
------------- SADRZI <link rel="stylesheet" href="style.css"> i IDE ISPOD title u HEAD tag ---------------
<!-- <link rel="stylesheet" type="css/text" href="style.css"> -->
<!-- <link rel="stylesheet" type="css" href="style.css"> -->
<link rel="stylesheet" href="style.css">
<!-- <link rel="stylesheet" href="/style.css"> -->
-----------------------------------2
</head>
<body>
-----------------------------------3
<header>
<!-- inline style -->
<!-- <h1 style="color: blue;" font-size="40px">Dobrodosli na moju stranicu</h1> -->
-----------------------------------3
<h1>Dobrodosli na moju stranicu</h1>
</header>
<nav>
<a class="first" href="#about"></a>
<a class="second" href="#photo"></a>
<a class="third" href="#contact"></a>
</nav>
<main>
<section class="sec sectionAbout">
<!-- <h2 id="about" style="color: red;">About</h2> -->
<h2 id="about"About></h2>
<p>To je Marija, nas predavac na kursu</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Ipsa, fugiat expedita porro tenetur animi nihil voluptatum incidunt
tempora et sit temporibus quas, corporis sequi iusto laudantium!
Rerum voluptatibus nemo veniam.</p>
</section>
<section class="sec sectionPhoto">
<h2 id="photo">My photo</h2>
<img src="https://fotostudio-beograd.rs/wp-content/uploads/2024/12/Fotografisanje-za-CV-2.jpg" alt="My photo">
<p class="opisSlike">Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum possimus, eveniet at ullam consequuntur nemo aut ad. Ullam velit quibusdam maxime accusantium dolores iure illo voluptatum ad ratione. Est, voluptatum.</p>
</section>
<section>
<h2>Contact</h2>
<p>Adresa: Vojvodjansak 3</p>
<p>Telefon: +381123456789</p>
</section>
</main>
</body>
</html>
CSS
/* univerzalni selektor koji se retko koristi
svi elementi koji nisu dobili boju dobice tu boju*/
*{
background-color: rgba(160, 112, 22, 0.966);
border: 2x solid rgb(rgb(190, 41, 41), green, blue);
}
/* id atribut MORA BITI JEDINSTVEN */
body{
background-color: rgb(203, 255, 238);
margin: 0;
}
/* sve u {} je block deklaracija */
header{
/* margin-top: 20px;
margin-bottom: 20px; */
padding-top: 60px;
background-color: aqua;
height: 60px 0;
/* height jedna vrednost se odnosi na levo desno, druga gore dole, ili obrnuto */
text-align: center;
}
h1{
/* css deklaracija */
font-size: 30px;
/* color: blue; */
margin: 0;
}
nav{
text-align: center;
}
nav a{
/* deklaracija se suzava samo na nav a elemente */
font-size: 15;
}
/* a{
color: rgb(rgb(255, 0, 212), rgb(128, 77, 0), rgba(183, 0, 255, 0.096));
font-size: 20px;
} */
/* komentar */
/* tipski selektor: body, p, h1, span - to znaci da odnosi na sve delove koda u tom delu/
/* klasni selektori */
/* id selektori */
/* univerzalni selektori */
.sec{
/* background-color: rgb(204, 21, 158) !important; */
text-align: center;
margin-top: 5px;
/* border ima 3 vrednosti prva je border-width
druga border-stile treca border-color */
border: 4px solid;
}
/* !important se koristi ako se napravi neka greska, ali se izbegava */
#photo{
color: brown;
}
.sectionAbout{
text-align: center;
font-family: 'Courier New', Courier, monospace;
font-weight: 800;
padding: 10px;
}
.sectionAbout{
background-color: aquamarine;
text-align: center;
font-weight: 800;
padding: 10px;
}
.sectionPhoto{
text-align: center;
background-color: aqua;
}
img{
width: 300px;
height: 400px;
}
.opisSlike{
font-size: 12px;
font-style: normal;
color: white;
text-align: start;
}
p{
font-size: 20px;
font-style: italic;
}
#about{
font-size: 25px;
}
/* id selektori se hvataju preko tarabice, klasni preko tackice */
/* univerzalni selektor koji se retko koristi
svi elementi koji nisu dobili boju dobice tu boju*/
*{
background-color: rgba(160, 112, 22, 0.966);
border: 2x solid rgb(rgb(190, 41, 41), green, blue);
}
/* id atribut MORA BITI JEDINSTVEN */
body{
background-color: rgb(203, 255, 238);
margin: 0;
}
/* sve u {} je block deklaracija */
header{
/* margin-top: 20px;
margin-bottom: 20px; */
padding-top: 60px;
background-color: aqua;
height: 60px 0;
/* height jedna vrednost se odnosi na levo desno, druga gore dole, ili obrnuto */
text-align: center;
}
h1{
/* css deklaracija */
font-size: 30px;
/* color: blue; */
margin: 0;
}
nav{
text-align: center;
}
nav a{
/* deklaracija se suzava samo na nav a elemente */
font-size: 15;
}
/* a{
color: rgb(rgb(255, 0, 212), rgb(128, 77, 0), rgba(183, 0, 255, 0.096));
font-size: 20px;
} */
/* komentar */
/* tipski selektor: body, p, h1, span - to znaci da odnosi na sve delove koda u tom delu/
/* klasni selektori */
/* id selektori */
/* univerzalni selektori */
.sec{
/* background-color: rgb(204, 21, 158) !important; */
text-align: center;
margin-top: 5px;
/* border ima 3 vrednosti prva je border-width
druga border-stile treca border-color */
border: 4px solid;
}
/* !important se koristi ako se napravi neka greska, ali se izbegava */
#photo{
color: brown;
}
.sectionAbout{
text-align: center;
font-family: 'Courier New', Courier, monospace;
font-weight: 800;
padding: 10px;
}
.sectionAbout{
background-color: aquamarine;
text-align: center;
font-weight: 800;
padding: 10px;
}
.sectionPhoto{
text-align: center;
background-color: aqua;
}
img{
width: 300px;
height: 400px;
}
.opisSlike{
font-size: 12px;
font-style: normal;
color: white;
text-align: start;
}
p{
font-size: 20px;
font-style: italic;
}
#about{
font-size: 25px;
}
/* id selektori se hvataju preko tarabice, klasni preko tackice */