The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> code suggestion
minidiapolis
post Feb 20 2008, 01:52 PM
Post #1


Serious Coder
*****

Group: Members
Posts: 437
Joined: 3-September 06
Member No.: 57



If you wanted to tile different images for the background, what would be the easiest way to code it?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 20 2008, 02:42 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 13,726
Joined: 9-August 06
Member No.: 6



You can have only one background image for each element, so you have to nest several elements to have multiple backgrounds.

http://htmlhelp.com/reference/css/color-background/


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Feb 20 2008, 10:19 PM
Post #3


Advanced Member
****

Group: Members
Posts: 218
Joined: 23-August 06
Member No.: 11



Another way, if it fits your application, is to combine the "different images" into one single image - say using photoshop, and use the resultant combined image as the the main background image.


--------------------
Two things are infinite: The universe and human stupidity; and I'm not sure about the universe.
A. Einstein (Uncle Albert)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Feb 21 2008, 03:12 AM
Post #4


Programming Fanatic
********

Group: Members
Posts: 3,541
Joined: 23-August 06
From: Europe
Member No.: 9



FYI, the use of multiple images as background will be part of CSS 3. See the CSS 3 Backgrounds and Borders Module Working Draft on Layering multiple background images. But it will still take a while before browsers will have implemented CSS 3 (Safari already supports multiple background images).


--------------------
"The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French)

"Leave scepticism to others and take action"
from HOME by Goodplanet

An inconvenient truth by Al Gore
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
minidiapolis
post Feb 21 2008, 04:47 PM
Post #5


Serious Coder
*****

Group: Members
Posts: 437
Joined: 3-September 06
Member No.: 57



What size would I make the canvas?
QUOTE(Dr Z @ Feb 20 2008, 10:19 PM) *

Another way, if it fits your application, is to combine the "different images" into one single image - say using photoshop, and use the resultant combined image as the the main background image.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 21 2008, 05:35 PM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 13,726
Joined: 9-August 06
Member No.: 6



Ay, there's the rub.


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Feb 21 2008, 07:10 PM
Post #7


Advanced Member
****

Group: Members
Posts: 218
Joined: 23-August 06
Member No.: 11



QUOTE(minidiapolis @ Feb 21 2008, 01:47 PM) *

What size would I make the canvas?


Good question! I have not used background images for ages (only colors), therefore I do not have handy bag of trips to dig into. Also, I would think that the number and size of the images would be a consideration. Perhaps someone who has been using background images frequently may have some pointers for you.


--------------------
Two things are infinite: The universe and human stupidity; and I'm not sure about the universe.
A. Einstein (Uncle Albert)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 21 2008, 08:07 PM
Post #8


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 13,726
Joined: 9-August 06
Member No.: 6



I'd say it depends on the image. Since minidiapolis wants it to tile, 1 tile big would be the obvious choice. How big that is... well, I wouldn't know. happy.gif


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st May 2013 - 01:33 PM