/    Sign up×
Community /Pin to ProfileBookmark

bad practice to compound styles?

Hey I have a 2 part question.

I was wondering about setting a style to one thing in the general css and then setting additional properties in the IE only css sheet?

For example in the general css sheet (applies/read by all browsers):

[CODE]body { background-color:#000000; }[/CODE]

And in the IE only css sheet (applies/read by IE only):

[CODE]body { scrollbar-track-color: #000000; }[/CODE]

Part 1) will the second simply overwrite the first or will both apply within IE?
Part 2) is it a good idea?

Assuming you understand my question let me know your thoughts.

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@ray326Nov 16.2006 — 
  • 1. Both

  • 2. Not on my browser
  • Copy linkTweet thisAlerts:
    @KravvitzNov 16.2006 — BluegillMedia, I suggest you learn about the [url=http://www.w3.org/TR/REC-CSS2/cascade.html#cascade]cascade[/url].

    Ray, if you don't like the scrollbar colors (which I can understand), than why don't you use a user stylesheet to force them to be their defaults?
    Copy linkTweet thisAlerts:
    @BluegillMediaauthorNov 16.2006 — Ok just for the record my question was about whether compounding styles is a good idea, not about scrollbar colours.

    So for example if I want that an extra style property in IE and not is FF is it better to put that style definition in both my FF and IE style sheets (and just write the FF with 1 style and the FF with 2) or is it better to put it (the first) in my ALL style sheet and then add the addtion (the second) in my IE style sheet.

    so 1 tag in the FF sheet and 2 in the IE sheet

    or

    1 tag in the ALL sheet and 1 in the IE sheet (so the IE would see both but not FF).

    Make sense?
    Copy linkTweet thisAlerts:
    @ray326Nov 17.2006 — Ray, if you don't like the scrollbar colors (which I can understand), than why don't you use a user stylesheet to force them to be their defaults?[/QUOTE]Well, Fx doesn't allow it anyway so no need.
    Make sense?[/QUOTE]Yeah, but just put it all in one sheet with IE conditionals. Of course it doesn't matter at all if it's a proprietary style that only IE will see anyway.
    ×

    Success!

    Help @BluegillMedia spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.28,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...