Results 1 to 8 of 8

Thread: CSS: Limit repeat-y 2 times

  1. #1
    Fanatic Member
    Join Date
    Jan 05
    Location
    Cebu
    Posts
    605

    CSS: Limit repeat-y 2 times

    Is there any way I can repeat-y something like

    #body {
    background: url(images/body_bg.gif) repeat-y;
    }

    but only 2 times? Thanks.

  2. #2
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,729

    Re: CSS: Limit repeat-y 2 times

    If you mean repeat the image then try:

    Code:
    body {
    background: url("images/body_bg.gif");
    background-repeat: repeat-y2;
         }

  3. #3
    Fanatic Member
    Join Date
    Jan 05
    Location
    Cebu
    Posts
    605

    Re: CSS: Limit repeat-y 2 times

    Guess can't limit the number of times to repeat the image, http://www.webdesignerforum.co.uk/in...showtopic=4020

    And tried here, http://w3schools.com/css/tryit.asp?f...kground-repeat but with no luck. Thanks anyways.

  4. #4
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,729

    Re: CSS: Limit repeat-y 2 times

    What are you trying to do exactly?

  5. #5
    Fanatic Member
    Join Date
    Jan 05
    Location
    Cebu
    Posts
    605

    Re: CSS: Limit repeat-y 2 times

    I was just thinking if I can repeat an image background twice. Coz when I do repeat-y it repeats all the way to the whole width of the page. I was thinking if I could limit it to just, let's say, twice or thrice.

    Anyway, it's said on that forum I posted earlier that I can't limit the number of repeats.

    Thanks!

  6. #6
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,729

    Re: CSS: Limit repeat-y 2 times

    Quote Originally Posted by nebulom
    I was just thinking if I can repeat an image background twice.
    Ah ok!I though that you were wanting to split the page in two then have one half one colour, and the other half other color or something similar.

    I thought if you were doing that you might use:

    html:
    Code:
    <div>Something here</div>
    then have the corresponding .div or #div in the css file depending on the div type in the html.
    Last edited by Nightwalker83; Jul 4th, 2008 at 03:28 AM.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  7. #7
    ASP.NET Moderator mendhak's Avatar
    Join Date
    Feb 02
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,174

    Re: CSS: Limit repeat-y 2 times

    Edit your image and expand it to twice its width with it repeating horizontally. Then use that image once.

  8. #8
    Fanatic Member
    Join Date
    Jan 05
    Location
    Cebu
    Posts
    605

    Re: CSS: Limit repeat-y 2 times

    Thanks. That's what I"m doing.

Posting Permissions

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