Background Image advice

This is a discussion on "Background Image advice" within the Web Page Design section. This forum, and the thread "Background Image advice are both part of the Design Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 24th, 2007, 04:46
Junior Member
Join Date: Jan 2007
Location: philly
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Background Image advice

Can someone advise me on how i might get my "center content" to have a different background color/image and leave the two outer halves the way they already are? I tried wrapping the content in a div wrapper and setting a different bg image but since i have the body tag with an image already in place I think this supersedes any subsequent changes.
My site:
http://www.betagammachapter.com/otherChapters.shtml

Before you say it Ryan Fait I already know this sight doesn't work in Safari. Thanks.
Reply With Quote

  #2 (permalink)  
Old Mar 24th, 2007, 16:26
BGarner's Avatar
Reputable Member
Join Date: Oct 2006
Location: In front of the computer.
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Try this...

Code: Select all
body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 1em;
  color: #000000;
  margin: 0px;
  padding: 0px;
  background: url(../photoshop/backgrounds/goldGradient.jpg);
}

div#wrapper {
  background: url(../"url of your background") repeat-y;
  width: 700px;
  margin: auto;
}
Hope this helps!
Reply With Quote
  #3 (permalink)  
Old Mar 24th, 2007, 18:25
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Haha, I so wanted to say it, too. I'll even forego the snappy comeback this time around.
Reply With Quote
  #4 (permalink)  
Old Mar 27th, 2007, 15:06
Junior Member
Join Date: Jan 2007
Location: philly
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Quote:
Originally Posted by BGarner View Post
Try this...

Code: Select all
body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 1em;
  color: #000000;
  margin: 0px;
  padding: 0px;
  background: url(../photoshop/backgrounds/goldGradient.jpg);
}

div#wrapper {
  background: url(../"url of your background") repeat-y;
  width: 700px;
  margin: auto;
}
Hope this helps!
That did the trick for me. Thank BGarner
And thanks to you Ryan for cutting me some slack. BTW, I don't have access to a safari browser. Is there some other way I can test the functionality in safari?
Reply With Quote
  #5 (permalink)  
Old Mar 27th, 2007, 15:10
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,604
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Background Image advice

http://browsershots.org/
__________________
I've got <style> and .class
Reply With Quote
  #6 (permalink)  
Old Mar 27th, 2007, 22:42
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Well, to be honest, if you used a more standard way of making websites (i.e., the proper way), you wouldn't have this problem. I don't see why you are so opposed to using this code:

Code: Select all
.nav ul {
    background: url(solid-purple-gradient.gif) repeat-x 0 0;
}
.nav li {
    padding: 0 10px;
    background: url(divider.gif) no-repeat 100% 0;
}
It handles resizes and won't get mucked up on text resizes.
Reply With Quote
  #7 (permalink)  
Old Mar 28th, 2007, 14:39
Junior Member
Join Date: Jan 2007
Location: philly
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Quote:
Originally Posted by Ryan Fait View Post
Well, to be honest, if you used a more standard way of making websites (i.e., the proper way), you wouldn't have this problem. I don't see why you are so opposed to using this code:

Code: Select all
.nav ul {
    background: url(solid-purple-gradient.gif) repeat-x 0 0;
}
.nav li {
    padding: 0 10px;
    background: url(divider.gif) no-repeat 100% 0;
}
It handles resizes and won't get mucked up on text resizes.

I'm not as opposed to it as I was before. It was more or less your tone that set me off. I have plans to revisit the menu in a little while. Just so I understand you, Are you recommending I do away with the menu dividers that I currently have? Also, extracting the purple gradient bar from the menu. Right now the bar and the dividers are integrated into the entire image. I think I understand where you're coming from. Maybe I have gotten a better understanding of css in the past month or so. I'll give this a try.

Last edited by dawg9; Mar 28th, 2007 at 18:05.
Reply With Quote
  #8 (permalink)  
Old Mar 29th, 2007, 01:27
Junior Member
Join Date: Jan 2007
Location: philly
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Ryan: I'm struggling a bit with your suggestions. Things still go out of whack when I change the font size.

http://www.betagammachapter.com/welcome.shtml

Sorry about the format below but I didn't see the option tag to post code

Code: Select all
/* Header */
div#headerMenu
{
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
}

div#headerMenu ul
{
    position: absolute;
    list-style-image: none;
    list-style-type: none;
    padding: 0em;
    width: 100%;
    margin: 0em;
    bottom: .3em;
    white-space: nowrap;
    background-image: url(../photoshop/menus/purpleGlassMenuBar.gif);
    background-repeat: repeat-x;
    background-position: 0px 0px;
    height: 2.5em;
}

