Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
CSS background problem
Old 09-02-2005, 01:42 PM CSS background problem
fancymoustache's Avatar
Ultra Talker

Posts: 316
Location: Michigan
Trades: 0
The only background attribute that seems to work with me is just the background-color attribute. Shouldn't background-image work, too?

CSS
Code:
body {
	cursor:default;
	background:#FFFFFF;
}

#header_background {
	width:780px;
	height:180px;
	margin:0px auto 0px auto;
	background-image:url(images/header.jpg);
	background-repeat:no-repeat;
	background-position:5px;
	background-color:#996633;
}
HTML
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" media="all" href="design/style.css" />
<title>
{title}
</title>
</head>
<body>
  <div id="header_background"></div>
</body>
</html>
__________________
For over a thousand generations, the Jedi Knights were the guardians of peace and justice in the Old Republic. Before the dark times, before the Empire.
fancymoustache is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-02-2005, 01:53 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
it would work provided that images/ was a sub-folder of design/ but as it probably isn't it won't
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-02-2005, 02:06 PM
fancymoustache's Avatar
Ultra Talker

Posts: 316
Location: Michigan
Trades: 0
I tried background-image:url(/images/header.jpg); to test that, but I always forget that i need ../, rather than just /

thanks for your help, Chris
__________________
For over a thousand generations, the Jedi Knights were the guardians of peace and justice in the Old Republic. Before the dark times, before the Empire.
fancymoustache is offline
Reply With Quote
View Public Profile
 
Old 09-02-2005, 03:32 PM
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Trades: 1
you should actully use
Code:
#header_background {
	width:780px;
	height:180px;
	margin:0px auto 0px auto;
	background: url(images/header.jpg) no-repeat 5px 0px 0px 0px;
	}
if you have a color, and an image, then the image will overide the color so there is no point to have the color
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
Old 09-02-2005, 03:45 PM
fancymoustache's Avatar
Ultra Talker

Posts: 316
Location: Michigan
Trades: 0
1) I was just using the many different background attributes, just for testing purposes. I have since changed them into one background:;

2) My background is larger than the image. Thats why I don't have it repeat, and I have it moved over 5px and down 5px. The image is 770px, so I left, top and right border of 5px, with some space at the bottom.

Thanks, though.
__________________
For over a thousand generations, the Jedi Knights were the guardians of peace and justice in the Old Republic. Before the dark times, before the Empire.
fancymoustache is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS background problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15512 seconds with 12 queries