www.webdeveloper.com
Results 1 to 5 of 5

Thread: Stretch a top banner Image

Hybrid View

  1. #1
    Join Date
    May 2010
    Posts
    36

    Stretch a top banner Image

    I need to stretch my banner Image at the top of the page to the whole of the page. The development computer on which I was working for this site displayed it correctly.

    Today when I opened the code in another compter the top banner image didn't display itself for the whole of the page. It just contracted to the left side. I am wondering how do do it.

    well I used background-image:100% but that didn't work(CSS3 compatibility issues).

    Anytips to stretch this top banner to the whole of the page in every computer is welcome

  2. #2
    Join Date
    Feb 2010
    Posts
    39
    Although the background image width and height can't be manipulated via CSS2, you can simply make the background image an absolutely positioned element and then do

    Code:
    img {height: 100px;  width:100%;}
    Or whatever percentages/values you want for the situation

  3. #3
    Join Date
    May 2010
    Posts
    36
    Well I managed to change the dimensions of the image, using simple width and height attributes inside html. but when I transfer the code to another pc, it didn't work for me. So I was wondering how the image will be treated by different pc's when my site goes live.

    Thanks for the information.

  4. #4
    Join Date
    Feb 2010
    Posts
    39
    And you were using the exact same browsers on each PC?

  5. #5
    Join Date
    May 2010
    Posts
    36
    I tried it in all the 3 major browsers, In my first pc It worked well in IE, firefox and Chrome, the pc on whicj I wrote the code, Now when I migrated the same code to pc 2, it didn't work in any of the 3 browsers as it was working in pc 1.

    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles