Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
  1. #1
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    Just a quick simple question,

    If you were using images that had been sliced from photoshop and then saved as a html document etc, delete the image you want to use for content and replace it with text. Some times if you put to much content in as many of you may well know, it stretches and breaks the design.

    I am sure I have seen a code before that will automatically repeat certain images.

    If so could someone please let me know what it is. I think there is a CSS code that you can use to repeat images.

    Any help if appreciated.

    Thank you,
    Daniel.

  2.  

  3. #2
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    Make sure that your content is inside a "td" or "div", which can accept a background-image property. Then use this CSS code to change that tag's properties:
    Code:
    background-image: url(pic.gif);   The picture 
    
    Repeat Options:
    
    background-repeat: repeat-x;  repeat horizontally only
    background-repeat: repeat-y;  repeat vertically only
    background-repeat: no-repeat; 
    background-repeat: repeat; repeat horizontally and vertically
    There and Back Again :Ogre:

  4. #3
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    ah thanks,

    isnt there one for just images aswell? Because photoshop automatically puts them into the document, and they arent really back ground images, is it worth just deleting them and putting background images? I guess it isn't much trouble doing so.

  5. #4
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    if there is a pattern in the image that photoshop put in, I usually replace it with 2px high (or 2px wide, depending on it location) slice of the same image. It will save you some bandwidth.
    There and Back Again :Ogre:

  6. #5
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    so you suggest making a smaller image to repeat when it breaks?

  7. #6
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    That is correct. I've attached a simple pic to illustrate my point. You can use "A", but "B" will get you the same effect if it is used properly.
    Attached Images Attached Images
    There and Back Again :Ogre:

  8. #7
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    The code I have is here...
    <TD width="10" ROWSPAN=2> <IMG SRC="nameofimage.jpg" WIDTH=10 HEIGHT=394 ALT=""></TD>
    How would Iget it so that the big image is used like so above but then to get the smaller to repeat?

    I am using the images for the side of the content box. So they are sort of borders if you like. So it is the sides that are stretching. (just to make it clearer)

    (sorry about making a real meal out of this but usually I thought I better learn to do it properly)
    Aprreciate you wasting your time to help.

  9. #8
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    Code:
    <TD width="10" ROWSPAN=2 background="nameofimage.jpg">&nbsp;</TD>
    cut out nameofimage.jpg to something small and it will automatically repate.

    Also, photoshop/image ready creates horrible HTML.
    There and Back Again :Ogre:

  10. #9
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    where abouts would i put the repeating code in relation to the above though?

  11. #10
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    you don't need the CSS code in this case, "background" attribute in <td> will do the same thing.

    If you do want the css, place it like this:

    Code:
    place in the <head> tag
    <style>
    td.repeat {
      background-image: url(nameofimage.jpg);
      background-repeat: repeat-y;
    }
    </style>
    
    HTML code
    <TD width="10" ROWSPAN=2 CLASS="repeat">&amp;nbsp;</TD>
    There and Back Again :Ogre:


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:05 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com