[SOLVED] CSS Background Repeat

This is a discussion on "[SOLVED] CSS Background Repeat" within the Web Page Design section. This forum, and the thread "[SOLVED] CSS Background Repeat are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 29th, 2007, 12:20
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] CSS Background Repeat

Hi,

I am having some trouble with setting a background image to repeat-y. My code is (div on page):
Code: Select all
background: #f0eee4 url(sectionnav_bg.gif) repeat-y center;
The background image looks like this:

Here is a modified version to see it better:

Blue is really white, Gray is really a spacer.

The correct result in Internet Explorer is a white bar below the navigation (top left) that continues to the end of the page:


But then comes my problem - Firefox and Safari...
What is a white bar in IE is a gray empty field in Firefox and Safari:



I have yet to figure out what is causing this. If anyone can help me out, it would be greatly appreciated.

Thanks,
SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)

Last edited by Stuart; Sep 29th, 2007 at 12:35.

  #2 (permalink)  
Old Sep 29th, 2007, 12:31
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: CSS Background Repeat

try setting it out in longhand.
background-color: #frddffd;
background-reapeat: repeat-y;
etc...
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
  #3 (permalink)  
Old Sep 29th, 2007, 12:37
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

Thanks Alexgeek,
I'll try that...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #4 (permalink)  
Old Sep 29th, 2007, 12:43
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

Hi,
I tried the longhand. It didn't work...
Take a look:


Please reply,
SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #5 (permalink)  
Old Sep 29th, 2007, 12:46
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: CSS Background Repeat

could you host this on freewebs or something please
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
  #6 (permalink)  
Old Sep 29th, 2007, 12:48
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Blake121
Re: CSS Background Repeat

You could try this?

Code: Select all
background: #f0eee4 url('sectionnav_bg.gif') repeat-y top center;
Also make sure you validate your code
  #7 (permalink)  
Old Sep 29th, 2007, 12:52
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

Sorry... again, didn't do it.
Back to the beginning:
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #8 (permalink)  
Old Sep 29th, 2007, 13:02
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

Here is my complete code:

Code: Select all
#section-navigation {
    float: left;
    margin: 0 0 100px 0;
    padding: 0;
    clear: left;
    width: 200px;
    background: #ffffff url(sectionnav_bg.gif) repeat-y top center;
    }
Maybe that will help...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #9 (permalink)  
Old Sep 29th, 2007, 13:06
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: CSS Background Repeat

Make a freewebs account and host all your files on there
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
  #10 (permalink)  
Old Sep 29th, 2007, 13:07
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

Will that help?
I already have something similar.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #11 (permalink)  
Old Sep 29th, 2007, 13:22
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Blake121
Re: CSS Background Repeat

It's just so we can have a link to the page. It helps a lot.

But back to the problem....

Have you cleared your divs properly?

IE usually does it for you so that may be why it's only working in that browser.

Have some thing like this on your footer (or last) div.

Code: Select all
#footer {
  clear:both;
}
  #12 (permalink)  
Old Sep 29th, 2007, 13:28
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

Blake, thanks for the tip, but it does not seem to be doing anything...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #13 (permalink)  
Old Sep 29th, 2007, 13:29
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Blake121
Re: CSS Background Repeat

hmmmm.... Can we have a link please?

I'm really not sure what it is.

Are you sure all HTML and CSS is valid?
  #14 (permalink)  
Old Sep 29th, 2007, 13:52
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

Here is the link:
Go there
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #15 (permalink)  
Old Sep 29th, 2007, 13:59
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Blake121
Re: CSS Background Repeat

Right... well you have to validate your code!

(http://validator.w3.org/check?verbos...lab%2Ftemp.htm)

There is a line of invalid code right on the problem area

Code: Select all
"<li><a href="javascript:;" class="current">View & Download Files</a></li>"
should be

Code: Select all
<li><a href="javascript:;" class="current">View &amp; Download Files</a></li>
  #16 (permalink)  
Old Sep 29th, 2007, 14:00
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

I have validated all html and css - no errors whatsoever...
I changed it to
&amp;
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
  #17 (permalink)  
Old Sep 29th, 2007, 14:01
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Blake121
Re: CSS Background Repeat

No... you have 5 HTML errors. Check the link.

I even gave you one error and a fix.

Also you could try this:

Code: Select all
<div id="section-navigation">
    <ul>
        <li><a href="javascript:;" class="current">View & Download Files</a></li>
        <li><a href="javascript:;">Upload Files</a></li>
    </ul>
    <br style="clear: both;" />
</div>

Last edited by Blake121; Sep 29th, 2007 at 14:03.
  #18 (permalink)  
Old Sep 29th, 2007, 14:08
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

All clear - successfully validated!
However, no change in appearance (Firefox)
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)

Last edited by Stuart; Sep 29th, 2007 at 14:14.
  #19 (permalink)  
Old Sep 29th, 2007, 14:16
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Blake121
Re: CSS Background Repeat

Hmmm... I'm not sure then. I'm better off with PHP to be honest lol.

Try these, but if they don't work I know one of our CSS experts will be able to help you. They should be on soon.

Code: Select all
</div>
<br style="clear:both;" />
</div><!-- end content -->
Also Try switching your background line onto the #main div

Code: Select all
#main {
    float: right;
    padding: 20px 0;
    width: 100%; 
    background: #ffffff url('/research/wagnerlab/images/sectionnav_bg.gif') repeat-y top center;
    }
Also check some of these out:

http://www.alistapart.com/articles/fauxcolumns/
http://www.ilovejackdaniels.com/css/...iquid-layouts/
http://webdesign.about.com/od/freewe...bl2colfaux.htm

Last edited by Blake121; Sep 29th, 2007 at 14:22.
  #20 (permalink)  
Old Sep 29th, 2007, 14:37
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Background Repeat

I think the br clear:both; did it.

Thanks for all your help!
SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)

Last edited by Stuart; Sep 29th, 2007 at 15:15.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
ie 6 background-repeat does not work AndrewChip Web Page Design 3 May 4th, 2008 10:19
[SOLVED] Background Image Help RZX Developer Web Page Design 4 Dec 12th, 2007 09:39
[SOLVED] Background Images admiral1977 Starting Out 6 Oct 29th, 2007 15:31
background-repeat: repeat y not working properly AdRock Web Page Design 12 Feb 25th, 2007 22:17
repeat a horizontally centered background image Legacy_Staff Web Page Design 12 Jul 14th, 2006 20:23


All times are GMT. The time now is 21:59.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43