[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.


 Subscribe in a reader

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

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Sep 29th, 2007, 12:31
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Sep 29th, 2007, 12:46
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: CSS Background Repeat

could you host this on freewebs or something please
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
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
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old Sep 29th, 2007, 13:06
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #11  
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
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;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #12  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #13  
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
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #14  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #15  
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
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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #16  
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #17  
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
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #18  
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #19  
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
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!