Move image1.jpg leftmost and imag2e.jpg rightmost on a page???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason Stacy

    Move image1.jpg leftmost and imag2e.jpg rightmost on a page???

    On a webpage I would like to move image1.jpg as left as possible (directly to the browser window left border)
    and - simultaneously - the picture image2.jpg to the rightmost (directly to the right browser window border).

    How do I code this in HTML resp. CSS?

    If the user shrinks the browser window to a size which is smaller than the sum of the size
    of the two images image1.jpg + image2.jpg then all browser tend to position these pictures
    vertically. But: I don't want a "line wrap". If the horizontal size doesn't fit then
    the right picture image.jpg should be truncated.

    Is there a solution for this?

    Jason

  • Mark Tranchant

    #2
    Re: Move image1.jpg leftmost and imag2e.jpg rightmost on a page???

    Jason Stacy wrote:
    [color=blue]
    > On a webpage I would like to move image1.jpg as left as possible (directly to the browser window left border)
    > and - simultaneously - the picture image2.jpg to the rightmost (directly to the right browser window border).
    >
    > How do I code this in HTML resp. CSS?
    >
    > If the user shrinks the browser window to a size which is smaller than the sum of the size
    > of the two images image1.jpg + image2.jpg then all browser tend to position these pictures
    > vertically. But: I don't want a "line wrap". If the horizontal size doesn't fit then
    > the right picture image.jpg should be truncated.
    >
    > Is there a solution for this?[/color]

    Absolute positioning.

    <div style="position : absolute; top: 0; right: 0; width: 200px;"><img
    src="..."></div>
    <div style="position : absolute; top: 0; left: 0; width: 200px;"><img
    src="..."></div>

    should do it (untested) for 200px-wide images. Of course, style
    information should be in a separate style sheet rather than inline.

    Note that I put the right image first in the source, to achieve your
    requirement that it goes "under" the left image - I presume that's what
    you intend when you say "truncate".

    If you want these to be relative to a containing element rather than the
    browser window, put them inside a <div> with position: relative set.

    --
    Mark.

    Comment

    • Ivo

      #3
      Re: Move image1.jpg leftmost and imag2e.jpg rightmost on a page???

      "Jason Stacy" <jjstacy@yahoo. net> wrote in message
      news:ceo43i$2r5 $00$1@news.t-online.com...[color=blue]
      > On a webpage I would like to move image1.jpg as left as possible (directly[/color]
      to the browser window left border)[color=blue]
      > and - simultaneously - the picture image2.jpg to the rightmost (directly[/color]
      to the right browser window border).[color=blue]
      >
      > How do I code this in HTML resp. CSS?
      >
      > If the user shrinks the browser window to a size which is smaller than the[/color]
      sum of the size[color=blue]
      > of the two images image1.jpg + image2.jpg then all browser tend to[/color]
      position these pictures[color=blue]
      > vertically. But: I don't want a "line wrap". If the horizontal size[/color]
      doesn't fit then[color=blue]
      > the right picture image.jpg should be truncated.
      >[/color]

      There are many ways to do this using CSS. One possibility is this:
      [quote cite=http://www.vansandick. com/archief/]
      <div>
      <img src="CI2a.jpg" alt="label" id="label" width="560" height="340"
      border="0"
      style="position :absolute">
      <img src="CI7.jpg" alt="label" id="label" width="900" height="340"
      border="0"
      style="float:ri ght">
      </div>
      [/quote]

      --
      Iv


      Comment

      Working...