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 Image Won't Repeat
Old 05-30-2009, 10:38 PM CSS Background Image Won't Repeat
Skilled Talker

Posts: 56
Trades: 0
I am trying to make collumns by first using a div to collect them all and place a background image that will make dividers for the columns. The problem is that it will only show a little of the picture that is the divider. unless i have the content inside the main div outside of their own classes. My goal is to have the height of the main div set automatically, same with the classes inside it. Here is my style
Code:
.gamecol {           
	float:left;     
	width:150px;
}

#col {
	background:url('col bg.png');
	width:475px;	
	padding-right:10px;
	height:auto;
	background-repeat: repeat;
	margin-right:auto;
	margin-left:auto;
}
I atached a screenshot. If you need the HTML just ask and i'll give it to you.
Attached Images
File Type: jpg dividerscreenshot.JPG (17.3 KB, 5 views)
__________________

Please login or register to view this content. Registration is FREE
Free Online Games
pcmaster160 is offline
Reply With Quote
View Public Profile Visit pcmaster160's homepage!
 
 
Register now for full access!
Old 05-30-2009, 10:49 PM Re: CSS Background Image Won't Repeat
World's Avatar
Extreme Talker

Posts: 202
Location: Santa Monica, CA
Trades: 0
You need to tell the browser via CSS where to repeat, horizontal or vertical.

Your CSS should regarding the background image should look like this:

Code:
#col {
background-image: url('col bg.png') repeat-x;
}
PS: are you sure the url of your background image is correct? As far as I know you have to give a relative path to the image (if you are using an image that is stored with the other site info on the server).
World is offline
Reply With Quote
View Public Profile
 
Old 05-30-2009, 10:52 PM Re: CSS Background Image Won't Repeat
Skilled Talker

Posts: 56
Trades: 0
yes i'm sure the link is correct and its on my server. wouldn't using background-repeat: repeat; work fine just as i used above, because i want it to repeat x and y. And either way it didn't work.
__________________

Please login or register to view this content. Registration is FREE
Free Online Games

Last edited by pcmaster160; 05-30-2009 at 11:54 PM..
pcmaster160 is offline
Reply With Quote
View Public Profile Visit pcmaster160's homepage!
 
Old 05-31-2009, 10:47 AM Re: CSS Background Image Won't Repeat
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
background-image: url('col bg.png') repeat-x;
Actually, when you add additional properties, it would be like this:

Quote:
background: url(colbg.png) repeat-x;
Quote:
wouldn't using background-repeat: repeat;
Unnecssary, the default is to REPEAT, so if you don't specify a direction, or repeat at all, it will repeat by default.

I suspect your problem is that you have not CLEARED your floats. See our stickies for info on clearing floats.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-31-2009, 11:06 AM Re: CSS Background Image Won't Repeat
Skilled Talker

Posts: 56
Trades: 0
Thanks, it worked!
__________________

Please login or register to view this content. Registration is FREE
Free Online Games
pcmaster160 is offline
Reply With Quote
View Public Profile Visit pcmaster160's homepage!
 
Reply     « Reply to CSS Background Image Won't Repeat
 

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.35280 seconds with 13 queries