Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Location
    Bournemouth, United Kingdom
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    CSS - Background Image - Full to fit any browser window, no repeat?

    Hi

    What properties are there to fit a background image fully with no repeat for any browser window, so does not look different or any gaps etc when viewed on a netbook and desktop and IE and Firefox for instance ..

    Like this site - (no copyright intended)

    http://ringvemedia.com/

    No silly answers like 'look at their page source' as I have already done this.

    Thanks

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello hcp_123,
    Well... if you do look at the source on that page, you'll see they did this with a table.
    Not my favorite approach.

    I like to do it with jquery like this - http://johnpatrickgiven.com/jquery/background-resize/
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Oct 2011
    Location
    Bournemouth, United Kingdom
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Hello hcp_123,
    Well... if you do look at the source on that page, you'll see they did this with a table.
    Not my favorite approach.

    I like to do it with jquery like this - http://johnpatrickgiven.com/jquery/background-resize/
    Thank you very much!

    I've not used JQuery before, so to simplify things how would I go about doing the table approach?

    Thanks

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by hcp_123 View Post
    Thank you very much!

    I've not used JQuery before, so to simplify things how would I go about doing the table approach?

    Thanks
    See the link about tables in my signature line below.

    Not meaning to make a silly answer but you could look at the example you linked to and see how they did it. Look at what they've put inside <div id="bg">. There is plenty of CSS that styles it too, you would need that as well.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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