question about textflow

Discussion in 'HTML' started by Knut Krueger, Oct 27, 2006.

  1. Knut Krueger

    Knut Krueger Guest

    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
     
    Knut Krueger, Oct 27, 2006
    #1
    1. Advertising

  2. Knut Krueger

    Ben C Guest

    On 2006-10-27, Knut Krueger <> wrote:
    > 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.
     
    Ben C, Oct 27, 2006
    #2
    1. Advertising

  3. Knut Krueger

    Knut Krueger Guest

    Ben C schrieb:
    > On 2006-10-27, Knut Krueger <> wrote:
    >> 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.

    Thank you very much works fine

    Knut
     
    Knut Krueger, Oct 27, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sean
    Replies:
    1
    Views:
    628
    Cowboy \(Gregory A. Beamer\)
    Oct 20, 2003
  2. =?Utf-8?B?UnlhbiBTbWl0aA==?=

    Quick Question - Newby Question

    =?Utf-8?B?UnlhbiBTbWl0aA==?=, Feb 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    698
    Iain Norman
    Feb 16, 2005
  3. =?Utf-8?B?YW5kcmV3MDA3?=

    question row filter (more of sql query question)

    =?Utf-8?B?YW5kcmV3MDA3?=, Oct 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    975
    Scott Allen
    Oct 6, 2005
  4. Philip Meyer
    Replies:
    0
    Views:
    448
    Philip Meyer
    Nov 30, 2003
  5. Bit Byte
    Replies:
    1
    Views:
    883
    Teemu Keiski
    Jan 28, 2007
Loading...

Share This Page