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.

JavaScript Forum


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



Reply
Background positioning and repeating
Old 11-06-2008, 08:08 PM Background positioning and repeating
Nahele's Avatar
Extreme Talker

Posts: 204
Trades: 1
I have an image for use as a background. It's three ojects that are identical in a pattern of top right, center left and bottom right-center(with a white background and a bit of space between). This pattern is put on repeat for the website background, but because of the size of the bg image I would like to make it just one image repeated in a specified distance apart.

Any ideas of how to do this. I figured JS was the best bet.
__________________
The worst things in life allow us to appreciate the best things

virtual kudos (a.k.a. talkupation) always welcome where deserved.

Last edited by Nahele; 11-06-2008 at 08:43 PM..
Nahele is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-06-2008, 08:39 PM Re: Background positioning and repeating
Nahele's Avatar
Extreme Talker

Posts: 204
Trades: 1
An idea I had was that I recall PHP being able to build images on the fly, but it seems that it would still end up sending a larger image file. Perhaps some javascript can make an image on client side...
__________________
The worst things in life allow us to appreciate the best things

virtual kudos (a.k.a. talkupation) always welcome where deserved.
Nahele is offline
Reply With Quote
View Public Profile
 
Old 11-06-2008, 08:56 PM Re: Background positioning and repeating
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You can position a single background image, but there are no properties that affect the repeat frequency or position relative to each other.

repeat-x can be positioned relative to the top of the viewport
repeat-y can be positioned relative to the left of the viewport
but in both cases the repeat will butt the images together in the repeat direction.

Theoretically, it would be possible to place the image as a background to a floated, sized div, and use DOM scripting to insert this element into an absolutely positioned container div that was set with a negative z-index (might give cross browser problems) a calculated number of times, then let the rest of the page element sit above this container.
__________________
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!
 
Reply     « Reply to Background positioning and repeating
 

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