Problème codage position absolute.
Résolu
Xyrto
Messages postés
46
Date d'inscription
Statut
Membre
Dernière intervention
-
Xyrto Messages postés 46 Date d'inscription Statut Membre Dernière intervention -
Xyrto Messages postés 46 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Petite question, je suis donc en train de coder une page et j'ai un soucis car sur firefox ma page est centrée ( image et texte ) sur mon mac mais des que je le passe sur safari ou sur un autre ordi, mon texte se décentre de 2 mm - 3 mm vers la gauche. Je ne sais pas pourquoi.
Voilà, je compte sur vous. ;)
voici le soucis en directe : www.leprieuresaintpierre.be
// html //
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Ici le head de la page -->
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Le Prieuré Saint-Pierre.</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="css.css"/>
</head>
</head>
<body>
<div id="cover">
<img src="images/cover.jpg" />
</div>
<h2>Le Prieuré Saint Pierre</h2>
<h3>Site en cuisine.</h3>
<p class="contact"><strong> 04.384.76.40 /
<a href="mailto:jerome_lindt@hotmail.com">jerome_lindt@hotmail.com</a>
</strong></p>
<p class="info"><strong>En attendant, la carte et ses nouveautés : <a href="https://www.resto.be/">ici</a></strong></p>
</body>
</html>
//css//
#cover
{
position:absolute;
left: 50%;
top: 50%;
margin-top: -200px;
margin-left: -200px;
}
h2
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 50px;
margin-left: -96px;
font-family:times;
color:#0b4f25;
}
h3
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 78px;
margin-left: -45px;
font-family:times;
color:#0b4f25;
}
a, a:link, a:visited
{
text-decoration:none;
font-family:times;
color:#0b4f25;
}
.contact
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 102px;
margin-left: -112px;
font-family:times;
color:#0b4f25;
}
.info
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 120px;
margin-left: -117px;
font-family:times;
color:#0b4f25;
}
Petite question, je suis donc en train de coder une page et j'ai un soucis car sur firefox ma page est centrée ( image et texte ) sur mon mac mais des que je le passe sur safari ou sur un autre ordi, mon texte se décentre de 2 mm - 3 mm vers la gauche. Je ne sais pas pourquoi.
Voilà, je compte sur vous. ;)
voici le soucis en directe : www.leprieuresaintpierre.be
// html //
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Ici le head de la page -->
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Le Prieuré Saint-Pierre.</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="css.css"/>
</head>
</head>
<body>
<div id="cover">
<img src="images/cover.jpg" />
</div>
<h2>Le Prieuré Saint Pierre</h2>
<h3>Site en cuisine.</h3>
<p class="contact"><strong> 04.384.76.40 /
<a href="mailto:jerome_lindt@hotmail.com">jerome_lindt@hotmail.com</a>
</strong></p>
<p class="info"><strong>En attendant, la carte et ses nouveautés : <a href="https://www.resto.be/">ici</a></strong></p>
</body>
</html>
//css//
#cover
{
position:absolute;
left: 50%;
top: 50%;
margin-top: -200px;
margin-left: -200px;
}
h2
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 50px;
margin-left: -96px;
font-family:times;
color:#0b4f25;
}
h3
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 78px;
margin-left: -45px;
font-family:times;
color:#0b4f25;
}
a, a:link, a:visited
{
text-decoration:none;
font-family:times;
color:#0b4f25;
}
.contact
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 102px;
margin-left: -112px;
font-family:times;
color:#0b4f25;
}
.info
{
position:absolute;
left: 50%;
top: 50%;
margin-top: 120px;
margin-left: -117px;
font-family:times;
color:#0b4f25;
}
A voir également:
- Problème codage position absolute.
- Codage ascii - Guide
- Ma position - Guide
- Codage binaire - Guide
- Suivi position google - Guide
- Partage position whatsapp - Guide