Bonsoir à tous,
j'ai actuellement un soucis gênant le bon déroulement de ma soirée ...
et le problème c'est de centrer de façon optimale mes news (appelé #top_news ici) (les centrer verticalement par rapport à (#news) [et que ça, s'adapte responsivement]
Si une bonne âme savait m'aider car là je coince depuis 14h ...
Mon code
<!DOCTYPE HTML>
<html lang="fr">
<head>
<meta charset="utf-8" />
<title>E-Technologie</title>
<style>
*
{
margin: 0;
padding: 0;
}
body
{
background-color: #ECEDED;
}
body, html
{
height: 100%;
}
header
{
width: 100%;
height: 75px;
background-color: #183540;
}
nav
{
margin-right: 5%;
line-height: 75px;
width:100%;
text-align: right;
}
nav ul
{
list-style-type: none;
}
nav li
{
display:inline-block;
margin-left: 5%;
}
nav a
{
color: white;
text-decoration: none;
}
footer
{
height: 100px;
background-color: #BF3B58;
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
#container
{
min-height: 100%;
position: relative;
}
#titre
{
color: white;
line-height: 75px;
float: left;
margin-left: 2%;
}
#screen
{
margin-right: 5%;
}
#mobile
{
display: none;
}
#slider
{
width:100%;
height:auto;
background-color: blue;
}
#slider article
{
text-align: center;
line-height: 400px;
}
/* CSS DES NEWS */
#news
{
width: 100%;
height: 450px;
position: relative;
background-color: black;
}
#top_news
{
display: inline-block;
width: 33%;
height:auto;
background-color: #FFF7CD;
}
#top_news img
{
display: block;
margin-left: auto;
margin-right: auto;
width:50%;
height: auto;
}
/* ------------------- */
@media screen and (max-width: 500px)
{
#screen
{
display: none;
}
#mobile
{
display: inline-block;
float: right;
margin-right: 5%;
}
}
</style>
</head>
<body>
<div id="container">
<header>
<nav>
<div id="titre">
<?php require 'inc/config.php'; ?>
<?= '<h1>'.$titre.'</h1>' ?>
</div>
<div id="mobile">
<a href=""><img src="http://lmarcin.fr/_include/img/menu-mobile.png" /></a>
</div>
<div id="screen">
<ul>
<li><a href="#">News</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Teams</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</nav>
</header>
<section id="slider">
<article>SLIDER</article>
</section>
<!-- BLOC DES NEWS -->
<section id="news">
<article id ="top_news">
<h1>Razzer</h1>
<p class="date">2014-01-01</p>
<img src="img/razer.png" alt="razer" />
<p class="text_center">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris tellus arcu ...</p>
</article>
<article id ="top_news">
<h1>Razzer</h1>
<p class="date">2014-01-01</p>
<img src="img/razer.png" alt="razer" />
<p class="text_center">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris tellus arcu ...</p>
</article>
<article id ="top_news">
<h1>Razzer</h1>
<p class="date">2014-01-01</p>
<img src="img/razer.png" alt="razer" />
<p class="text_center">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris tellus arcu ...</p>
</article>
</section>
<!-- FIN NEWS -->
<footer>
<p>Footer</p>
</footer>
</div>
</body>
</html>
Merci d'avance.
Cordialement,
W.S