Results 1 to 2 of 2

Thread: Can you get an image to repeat without making it the background to a container?

  1. #1
    Join Date
    Nov 2006
    Posts
    53

    Can you get an image to repeat without making it the background to a container?

    I'm trying to build a container code snippet so that I can reuse it on later project. So far I have it so there is a top of fixed width, also with a bottom. Then I have the sides which I would like to grow to whatever length is required to match the text, as well as the background.

    Getting the top placed is easy, now I'm trying to get the left side placed and I'm running into trouble. How do I get the side to stretch down to fill the container? After I get the sides I figured I'd just have a separate <div> for the text to which I would apply the gradient background, that seems easy enough. Then more headaches can follow from that point.

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    Then I have the sides which I would like to grow to whatever length is required to match the text, as well as the background.
    There are several methods to drag down the side borders/images to the same height as a middle content div, See items 17 and 18 here:-
    http://www.wickham43.net/firefoxbackground.php

    In some examples the two side divs are wide, but could be narrow with just a border image or color.

    Also items 12 and 13 here:-
    http://www.wickham43.net/specialeffects.php
    (Item 13b uses the same nesting code as item 17a on the previous link).
    You need to be careful calculating the widths of the divs.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Page container and Image layer troubles
    By creat3tertiary in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 12 Aug 2008, 11:35 AM
  2. css background image alignment only works for IE
    By pokinski in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 06 Feb 2007, 08:24 AM

Posting Permissions

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