www.webdeveloper.com
Results 1 to 8 of 8

Thread: repeat-x not showing up

  1. #1
    Join Date
    May 2008
    Posts
    27

    repeat-x not showing up

    Hi,

    I'm having problems making an image repeat horizontally. Ironically, the CSS was working fine, but we've recently migrated from a windows server to a linux one and I'm wondering if that might be part of the problem.

    This is the CSS:

    Code:
            
    div.solidLine {
        background: url('http://niche-canada.org/files/images/dash.gif');
        background-repeat: repeat-x;
        height: 5px;
        overflow: hidden;
        margin: 1px 0;
    }
    I previously got this to show a solid line the width of whereever it was placed by inserting:

    Code:
    <div class="solidLine"></div>
    However now it shows absolutely nothing. I've double checked the URL and the image is located there. Anyone have any ideas what the problem might be?

    Thanks

  2. #2
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    Try taking the apostrophes out of the url:
    Code:
    background: url(http://niche-canada.org/files/images/dash.gif);
    FYI
    * My screen resolution is set at 1680x1050
    * I'm accessing your site through a T1 line
    * I'm probably viewing it using Firefox (unless browser is specified)

  3. #3
    Join Date
    May 2008
    Posts
    27
    Thanks for the reply. I've tried removing the apostrophes, but it still isn't showing up. I've also tried using a relative path and even changing it to an image hosted on a different website entirely.

  4. #4
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    try adding "width: 100&#37;;" to see if it shows
    FYI
    * My screen resolution is set at 1680x1050
    * I'm accessing your site through a T1 line
    * I'm probably viewing it using Firefox (unless browser is specified)

  5. #5
    Join Date
    May 2008
    Posts
    27
    Tried adding 100&#37;, but still no luck.

    Incidentally, if I remove the "background-repeat: repeat-x;" the image still doesn't appear, so it seems to be an issue at the first line.

  6. #6
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    Try inserting the image into an HTML page, just to see if it appears (outside of the CSS).
    FYI
    * My screen resolution is set at 1680x1050
    * I'm accessing your site through a T1 line
    * I'm probably viewing it using Firefox (unless browser is specified)

  7. #7
    Join Date
    May 2008
    Posts
    27

    reply

    The image appears fine if I use it directly in an "img" tag.

  8. #8
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    It appears for me, using your code. Try validating your CSS, to see if there could be a parsing error. http://jigsaw.w3.org/css-validator/
    FYI
    * My screen resolution is set at 1680x1050
    * I'm accessing your site through a T1 line
    * I'm probably viewing it using Firefox (unless browser is specified)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles