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
Old 05-25-2010, 10:22 AM repeat - y?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
hi,

why repeat function isn't working at one of my image but working at other in same file.

not working :

Code:
background: url(images/gradient.jpg) repeat-y
for which working:

Code:
background: #ffffff url(images/wrapper.png) repeat-y;
I have noticed that by adding color it works, is it correct? If yes then why?
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam

Last edited by asmalik12; 05-25-2010 at 10:24 AM..
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
 
Register now for full access!
Old 05-25-2010, 11:12 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Well, firstly, the first statement is missing the semi colon ( ; ), unless it is the last item in your class/id etc then it will need it.

You are working with a CSS shorthand technique, you dont always have to define all parts of the shorthand to make it work, example:

Margin shorthand will normally need all parts to function how you want it:

Code:
.exampleClass {
      margin: 5px 10px; /* Shorthand (top and bottom, left and right */
      margin: 5px 10px 5px 10px;  /* "long" shorthand (top, right, bottom, left */

      /* Normal */
      margin-top: 5px;
      margin-right: 10px;
      margin-bottom: 5px;
      margin-left: 10px;
}
With your background property, you can use:

Code:
.exampleClass {
      background: #fff url(images/image.jpg) no-repeat left top;
      /* or */
      background: #fff;
      /* or */
      background: #fff url(images/image.jpg);
      /* or */
       background: url(images/image.jpg) 100% bottom;
      /* etc etc etc, the list goes on */
}
Read here: http://articles.sitepoint.com/articl...-css-shorthand for more info on CSS shorthand.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-25-2010, 12:09 PM Re: repeat - y?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
well, i have done a mistake there, colon( ; ) is there in original code but still it isn't working. The other function is also a good one but at the moment I need this one.
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam

Last edited by asmalik12; 05-25-2010 at 12:12 PM..
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 05-25-2010, 12:17 PM Re: repeat - y?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
let's see ALL the code.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-26-2010, 03:13 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Quote:
Originally Posted by chrishirst View Post
let's see ALL the code.
This would certainly help.

Other obvious causes could be that the image isnt present or that the file name is different to what it should be, i.e. typo in the attual file name etc
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-26-2010, 03:48 AM Re: repeat - y?
Trim's Avatar
Average Talker

Posts: 22
Location: Europe
Trades: 0
Do you have any height/width for section with this bg ? When you set bg img in CSS your section need some measurements if there is no content.

Otherwise show us code as we are blind atm.
__________________

Please login or register to view this content. Registration is FREE
- Portfolio & Blog || Drop me a line via any contact form if you need (x)HTML/CSS coding. I also do MODx and Wordpress integrations. :coffee:
Trim is offline
Reply With Quote
View Public Profile
 
Old 05-26-2010, 05:57 AM Re: repeat - y?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
here is the link to the page :

Cricpak

here is the full code :

Code:
body {
	background: #ffffff url(images/gradient.jpg) repeat-y;
	width: 982px;
	color: #333333;
	font-size: 11px;
	font-family: Arial, Tahoma, Verdana;
	margin: 0px auto 0px;
	padding: 0px;
	}
img location here :

http://www.cricpak.5gigs.net/wp/wp-c...s/gradient.jpg
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 05-26-2010, 06:05 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Strangly, without repeat-y the image is applying correctly. Its only once you put the repeat-y that it decides not to, in fire fox atleast.

If you place this in your body class it works but you have an underlying issue that should be fixed.

Code:
background: #ffffff url("images/gradient.jpg") 0 0;
Also, the image has a big grey gradient at the bottom, is this correct? ifso then im not sure white is the background colour your going to want.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-26-2010, 09:39 AM Re: repeat - y?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
oh yeah! i just added coz i thought that the issue is with the color.

what's underlying?
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 05-26-2010, 09:54 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Sorry i really suck at english written skills.

By underlying i mean, there is a problem some where since repeat-y should be working but isnt, so while i have pasted some code that "should" fix your problem you should look into why this problem has occured rather than use my "work around".
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-26-2010, 08:52 PM Re: repeat - y?
BDevil15's Avatar
Super Talker

Posts: 122
Trades: 0
Your english is better than 95% of the people on this board Rabbit.

is your image there? When I click the provided link it goes to an error page...
__________________
If you think you can or think you cant, your always right!

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


Please login or register to view this content. Registration is FREE
BDevil15 is offline
Reply With Quote
View Public Profile
 
Old 05-27-2010, 03:42 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Quote:
Originally Posted by BDevil15 View Post
Your english is better than 95% of the people on this board Rabbit.

is your image there? When I click the provided link it goes to an error page...
Thanks ^^

The image is there on the page, it is not repeating and stuck at the far left side, if you use firebug in firefox you can get the image to repeat however there is an issue that is preventing repeat-y from doing what its soposed to.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-27-2010, 07:18 AM Re: repeat - y?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Thank You! Phunk Rabbit, it is working well now.
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 05-27-2010, 07:25 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Your welcome.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-27-2010, 08:34 AM Re: repeat - y?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Are you sure you want repeat-Y? Repeat-y will repeat the image VERTICALLY down the page and that would look a little strange with a gradient. Repeat-X is the HORIZONTAL repeat and will show your gradient only at the top of the page.
__________________
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-27-2010, 08:37 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Are you sure you want repeat-Y? Repeat-y will repeat the image VERTICALLY down the page and that would look a little strange with a gradient. Repeat-X is the HORIZONTAL repeat and will show your gradient only at the top of the page.

LOL

Now i feel like a muppet, and thats one of the few thing i normally get right when coding.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-27-2010, 08:45 AM Re: repeat - y?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Ya know.. I always have to stop and think which direction is x or y..lol. Guess the old high school geometry lessons are getting fuzzy!
__________________
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-27-2010, 09:33 AM Re: repeat - y?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Ya know.. I always have to stop and think which direction is x or y..lol. Guess the old high school geometry lessons are getting fuzzy!

X to the decks, Y to the sky
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 05-27-2010, 01:28 PM Re: repeat - y?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
well, that's one I've never heard before.. Good one to remember!
__________________
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
 
Reply     « Reply to repeat - y?
 

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.66655 seconds with 12 queries