Affichage d'image en background non prise en compte
Bonjour à toutes et à tous, j'espère que vous allez bien.
Je me prends le cervelet depuis la fin de journée.
Je ne suis pas du tout un expert en dev. web, j'ai avec mes compétences et un peu de recherche écrit une page statique simple et j'ai été l'héberger sur hostinger. Mon soucis c'est que même après moultes modifications, je n'arrive toujours pas à afficher mon background d'un conteneur (je précise que lorsque je lance la page en local, tout se passe bien, le background ne s'affiche pas uniquement via hostinger.
Il y a certainement des éléments inutiles mais j'ai bidouillé comme j'ai pu avec les moyens du bord. Pour l'image du background CSS, j'ai testé en background:, background-image:, en changeant les dimensions width height, la position aussi, le fixed également, j'ai refais et refais les chemins (img, images, '', "", ../img, ../images) je ne comprends vraiment pas pourquoi l'image s'affiche en local et pas via l'hébergeur. Si vous pouviez m'aider, ce serait top! Je suis vraiment largué. D'avance merci à toutes et à tous.
Voici le code : (lignes 8 et 15)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>NONAMEtest</title>
<link rel="stylesheet" type="text/css" href="styles.css" media="all" />
<link rel="shortcut icon" type="img/png" href="leflamiconmarchetrèsbien"/>
</head>
<body>
<header>
<!-- avatar -->
<img class="logo-img" src="img\marchtrèsbien.png">
</header>
<section id="about">
<div class="section-container">
<h1 class="big-title">NONAMEtest</h1>
<h3>txt</h3>
<p>txt
<br>txt
</p>
<p>
<strong>txt</strong>
<br>txt
</p>
<p>
<strong>txt</strong>
<br>txt</br>
<br>txt</br>
<br>txt</br>
</p>
<p>
<strong>txt</strong>
<br>txt</br>
<br>txt</br>
<br>txt</br>
<br>txt</br> <br> <i>txt</i> </br>
<br>txt</br>
</p>
</div>
</section>
<section id="contact">
<div class="section-container">
<div class="sidebar-social-holder twitter">
<div class="asset-holder">
<div class="super-title">Follow me on</div>
<div class="title">twitter</div>
<a href="https://twitter.com/" target="_blank" class="coin"></a>
</div>
<div class="info-holder">
<div class="subscribe-button-holder">
<a href="https://twitter.com" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @adressetwitter</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
</script>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</section>
<footer>
<p>txt</p>
</footer>
</body>
</html> |
-----------------------------
voir ligne 35
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
| html {
scroll-behavior: smooth;
}
@import url('https://fonts.googleapis.com/css2?family=Space+Mono&display=swap');
body {
background-color: black;
padding: 50px;
font-family: 'Space Mono', monospace;
}
header {
display: flex;
justify-content: center;
align-items: center;
color: white;
}
.logo-img {
width: 250px;
}
.section-container {
padding: 25px;
}
#about {
margin-left: auto;
margin-right: auto;
height: 683px;
width: 1024px;
background: transparent center url('c'est cette image qui ne s'affiche pas') fixed no-repeat;
color: #DCDCDC;
text-align: center;
}
#contact {
display: flex;
justify-content: center;
margin-left: auto;
margin-right: auto;
position: center;
padding-top: 50px;
}
.sidebar-social-holder {
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 360px;
height: 150px;
margin: auto;
text-align: center;
box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.06);
}
.sidebar-social-holder .asset-holder {
position: relative;
width: 100%;
display: block;
}
.sidebar-social-holder .asset-holder img {
display: block;
}
.sidebar-social-holder .coin {
width: 113px;
height: 113px;
background-repeat: no-repeat;
background-size: 100%;
display: block;
background-image: url(<a href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/499416/social-coins.png);" target="_blank">https://s3-us-west-2.amazonaws.com/s...al-coins.png);</a>
}
.sidebar-social-holder .info-holder {
background: #FFF;
width: 100%;
padding: 15px 0px;
min-height: 30px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.sidebar-social-holder .subscribe-button-holder {
float: right;
padding: 0 15px;
}
.sidebar-social-holder.twitter .coin {
background-position: 0 -452px;
z-index: 1;
position: absolute;
bottom: -50px;
left: 20px;
}
.sidebar-social-holder.twitter .asset-holder {
width: 80px;
}
.sidebar-social-holder.twitter .asset-holder .super-title {
font-size: 12px;
color: #FFF;
padding-top: 25px;
padding-left: 150px;
text-transform: uppercase;
text-align: left;
}
.sidebar-social-holder.twitter .asset-holder .title {
font-size: 24px;
line-height: 24px;
color: #FFF;
padding-left: 150px;
text-align: left;
}
.credit {
margin: 16px 20px 120px 0;
text-align: right;
color: #777777;
font-family: "Lato", sans-serif;
line-height: 24px;
}
.credit a {
padding: 8px 0;
color: #55acee;
text-decoration: none;
transition: all 0.3s ease 0s;
}
.credit a:hover {
text-decoration: underline;
}
footer {
text-align: center;
color: white;
display: flex;
justify-content: center;
padding: 20px;
margin: 20px;
} |