#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    Toronto
    Posts
    16
    Rep Power
    0

    image placement using CSS


    I have the following situation:
    <body>
    some text with no css associated with it just aligned LEFT

    <img> some image with a css selector that is as follows:
    h3{position: relative;
    left: 60%;
    top: 0%;}

    <table> a table of 1 row with two cells (50% widths)
    ....
    </body>
    I do not want to add any css stuff to the text or the table nor change their HTML tags/properties.
    With the relative style the img is placed 'under' the text (60% to the left which is what I need)but I want it to be on the top of the page immediately to the right of the left aligned text. If I use absolute positioning for the img it covers the contents of the table. Is there a way to 'push' the table to just below the image remembering that my only option at this point is playing around with that h3 style only.

    can anybody help me out?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Australia
    Posts
    111
    Rep Power
    15
    What about putting the image inside the table?

    wabirdman
    Real programmers code in binary
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    25
    Try this in the img tag:

    style="float:right"

    it could be what you're after. It will align the image to the right of the screen and wrap the text along side it.

IMN logo majestic logo threadwatch logo seochat tools logo