Zašto koristiš float za inline-block ?
Ta vrednost za display svojstvo je inače novijeg datuma, ie6 veze nema šta je to, npr.. No, taj ie6 je mrtav, valjda.
To je baš ono što treba da se sa lakoćom rasporede elementi - bez float-a.
Pre nego što kreneš da se arčiš sa css-om, dobro obrati pažnju i nauči koji element pripada u block grupu, kao podrazumevanu.
Zatim, pošto je kaskada u pitanju, ne pita te koliko istih klasa imaš nadžidžanih nikad, već samo lepi preko.
Ona koja je zadnja i sva pravila koja ima - to preovlađuje. Tako isto i za ID. I za tagove.
-article img-, recimo, treba da ide posle, ne pre article taga.
Tvoj prethodni deo koda bi ja ovako nekako.. pisano u letu ..
Probaj, nisam ni gledao tvoj html, nemam vreme sad za dropbox.
Code (html):
<!DOCTYPE html>
<html lang="sr">
<head id="fallBack">
<meta charset=utf-8>
<title> Recenzije
</title>
<style type="text/css">
body {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
text-align:center;
}
article {
position:relative;
display: inline-block;
margin:5px;
padding: 3px;
width: 320px;
height: auto;
background: linear-gradient(#DCDCE6, white);
border-radius: 5px;
}
article img {
display: block;
float: left;
width: 180px;
height: 240px;
padding: 0;
margin: 8px 5px 1px 5px;
background-color: rgb(255,255,255);
background-color: rgba(255,255,255,0.5);
}
article p {
padding:5px;
color: Black;
font-size:10px;
line-height:1.3;
text-align:justify;
font-family: Verdana, Geneva, sans-serif;
}
.clear {
float:none;
clear:both;
}
</style>
</head>
<body>
<h1> Recenzije
</h1>
<article>
<h2> Film 1
</h2>
<img src="/imgPath/img1.jpg" alt="img1Here">
<p>
<b>Lorem Ipsum
</b> is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<br class="clear" />
</article>
<article>
<h2> Film 2
</h2>
<img src="/imgPath/img2.jpg" alt="img2Here">
<p>
<b>Lorem Ipsum
</b> is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<br class="clear" />
</article>
</body>
</html>
[Ovu poruku je menjao plus_minus dana 28.03.2014. u 17:26 GMT+1]
about:networking