2
Good morning dear(as), I have an html and from time to time I need to insert an image that is a "}" to determine that in a song will repeat that excerpt.
As my text adapts to the size of the screen, when moving it changes in size and the image is fixed, what I need is that it adapts to the size of the text.
In the planning I had, I started with a very good idea, I left the div that has the praise without Height
, this way it is automatic, staying in the exact height of the text. If I put the div where the key is always the same height (even when the other is resized).
Below is an image where I highlighted the two div’s to better understand:
If I succeed in any way, I leave my answer, until then, I accept any help or idea.
CSS:
#louvor{
background-color: rgba(00,00,00,0.8);
margin-left: 1%;
width: 93%;
position: relative;
float: left;
font-size: 3.5vw;
text-align: left;
color: white;
text-transform: uppercase;
text-shadow: 1px 1px black;
font-family: "Futura XBlk BT", Times, serif;
}
HTML:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../../css/style.css" rel="stylesheet" />
</head>
<body id="principal">
<div id="estrutura">
<div id="logo-louvor"></div>
<div id="louvor">
<font color="yellow">CORO:</font><br>
AS MINHAS MÃOS TRAZEM CHAGAS TÃO FUNDAS<br>
QUE TANTA AMARGURA EU PUDE ABRIGAR<br>
DE TODA DOR DE VERGONHA E PECADO<br>
EU FUI COROADO PARA TE SALVAR<br>
</div>
<div id="inform">
<img src="../../imagens/chaves.png">
</div>
</div>
</body>
</html>
If possible put what you have of HTML and CSS, you may not need JS to do this.
– hugocsl
All right, but it’s much simpler than it looks. I’ll edit the post and insert.
– Alexandre Bonadiman Angeli
Alexandre you can use the property min-height, height , min-width and width in percentage for your image, as well as use the css medias queries.
– Rafael Salomão
Rafael, I don’t know about "css medias queries", I’ll see about it, it can help me yes.
– Alexandre Bonadiman Angeli
Another thing, I understand that you want to add a background to the praise text background. If that’s the case, you don’t need the image in div #inform, just use the background-image in div #praise. The HTML font tag is deprecated using the direct color property in your css to configure the color!
– Rafael Salomão
Hey Rafael, about the div <font> I even know that it is obsolete, but it’s that kind, are many songs even and will have a whole staff that will help me write each one. ".
– Alexandre Bonadiman Angeli
About what I said about the background, I didn’t understand. The praise div I want it transparent to get the image of the body. That’s why I set background-color: rgba(00,00,00,0);
– Alexandre Bonadiman Angeli