div#headerMenu ul.level1 li
{
    position: relative;
    float: left;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    white-space: nowrap;
    color: #FFFFFF;
    font-weight: bold;
    background-image: url(../photoshop/menus/menuDivider.gif);
    padding: 0 5px;
    background-repeat: no-repeat;
    background-position: 100% 0px;
}

Last edited by karinne; Mar 30th, 2007 at 15:09. Reason: Please use [code]...[/code] tags when displaying code!
Reply With Quote
  #9 (permalink)  
Old Mar 29th, 2007, 01:32
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

That's right! I apologize if I came off harsh last time; it wasn't my intention. Basically, the background of the ul will be a solid gradient with no dividers in it. Then, you add a divider background to each of the <li>'s. Using that method, font differences between browsers and text resizes will affect the dividers as well as the text.
Reply With Quote
  #10 (permalink)  
Old Mar 29th, 2007, 01:40
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

I'm going to clean this up a little bit for you. Try using this code. Mostly, I converted it shorthand, but I added a few things that should make it sit a little more nicely in the <ul>. Try altering the padding in the <li> if it still doesn't look right.

Code: Select all
#headerMenu ul {
    position: absolute;
    bottom: .3em;
    list-style: none;
    width: 100%;
    height: 2.5em;
    margin: 0;
    padding: 0;
    background: url(../photoshop/menus/purpleGlassMenuBar.gif) repeat-x 0 0;
    white-space: nowrap;
}

#headerMenu ul.level1 li {
    position: relative;
    margin: 0;
    padding: 0 13px 0 10px;
    color: #fff;
    font: bold 1em/2.5em verdana, arial, helvetica, sans-serif;
    float: left;
    white-space: nowrap;
    background: url(../photoshop/menus/menuDivider.gif) no-repeat 100% 50%;
}
And to get the code option, just type [code) and [/code) using this ] instead of ).
Reply With Quote
  #11 (permalink)  
Old Mar 30th, 2007, 18:39
Junior Member
Join Date: Jan 2007
Location: philly
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Thanks for the assistance. I have been working on this quite a bit but I have yet to achieve the desired result. I think I may need to create a class "divider" and modularize the level1 ul because I don't want a divider after the "contact" li.

Also, the dividers are appearing in the level2 submenu items as well. I think I can fix all that by singling out the li's.

It appears to be working with different resolutions but it's still erratic when you change the font size. I'll keep hammering away at this. This new method (the right way) has helped me understand menu work a lot better. Thanks!!!

http://www.betagammachapter.com/welcome.shtml

Code: Select all
div#headerMenu ul.level1
{
    font-size: .75em;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: normal;
    position: absolute;
    width: 700px;
    background-image: url(../photoshop/menus/purpleGlassMenuBar.gif);
    background-repeat: repeat-x;
    background-position: 0 0;
    top: 12em;
    margin-top: 0;
    margin-right: auto;
    margin-left: auto;
}

div#headerMenu ul.level1 li
{
    position: relative;
    margin: 0;
    color: #fff;
    float: left;
    white-space: nowrap;
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 1em;
    line-height: 2.0em;
    font-weight: bold;
    padding: 0 14px 0 10px;
    background: url(../photoshop/menus/menuDivider.gif) no-repeat 100% 50%;
}
Reply With Quote
  #12 (permalink)  
Old Mar 30th, 2007, 20:47
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,604
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Background Image advice

Stupid IntarWeb Screenie...
__________________
I've got <style> and .class
Reply With Quote
  #13 (permalink)  
Old Mar 31st, 2007, 02:12
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Image advice

Code: Select all
.nav li li, .last {
    background: none;
}
Code: Select all
<li class="last"><a href="contact.html">Contact us</a></li>
Reply With Quote
Reply

Tags
background image

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
Seeking advice for switching image. =D mini karen JavaScript Forum 2 Nov 19th, 2007 17:48
'Sample' image overlay advice needed Demon Templates Graphics and 3D 5 Mar 9th, 2007 11:49
Background image overlaping footer image at bottom of div lw_d Web Page Design 4 Mar 21st, 2006 00:27
Background Image jwalker80 Web Page Design 2 Dec 22nd, 2005 14:52
Need help with my background image!!! courtjester Web Page Design 3 Sep 30th, 2003 15:25


All times are GMT. The time now is 02:43.


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