Image set up in a web page

Discussion in 'HTML & Website Design' started by shoaeeb, Dec 9, 2007.

  1. #1
    Can any one help me how to set up an image in a web page which will cover the full area of the screen without adding any dimension indication in the html code.
     
    shoaeeb, Dec 9, 2007 IP
  2. jjpmarketing

    jjpmarketing Peon

    Messages:
    733
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I believe if you are using the image tag that you can add a span or stretch attribute of some sort. I don't know for sure though. You can also use the background attribute that will just put the image at whatever size the browser is. I don't remember right off hand how to do all of this, but if you check out W3Schools.com and HTMLGoodies.com you should be able to find the info on how to do this.
     
    jjpmarketing, Dec 9, 2007 IP
  3. markyd

    markyd Active Member

    Messages:
    1,919
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    90
    #3
    you should do it with css, not img tags IMO....
     
    markyd, Dec 9, 2007 IP
  4. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    In your html reference to an external css file.

    Example (in your header script):

    <link rel="stylesheet" type="text/css" href="css/myTemplate.css" />
    HTML:

    In that file, do something like:

    
    
    .special_image{
    height: 100%;
    width: 100%;
    }
    
    
    HTML:

    Then in your HTML:

    <img src="images/your_image.jpg" class="special_image" />
    HTML:




    It depends on what you are doing, but if you want a tiling background image I suggest you get an image which does tile properly, and set it as a background image in your css. Then add the "repeat" to it.
     
    Noddegamra, Dec 10, 2007 IP