css and positioning images repeating

Discussion in 'HTML' started by Peter, Mar 26, 2006.

  1. Peter

    Peter Guest

    Hi, apologies if this is not the correct group. I'm new to this and
    alt.html seemed the most active relevant group that I looked at.


    Here is my problem. I have a single line in a browser window and I
    would like to display at least two images next to each other. The first
    image "1.bmp" contains a graphic. The second image "2.bmp" is just the
    background of "1.bmp" that I would like to carry on to the right
    margin. The second image "2.bmp" is the same height as "1.bmp" but it
    is very narrow. So in the browser the images would be displayed
    "122222222222222222" with "2", which is "2.bmp", repeating to the right
    hand margin.


    This is what I have working so far/the html code.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="content-type" content="text/html;
    charset=iso-8859-1" />

    <style type="text/css" media="screen">

    body
    {
    background: white url("2.bmp");
    background-repeat: repeat-x;
    }

    </style>
    </head>

    <body>
    test<br/>test<br/>test<br/>test<br/>test<br/>test
    </body>
    </html>



    "2.bmp" repeats over and over for the entire line in the browser window
    which is what I want. I can't find out how to put in "1.bmp" at the
    left hand side though? I think I could do this by putting "1.bmp" in a
    table column and putting a very wide "2.bmp" in another column. But
    this feels cowboy, my code will be reviewed, and I want to do it
    correctly anyway. I would appreciate some help if you can.

    Thank you
    Peter
     
    Peter, Mar 26, 2006
    #1
    1. Advertising

  2. Peter

    Peter Guest

    I told you I was new. Sorry, wrong group. I have reposted to the right
    group comp.infosystems.www.authoring.stylesheets now.

    Thank you
    Peter
     
    Peter, Mar 26, 2006
    #2
    1. Advertising

  3. Peter wrote:
    > Hi, apologies if this is not the correct group. I'm new to this and
    > alt.html seemed the most active relevant group that I looked at.
    >
    >
    > Here is my problem. I have a single line in a browser window and I
    > would like to display at least two images next to each other. The first
    > image "1.bmp" contains a graphic. The second image "2.bmp" is just the
    > background of "1.bmp" that I would like to carry on to the right
    > margin. The second image "2.bmp" is the same height as "1.bmp" but it
    > is very narrow. So in the browser the images would be displayed
    > "122222222222222222" with "2", which is "2.bmp", repeating to the right
    > hand margin.
    >


    First of all Peter do not use BMP format for images on the web (BMP is
    for Windows format fro use on your own hard drive not the Web) Use JPG,
    GIF and maybe PNG.

    The background is easy

    <style type="text/css" media="screen">
    body {
    background: white url(MyBackground.jpg) repeat-x;
    }
    </style>

    Then all you have to to is have your featured image in an image element

    <body>
    <img src="MyFeaturedImage.jpg" alt="The picture">
    ...
    rest of your page...




    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Mar 26, 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. Eric

    Datalist and CSS positioning

    Eric, Sep 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    565
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=
    Sep 14, 2005
  2. KatB
    Replies:
    8
    Views:
    4,194
  3. Replies:
    5
    Views:
    444
    Toby Inkster
    Aug 11, 2005
  4. Knut Krueger

    CSS positioning images

    Knut Krueger, May 18, 2006, in forum: HTML
    Replies:
    0
    Views:
    364
    Knut Krueger
    May 18, 2006
  5. Replies:
    2
    Views:
    136
    Adrienne Boswell
    Apr 23, 2007
Loading...

Share This Page