Results 1 to 6 of 6

Thread: Alignment

  1. #1
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Alignment

    I need text to be aligned on top of a picture. Can I do this without having to build table and all that fun stuff? JF

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Depending on complexity,

    HTML Code:
    Texttextexttexttext....texttext...<br>
    <img src="something.jpg" alt="blah">
    Center or left align depending...
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2006
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you simply want the text to be on top of the picture, the line break will do the trick; however, if you really want to align the text (like a caption), then you will likely have to specify the font style and pixel size.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    you will likely have to specify the [...] pixel size.
    "Specify the pixel size?" Eh?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Apr 2006
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The default font size/style/weight/family may or may not yield the desired alignment.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You mean to specify the font size in pixels?
    No, that's not clever.
    Specify a containing DIV around the text and the image, with its width set to that of the image.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •