Jump to content

problem with some terms


nidhi

Recommended Posts

* > #footer, * > form, * > #notes, * > .output { position: relative; z-index: 1000; }why it starts with '*' sign?why '>' is used?wat purpose does this solves? #header { overflow: hidden; }what " # " here means?wat do these signify?

Link to comment
Share on other sites

The * is used to make it so the css that folows is only picked up in IE and not Firefox. You have to use hacks like this as diffrent browsers interprate CSS differently.The # is used to say the CSS that follows is and ID. An ID is the same sort of thing as a class but an ID can only be used once on each page where as classes can be used multiple times. ID is also more likley to work in certain situations but you wont need to worry about that unless you plan on doing some programming too.

Link to comment
Share on other sites

The * is used to make it so the css that folows is only picked up in IE and not Firefox. You have to use hacks like this as diffrent browsers interprate CSS differently.The # is used to say the CSS that follows is and ID. An ID is the same sort of thing as a class but an ID can only be used once on each page where as classes can be used multiple times. ID is also more likley to work in certain situations but you wont need to worry about that unless you plan on doing some programming too.

i m trying to format an already existing web page by linking a CSS at the headusing a code in C, so that it fits for a handheld size.in C code, i m opening that web page and start reading char by char. as soon as head tag comes,i concatenate the link as a string. the CSS is being successfully attached and the contents are fitted into the specified screen size: 360*240. then i store the result into a htm file.but some entities are creating problem especially flash. i don't want to display flash on the mobile screen,hw can i do it using CSS. can u gv me correct guidelines wat should i hv in my CSS to reformat analready existing web page.plz help me, i m stuck in between.if anyone shows interest,i'll send my CSS code alsowaiting 4 ur valuable reply,
Link to comment
Share on other sites

Actually in the above case, the star is a universal selector... let's analyze:

 * > #footer, * > form, * > #notes, * > .output

The "," is used to state that both of the "paths" are applyed, the same way as you'll say

div, span

Which would apply the style to all divs and spans.The ">" is used to state the only the first element of that kind should have the desired style. Like

span > p

Would only apply the style to the first "p" element which is a child of a span.As mentioned, the star in this case is a universal selector, which in other words means "any element". Combining all theese:

* > .output

Applyes the style to the first element with a class "output" which is a child of some element (in other words: the first on page :) ?).

* > #footer

The first element with ID of "footer" on page? What the heck? IDs should be used once, therefore, such kind of selector SHOULD be useless.How to hide Flash... well, the same way you would hide any other content... use "display:none", like this:

@media handheld {object.flash {display:none;}}

Where "@media handheld" is the way you specify that only handheld devices (such as cell phones, but also includes PDAs I think) should use the described code inside the parenthesis. "object.flash" is only a sample of selector to select the flash content of course. You'll have to change it to select the actual element in which the flash resides.

Link to comment
Share on other sites

Actually in the above case, the star is a universal selector... let's analyze:
 * > #footer, * > form, * > #notes, * > .output

The "," is used to state that both of the "paths" are applyed, the same way as you'll say

div, span

Which would apply the style to all divs and spans.The ">" is used to state the only the first element of that kind should have the desired style. Like

span > p

Would only apply the style to the first "p" element which is a child of a span.As mentioned, the star in this case is a universal selector, which in other words means "any element". Combining all theese:

* > .output

Applyes the style to the first element with a class "output" which is a child of some element (in other words: the first on page :) ?).

* > #footer

The first element with ID of "footer" on page? What the heck? IDs should be used once, therefore, such kind of selector SHOULD be useless.How to hide Flash... well, the same way you would hide any other content... use "display:none", like this:

@media handheld {object.flash {display:none;}}

Where "@media handheld" is the way you specify that only handheld devices (such as cell phones, but also includes PDAs I think) should use the described code inside the parenthesis. "object.flash" is only a sample of selector to select the flash content of course. You'll have to change it to select the actual element in which the flash resides.

thanx a lot for explaining so clearly. object.flash {display:none;}this is working bt object.flash {width:176px;} is not working, its going beyond the limit. what to do?

Link to comment
Share on other sites

That is because object.flash and object .flash are 2 different things. You have to make sure to have the space for it to work.

Link to comment
Share on other sites

That is because object.flash and object .flash are 2 different things. You have to make sure to have the space for it to work.

agree
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...