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 Coder
    Join Date
    Apr 2013
    Location
    Germany
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Need some background help in HTML

    So I need some help with this:
    I've seen some web pages with backgrounds that are stretched to fit but I really don't know how to make it. Here's my code:
    Code:
    <body style="background-attachment: fixed; background-repeat: no-repeat; background-position: center;" background="my image's link...">
    So can I do it using HTML and not CSS, because my hosting company uses "index.html", not "index.css" and I'm pretty sure that it won't read css (already tried it).

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    no you cant do it without css, css is what controls your styling in the first place. give this a shot: http://css-tricks.com/perfect-full-p...kground-image/

    doesnt support under IE9. if you want to support more browsers there are several javascript options available online

  • Users who have thanked DanInMa for this post:

    Name User (04-29-2013)

  • #3
    New Coder
    Join Date
    Apr 2013
    Location
    Germany
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by DanInMa View Post
    no you cant do it without css, css is what controls your styling in the first place. give this a shot: http://css-tricks.com/perfect-full-p...kground-image/

    doesnt support under IE9. if you want to support more browsers there are several javascript options available online
    And where to put this css code in my html file? It doesn't work if I put it in my "index.html" file and doesn't work if I rename "index.html" to "index.css"...

  • #4
    New Coder
    Join Date
    Apr 2013
    Location
    Germany
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    I've actually solved it. Thanks anyway.


  •  

    Posting Permissions

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