NetTalk Central

Author Topic: CSS Style Sheets  (Read 2288 times)

rupertvz

  • Sr. Member
  • ****
  • Posts: 323
    • View Profile
    • Email
CSS Style Sheets
« on: January 24, 2012, 04:48:49 AM »
Hi Guys,

What could be the reason why one CSS class could effect another in a single app?
For example, I have these two classes in one CSS file:

.Tab1Txt {
 font-weight: bold;
 font-family: Verdana;
 font-size: 13px;
 etc ....
}

.Tab2Txt {
 font-weight: normal;
 font-family: Verdana;
 font-size: 20px;
 etc ....
}

Class Tax2Txt doesn't have any text "style" effect, until I move it prior to Tab1Txt in the CSS file.

As soon as [2] is above [1] in the CSS file, the styles are applied.

I checked my app and as far as I can see, these two classes were only used once on the respective tabs / text fields.

What is strange, is that [2] is not taking on the attributes of [1], but instead it cancels all styles when [2] is below [1] in the CSS file.

Any help will be appreciated.
Thanks, Rupert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: CSS Style Sheets
« Reply #1 on: January 24, 2012, 07:07:55 AM »
I think you'd need to post an example to comment properly.

be aware that CSS is case sensitive, and if two classes apply, then "last one declared" wins when they are setting the same property.

Cheers
Bruce