Welcome to TalkGraphics.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2010
    Location
    Michigan, USA
    Posts
    113

    WD6 Repeat Background Image - Horizontally

    Hi

    I created a website in which I repeated the background horizontally (and not vertically). It worked for a long time and after I recently republished the website it no longer works.

    http://beachbodytan-spraytanning.com

    There is supposed to be just one thick black horizontal line across the page.

    Why is the code no longer working?

    <style type="text/css">
    body {background-repeat:repeat-x; background-color:#333333;}
    </style>

    Thanks for your help.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Default Re: Repeat Background Image - Horizontally

    monica, what you seem to have is the following:
    <style type="text/css">
    body {background-repeat:repeat-x; background-color:#FFFFFF;}
    </style>

    as well as:

    <style type="text/css">
    body {background-repeat:repeat-x; background-color:#333333;}
    </style>

    and:

    <body style="background:url('index_htm_files/1.jpg') 0px 0px repeat;">

    The last is in-line and the image 1.jpg is 4px x 500px but is is white/black/white, which is giving you your banding.
    The in-line styling beats the preceding style block.

    You need to delete 1.jpg.

    Acorn

  3. #3
    Join Date
    Aug 2008
    Location
    Canton, GA
    Posts
    666

    Default Re: Repeat Background Image - Horizontally

    Also, "repeat-x" means just horizontally, where "repeat" means both horizontally AND vertically.

    If that helps, I'm glad.

  4. #4
    Join Date
    May 2010
    Location
    Michigan, USA
    Posts
    113

    Default Re: Repeat Background Image - Horizontally

    Sorry for the delay responding - my computer was out of commission for ten days. Yikes!

    Isn't this code generated by Xara so I cannot modify it?

    <body style="background:url('index_htm_files/1.jpg') 0px 0px repeat;">

  5. #5

    Default Re: Repeat Background Image - Horizontally

    You can't edit that code in Web Designer because it doesn't exist at the design level (Web Designer is not a HTML editor).
    That code is written (on export) because you have set an image as the pasteboard background.

    There have been lots of changes to the page and pasteboard behaviour in the latest version, for example - in version 9, if you want an image to be the full width of the browser window horizontally and not vertically also (tiled) then place your image on the (unlocked) 'pasteboard background' layer at the position you want it, right-click and chose 'Fill browser width'

    Click image for larger version. 

Name:	fill-width.jpg 
Views:	205 
Size:	48.8 KB 
ID:	98013

    The result will be:

    Click image for larger version. 

Name:	result.jpg 
Views:	157 
Size:	51.3 KB 
ID:	98014

  6. #6
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,503

    Default Re: Repeat Background Image - Horizontally

    Excellent.

 

 

Tags for this Thread

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
  •