Can someone help please?

7 replies
  • WEB DESIGN
  • |
Greetings.

I have a problem that i am trying to solve. I am currently using microsoft frontpage 2005 (i think.) at anyrate what i am trying to accomplish is trying to get the background image from not scrolling along the x & y axis.

Is there some sort of preference that someone can direct me to so that I can get it so my background image will only scroll along the x axis?
  • Profile picture of the author wassim
    Yes, you can accomplish this using CSS.

    go to the Source tab and try to locate where it says:
    <body style="background-image:yourImage.jpg">

    Adjust this bit of code to something like the following:
    <body style="background-image:yourImage.jpg no-repeat;">

    Regards,
    Wassim
    Signature
    {{ DiscussionBoard.errors[152517].message }}
  • Profile picture of the author wassim
    Sorry... I thought you don't want it to repeat in both ways... here is what you should do:

    <body style="background-image:yourImage.jpg repeat-x;">

    Sorry for confusing.

    Regards,
    Wassim
    Signature
    {{ DiscussionBoard.errors[152519].message }}
    • Profile picture of the author mrblack
      I highly recommend that you place the css in a .css external style sheet. This is in your best interest for search engines and is a good step to properly separate your layout from the business logic of your site.

      To do so in the head of your site in a line before the </head> tag include this line to link to an external sheet -
      <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />

      Then create a folder named css in your web root directory and create a file in it titled "style.css".

      In this css file include this block -

      body {
      background: url(../urltobackground-img.jpg) repeat-x;
      }

      This should be all you need for what you have asked. In general you should try to keep your content, code, and layout separated as much as possible. This makes for cleaner, leaner code and makes the content closer to the top of the file where the search engine spiders like it. This also makes the style more available to other pages as you can just include the link tag in each page you desire to share this css with.
      {{ DiscussionBoard.errors[154517].message }}
  • Profile picture of the author onlinemarketer
    here is another one but pretty much thesame like the one above lol

    body {
    background: url('images/stripes.jpg');
    background-repeat: repeat-x;
    }

    the background will only repeat horizontally, just set
    background-repeat
    {{ DiscussionBoard.errors[155142].message }}
  • Profile picture of the author Amsterdam
    You might find CSS Background Properties helpful. Good luck

    T
    {{ DiscussionBoard.errors[157054].message }}
    • Profile picture of the author DanielKemp
      Originally Posted by Amsterdam View Post

      You might find CSS Background Properties helpful. Good luck

      T
      That is a very good resource. Thank you Amsterdam.
      {{ DiscussionBoard.errors[158724].message }}
      • Profile picture of the author plat.success.sys
        I wanted to say thank you to all who have helped me out with this problem. It had worked and thank you again.
        {{ DiscussionBoard.errors[159522].message }}

Trending Topics