1
I want to use an image in the header of the site, it is small and I would like to repeat it horizontally throughout the header using CSS.
The HTML is as follows::
<body>
<header>
<div id="cabecalho">
<img src="pasta/imagem.jpg">
<h1>Texto</h1>
<h2>Texto</h2>
</div>
</header>
Thanks for your help.
What did you try?
– Vinícius Gobbo A. de Oliveira
I tried using the background-repeat: repeat-x in css. But I don’t know if I called the right selector. tried to go directly to img{}, then tried header img{}, div#cabecalho img{}, etc.
– Anderson
Dude, to use background-repeat the image needs to be defined by the property
background: url('caminho');
, and not directly in HTML by IMG tag.– user23124
didn’t work either, natan. send me an example if you can.
– Anderson