Everything in a css file is technically a style/CSS rule.

CSS rules that are assigned (started off with a selector) to an html element
such as p, a, td, img etc. are called base selectors.
example:
P {
  margin:10px;
}

CSS rules that start with a pound sign or period ("#" or ".") are called
custom selectors. The former being an ID selector and the latter being a
Class selector.  ID's are unique and can only be used on one page element.
So an ID selector is for targeting one specific element on the page.  Class
selectors don't "report" to anything, (in case you thought css classes were
like classes in other languages like Java) and can be used an infinite
amount of times on a page.

Let's say there was a class called ".mything", it could look something like
this in a css file:
.mything {
  width:200px;
  height:40px;
  border: solid 1px #f00;
  color: #fff;
  background-color:#666;
  font-size:16px;
  line-height:40px;
}
That would style almost any element set to that class as 200px wide, 40px
high with a red single px border. The other properties within would set the
style of the text within the element.

The way to use that class selector style for say, a div, is to write the div
like this:
<div class="mything">Your Text Here</div>

If that same css style started instead with an ID selector, "#", as in
"#mything" then the style would be applied to the one page element with an
ID of "mything."  
The way to use that for your actual div is to write the div like this:
<div id="mything">Your Text Here</div>

So use class selectors for general overall stylings and ID selectors for
more specific targeting of a single page element.

You can mix/match styles by class/ID name, as well as assigning a certain
class to only divs or table cells as in:
div.mything {//all divs set to the class "mything"
  properties:values; here
}
div#mything {//the one div with the id of "mything"
  properties:values; here
}
td.mything {//all td's set to the class "mything"
  properties:values; here
}
td#mything {//the one td with the id of "mything"
  properties:values; here
}
Using them thusly:
<div class="mything"></div>
<div id="mything"></div>
<td class="mything"></td>
<td id="mything"></td>

That should get you going in the right direction.  There are millions of
tuturials and how-to pages, as well as books, on CSS styling that would not
be possible to cover in a post.
I recommend: Beginning CSS Web Development From Novice to Professional -
Apress

-=Randy


On 11/28/07 5:47 PM, "John" <[EMAIL PROTECTED]> wrote:

> 
> Hi BellK,
> how familiar are you with CSS?
> 
> john
> 
> On Nov 29, 10:56 am, BellK <[EMAIL PROTECTED]> wrote:
>> Hello- I have a basic css question.
>> I am  working on an iphone application for my company using our
>> salesforce backend. I am having difficulty using the styles and
>> styleClasses for the iui within the salesforce code (apex
>> visualforce). Is there a special way to read the css text file to help
>> me understand which line items are styles, which are style classes,
>> and how they report to eachother etc?
>> Thanks
> 
> > 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to