Topic: background-repeat (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10892" title="Pages that link to Topic: background-repeat (Page 1 of 1)" rel="nofollow" >Topic: background-repeat <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 01-20-2003 02:39

Hi, people. How are ya? Would you please see this:

<style type="text/css">
body
{ background-image:
url("../images/bgdesert.jpg");
background-repeat: repeat-x}
</style>

What does this "background-repeat: repeat-x" mean? My background was filled with image but after putting this css in, it was filled only certain place. Why? I thought this css enabled me to fill something small repeatly.



Hiroki Kozai

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 01-20-2003 02:43

And do you know what "id selector" is? Would you please tell me?

Hiroki Kozai

Shard
Bipolar (III) Inmate

From: Richmond, VA
Insane since: Nov 2000

posted posted 01-20-2003 03:12

"background-repeat: repeat-x" means that the browser will repeat the background image horizontally only.

ID selectors are like class selectors and are written in the same fashion other than the fact that classes start with "." while IDs start with "#". Typically classes are used several times in a page while IDs are normally only used once per page. Class selectors simply define CSS objects to be used over and over in a page to simplify the code while ID serve a greater purpose. IDs are usually intended to define CSS objects for use with Javascript to create various DHTML effects.

I hope that helps ya out.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-20-2003 03:20

Hiroki: The specs are a good place to read up on this as they explain things well and with diagrams:
http://www.w3.org/TR/REC-CSS2/colors.html#background-properties

___________________
Emps

FAQs: Emperor

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 01-20-2003 03:49

And these are a must read if you're going to delve into CSS -
http://www.gurusnetwork.com/tutorials/css/cssintro/cssintro1.html
http://www.gurusnetwork.com/tutorials/css/cssintro2/cssintro2-1.html

However, it seems you are trying to move a bit too fast for your own good Hiroki. Try getting the basics of HTML down first...then move on to CSS.



Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-20-2003 13:00

Just as a minor clarification on what Shard said, ID selectors are not normally used only once per page, they are always used only once per page. I'm pretty sure it won't work if you try to use an ID more than once (although I don't think I've actually ever tried that).

Not trying to be pedantic, just wanted to clear that up to prevent Hiroki from running off and doing something that might get him hurt.

I would also recommend taking it slow. No need to rush things.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-20-2003 16:36

Well... *ID's* are only used once per page. Meaning that the "something" in the HTML attribute id="something" can only be used once, the next one must be id="somethingelse", etc.

However, *ID selectors* can be used multiple times. That is, your CSS can contain:

#something {blah blah}
#something {more stuff}
#somethingelse, #something {this applies to multiple elements}

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 01-21-2003 00:40

thank you, guys. Have a good day.

Hiroki Kozai

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-21-2003 05:14

Heh... yup, once again, Slime saves the day. That's what I meant to say (and probably what Shard meant to say, too).

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-21-2003 05:19

I figured it was; I just wanted to clear up a potential vocabulary issue which could come back to haunt us =)

Shard
Bipolar (III) Inmate

From: Richmond, VA
Insane since: Nov 2000

posted posted 01-21-2003 05:27

Yeah, that's what I was going after too. And just to clarify my first post a bit... I'm still relatively new to CSS. What I said in my first post was an indirect quote from the book "DHTML and CSS for the World Wide Web" by Jason Cranford Teague. I didn't feel the need to quote directly because I felt I could sum up the idea in the book with my own words. Anyway, the direct quote is:

quote:
...unlike a class, an ID should normally be used only once on a page to define a single element as an object.


I just wanted to clarify where my info came from. Sorry if I mislead ya Hiroki.




[This message has been edited by Shard (edited 01-21-2003).]

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-21-2003 06:53

That's interesting, Shard. I wonder why the "normally" got stuck in there. I'm guessing that it's one of those unnecessary modifiers writers stick in for no good reason (like "literally"), but I can't be sure.

Just to clarify, though (Slime, maybe you could help us out again?), IDs can only be used once, right? Is there a special situation where you can (or should) use them more than once? I'm not trying to muddy the waters, but that "normally" has gotten me a-wonderin'...

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-21-2003 16:45

Maybe there's some really obscure case where you have two XHTML documents within a single XML document, and there's the same element with the same ID in each of them... but I'm skeptical. I'm pretty sure it's just an unnecessary modifier, as you said =)

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 01-21-2003 22:05

Yup =)

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-22-2003 03:27

Ah, good. I feel better now.

Shard
Bipolar (III) Inmate

From: Richmond, VA
Insane since: Nov 2000

posted posted 01-22-2003 11:50

This one had me a little confused. Thanks for pointing us in the correct direction Suho, Slime, and DL.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu