question about textflow

K

Knut Krueger

Hi to all
I would like to get the text exactly as wide as the image.
http://pizza.einthal.de

any hints for me?

By the way whats wrong with the doctype line?
The wc3 valiadtor reports a missing doctype?

Regards Knut
 
B

Ben C

Hi to all
I would like to get the text exactly as wide as the image.
http://pizza.einthal.de

any hints for me?

You can set its container to the same width that the image happens to
be.

Or use

#unipizza {
display: table; width: 1px;
}

This will make the container's width as close to 1px as it can get
without overflowing. Since your image is wider than the longest
unbreakable character sequence, it'll get the width of the image.

If you then want those margins doing some centering (you had left and
right both set to 15em), add "margin: 0 auto" to the #unipizza selector
as well.
 
K

Knut Krueger

Ben said:
You can set its container to the same width that the image happens to
be.

Or use

#unipizza {
display: table; width: 1px;
}

This will make the container's width as close to 1px as it can get
without overflowing. Since your image is wider than the longest
unbreakable character sequence, it'll get the width of the image.

If you then want those margins doing some centering (you had left and
right both set to 15em), add "margin: 0 auto" to the #unipizza selector
as well.
Thank you very much works fine

Knut
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top