Answer the question
In order to leave comments, you need to log in
How to center-align one line of image and text in HTML/CSS?
Image not IMG, DIV with "background: url(images/supermega.png) no-repeat -990px -860px;"
It turns out like this: [DIV] text text and more text
This line must be aligned in the middle of the parent element and provided that the width of the line can change dynamically (text in different languages, depending on the user's choice).
ideas?
Answer the question
In order to leave comments, you need to log in
Of course, I only get to know all the delights of marvelous layout, but my option is:
Set the parent element to text-align: center
Set the div with the background to display: inline-block;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question