Welcome to TalkGraphics.com
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    22,052

    Default Re: Background resizing

    A good question Gary! No, I can't find a way to make it work in Xara either. I'll keep at it.
    I think it's down to the code Xara generates for the body section of the page. I don't know how you address this code. I suspect Acorn or Siran may know.
    It works nicely in w3scholl try it as you state. LINK
    Last edited by Egg Bramhill; 14 April 2019 at 11:40 AM.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  2. #2

    Default Re: Background resizing

    Thanks, Egg! I've just managed to solve it. The solution was to use my original code, but, to make it work on Android, I had to add background width and height:

    Code:
    <style>
    html{width:100%; height:100%; background:#ffffff url("http://www.URL-OF-IMAGE") no-repeat bottom right fixed;background-size:contain}
    </style>
    Thanks for your help with this. Now I just need to find a solution to making my site display at the left, rather than centre, of the browser window -- which I've asked about in a separate thread -- and then I'll be all set!

  3. #3

    Default Re: Background resizing

    I've now it another problem. The code I've posted above works when you only have one variant. But as soon as you add multiple variants to the site, then a full-width white background appears, the same height as the page, and it obscures the image in the background!

  4. #4

    Default Re: Background resizing

    Finally, I think I've fixed it! The answer was to use your code with some modifications, Egg:

    Code:
    <style>
    html {
    width: 100% !important;
    height: 100% !important;
    }
    body {
    background-image: url('http://www.URL OF IMAGE') !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-position: right bottom !important; 
    background-size: contain !important;
    }
    </style>

  5. #5
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    22,052

    Default Re: Background resizing

    That's looking better but to me the image is right aligned to the pasteboard, not the page. ???
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  6. #6

    Default Re: Background resizing

    Quote Originally Posted by Egg Bramhill View Post
    That's looking better but to me the image is right aligned to the pasteboard, not the page. ???
    Thanks, Egg. Yes, I wanted the image aligned to the right of the pasteboard (i.e. browser window). I think it should be possible to apply it to the page, though, if that's what you need.

 

 

Bookmarks

Posting Permissions

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