How to make image repeat in HTML?

Discussion in 'HTML & Website Design' started by Blasko93, Sep 19, 2013.

  1. #1
    I would like to make an image repeat horizontally and in the same time it's position to be relative! I am using Microsoft Expression Web but somehow I couldn't make it. Can someone help here? :)

    Here is my code:

    <div style="position: relative; width: 100px; height: 42px; z-index: 10000; left: -270px; top: -55px" id="layer3">
    <img src="../22find%20in%20US/Lenta/Heder01.png" width="1350" height="80"></div>

    Thank you!
     
    Blasko93, Sep 19, 2013 IP
  2. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #2
    For the love of God, put the style into its own CSS file, or at least put it into the head section.
     
    GMF, Sep 20, 2013 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    What GMF is trying to say is on the right track. It LOOKS like that image is presentation. If so it has NO MALFING BUSINESS IN A IMG TAG!

    Much less all that positioning nonsense inlined in the markup for **** knows what.

    Hard to say without seeing the rest of your code, but if this is indicative of what you're doing ... you're doing it ALL WRONG. Of course you are using the stupid malfing broken haltwit WYSIWYG known as "Web Expression" -- which makes the steaming pile of manure known as Dreamweaver look good. The ONLY thing you can learn from idiotic rubbish tools like those is how NOT to build a website! They are at best a sleazy shortcut, and at worst, a blight upon the Internet that needs some serious radiation therapy and chemo to deal with it.

    Seriously, Web Expression, Frontpage, Dreamweaver -- it's Cancer.

    @kusumverma -- do the world a favor, and learn how/what HTML is before trying to help people, and posting 100% gibberish in the process. Repeat is NOT part of the filename, and there is no way to do repeat on a IMG tag.
     
    deathshadow, Sep 20, 2013 IP
  4. giulio_74

    giulio_74 Well-Known Member

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    106
    Digital Goods:
    1
    Articles:
    4
    #4
    uses the image as the background of div or body then in css
    Include the image in horizontal and repeat
    if you do not want to create a css file include it in style
    <div style = "background-image: url ('img1.png');background-repeat: repeat-x; "

    by a look here http://www.w3schools.com/css/css_background.asp

    Hope that useful.
     
    giulio_74, Sep 22, 2013 IP