Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    264
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Repeating a pattern

    I have a pattern:


    and I wish it to repeat so that it doesnt look wierd. I just want diagonal lines all the way in the background. How can I do this with CSS?

  • #2
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,519
    Thanks
    114
    Thanked 110 Times in 109 Posts
    Hi have you tried

    Code:
    <style>
     .patterned
    {
     background-image:url(path_to_image.gif);
     width:100%;
     height:20px;
    }
    </style>
    
    <div class="patterned"></div>
    By default in css background images are repeated
    You can not say you know how to do something, until you can teach it to someone else.

  • Users who have thanked timgolding for this post:

    IFeelYourPain (05-09-2009)

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Posts
    264
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by timgolding View Post
    Hi have you tried

    Code:
    <style>
     .patterned
    {
     background-image:url(path_to_image.gif);
     width:100%;
     height:20px;
    }
    </style>
    
    <div class="patterned"></div>
    By default in css background images are repeated
    Thanks


  •  

    Posting Permissions

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