SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Zealot Conspiracy's Avatar
    Join Date
    May 2002
    Posts
    159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Aligning images with text

    I know it's sounds very stupid asking that, cause I see on every page image next to text or even text over image!!!! And I just simply can't do it!!!! I have tried everything!!!!

    I am building my page in HTML, no CSS.

    I have already tried this to write text over image:

    <img class="under" src="blabla.jpg" width...>
    <p class="over"> TEXt </p>

    and this to align image next to text:

    <DIV class="left"><IMG clas="name" scr="blabla.jpg">
    <DIV clas="right"><P class="text">

    And none of them worked at all.....

    Does anyone know how to do it and would be kind to explain?????

  2. #2
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Umm.. classes are for using CSS. And you'd need to use layers to write over text, as far as I know. Since your not using any CSS, those class atributes are useless.

    Do you think you could explain what you're trying to do in more detail?
    Mike
    It's not who I am underneath, but what I do that defines me.

  3. #3
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can set an image as a background for a table for instance...

    you can align the img align="right" OR align="left"

    If you want to place the images, using CSS is the best way!
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  4. #4
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No CSS, say it aint so!

    I don't think its possible to place text over an image w/o using CSS-p.

    For placing the text next to the <img /> you've got a few options:

    • Use tables. Place the <img /> in one cell & the text in another. Your best bet for precise control of the layout:

      <table>
      <tr>
      <td><img src="myImage" /></td>
      <td>some text</td>
      <tr>
      </table>
    • Inline. Place the text after the <img /> in the document, making sure there is no block level tag (<p>) between the <img /> & the text:

      *This should work*
      <p><img src="myImage" />&amp;nbsp;some text</p>

      or

      <img src="myImage"><span>some text</span>

      *This won't*
      <img src="myImage /><p>some text</p>


    Thats my dos pesos. HTH

  5. #5
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    er, um, isotope, you're right except in your use of XHTML, bro...

    You see your tags are XHTML compliant, in deed, but to be XHTML complaint also means use of CSS which has been prohibited by Conspiracy. It's all moot though and basically, you're right.

    Sketch
    Aaron Brazell
    Technosailor



  6. #6
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I'm right & wrong at the same time? Your starting to sound like my old girlfriend Sketch.

    In my defense, its a habit to code compliant w/ xhtml but I was trying to keep the code sans CSS per Conspiracy's request.

  7. #7
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...and if you don't know what I'm talking about, then I'm not going to tell you!

    Sketch
    Aaron Brazell
    Technosailor



  8. #8
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  9. #9
    SitePoint Zealot Conspiracy's Avatar
    Join Date
    May 2002
    Posts
    159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, people, thanks!!!!!! Much appreciated all the ideas!!!!!!

    Well, it's not that I don't wanna use CSS, It's just that I don't really know how to use it properly, so I prefer to stick to pure HTML that is what I know a bit more. When I read books and stuff, CSS sounds really interesting, but for now it's a bit too much for my little brain!
    But I have tried the thingy with table and it actually worked. I managed to put the text over the image. I did this:

    <TABLE BORDER="0" cellpadding="0" CELLSPACING="0" height="451" width="760">
    <TR>

    <TD WIDTH="932" HEIGHT="449" BACKGROUND="homebackground.JPG" VALIGN="over">
    and then the text. It looks great.

    And when I was thinking better, I thought that maybe to put an image next to a text, I could use table again, one row and two columns, one for the text and one for the image. I guess it should work, right?

    And that was my first post and I gotta say that this place is really cool

  10. #10
    Rehab is for quiters! spartan's Avatar
    Join Date
    Apr 2002
    Location
    Cape Town, South Africa
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    z-index

    anybody played with z-indexes?? would that not be usefull when trying to display text over a image??
    Spartan
    ---------------------
    It's like our sergeant told us before one trip into the jungle. Men! Fifty of you are leaving on a mission. Twenty-five of you ain't coming back.
    -Mr.Payne

  11. #11
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    z-indexes are css...
    Aaron Brazell
    Technosailor



  12. #12
    Rehab is for quiters! spartan's Avatar
    Join Date
    Apr 2002
    Location
    Cape Town, South Africa
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    ...well.. damn
    Spartan
    ---------------------
    It's like our sergeant told us before one trip into the jungle. Men! Fifty of you are leaving on a mission. Twenty-five of you ain't coming back.
    -Mr.Payne

  13. #13
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <TD WIDTH="932" HEIGHT="449" BACKGROUND="homebackground.JPG" VALIGN="over">
    hrm, valign="over" isnīt a valid statement...

    If you want the text to be vertically aligned to the top, you should state this in the TR tag (<tr valign="top">)

    And then you use the TD to make the text start from the left (<td align="left">)
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  14. #14
    SitePoint Zealot Conspiracy's Avatar
    Join Date
    May 2002
    Posts
    159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hhhhmmmm, if "over" isn't valid, so how di it worked??? I guess I was kinda lucky then

    But I'll go back there and change the "over" for "top" like you said, so it will rpobably look better.

  15. #15
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Z-indexes are pretty cool .. I am using them on my current version of my site .. Thats one way of putting text over an image .. not sure why you would want to but hey .. to each his own.

    Chuck
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com


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
  •