Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

How to disable the existed css design in new css ?

How to disable the existed css design in new css ?

3 Answers

Hi Mohan,

Not sure I completely understand what you are asking. Can you provide some more detail or an example?

You can disable CSS by removing it or 'commenting it out' like so:

Single-line comment:

/* color: red; */

Multi-line comment:

/* .header {
 color: red;
} */

This will tell the browser to ignore the code inside the comment tags /* */. A shortcut for this in a lot of text editors is to highlight the code you want to disable and press ctrl + /

If you want to stop a stylesheet from being loaded in a html file the comment looks a little different:

<!--  <link rel="stylesheet" type="text/css" href="dontloadthis.css">  -->

Hope that helps, let me know if it doesn't answer your question :)

If you want to "disable" the browser's standard css, here's the Code for a Reset CSS.

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

If you want to reset your browsers default style's go to:

https://necolas.github.io/normalize.css/

and follow the instructions.