Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

The main difference between themes/skins and CSS are the HTML & Server Side Controls (SSC) only. We use skin files to format & cosmetics SSC which are not in HTML like <asp:Label>, <asp:TextBox> & </asp:RadioButtonList> etc...

But what if we use the rendered HTML SSC in CSS instead skin files to handle <asp:Label> & <asp:TextBox> etc...

ie: when SSC <asp:TextBox> rendered on browsers it shows <input type="text"> so if we write following style in my CSS file instead Skin, it also works...

input[type=text], textarea, select { 
    outline: none;   
    padding: 3px 0px 3px 3px;
    margin: 5px 1px 3px 0px;
    border: 1px solid #cccccc;  
    background: #ffffff;
    width: 150px;
    color: #484848;
    font-size:
    12px; 
}

So my question is, if we still can handle SSC with CSS do we really need skins? Or if I am missing anything please correct me, thanks.

share|improve this question
4  
PLEASE don't RANDOMLY capitalize WORDS for EMPHASIS. –  Yannis Rizos Feb 14 '13 at 13:16
add comment

1 Answer

It's a question of choice; I have never needed to use skins, I have always been able to do all the styling I wanted to with pure css.

Looking at your example it is purely the look and feel of controls you want to control - so I see no reason for you to use skins. Html for mark-up, JavaScript for client-side functionality and css for how things look. Keeping your mark-up free from script or style has its advantages and css is the best tool for styling.

I wouldn't mix and match css and skins for the simple reason that I would then find it more difficult to know whether I needed to look in a skin file or a css file to make a style change.

If you had need of setting properties on your SSC then a skin file would be something to consider, but as we've both said you're only looking for styling then I wouldn't complicate things by introducing skin files. StackOverflow has an answer to skin vs css that might be interesting to read.

share|improve this answer
    
Thanks Simon, I appreciated your feedback. I also use purely CSS for styling as it is indeed the best. However I just sharing my taught's to get more input except my understanding and your described very well. –  mknayab Feb 20 '13 at 11:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.