Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Deactivating Styles?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33260
    Dolatron
    Member

    If I’m working with an HTML document, and I’m trying to figure out what styles I want to keep active, what is the best way to deactivate certain styles in the CSS document? Is there a technique where I can deactivate them, and come back to activate them later? Something similar to commenting out code, but perhaps less time consuming?

    Thanks,
    Marty

    #82494
    furrball1383
    Member

    i would say in the actual coding process theres just the commenting out, however if you use firefox and have an addon called webdeveloper, currently version 1.1.9 that allows you to turn on and off styling elements in the css.

    #82498
    Moofin
    Participant

    If I need to deactivate a style I just put x before them for example:

    #container { xwidth:920px; width:600px; margin:0px; }

    This works well for me :)

    Or if you wanted to remove the entire div:


    x#container { width:600px; margin:0px; }
    #container { width:300px; }
    #82507
    furrball1383
    Member

    yeah but those x’s will catch up to you if you’re not using an editing program that catches mistakes when you’re finally done with your site. For example till about a month ago i swore by notepad since that is the only program besides photoshop that I have used in my study of web development, but a single solitary x somewhere could send me searching for hours.

    #82515
    markthema3
    Participant

    @furrball1383
    Notepad works, but you should try some better tools. notepad++ and notepad2 are both good, though I prefer notepad++. Sorry for the off-topic.


    @Dolatron

    Say you have this style:


    #example {
    width: 90%;
    margin: 1%;
    background-color: #333333;
    color: #cccccc;
    border-radius: 15px;
    }

    and you want to see how it looks without the border-radius. To do that, just do this:


    #example {
    width: 90%;
    margin: 1%;
    background-color: #333333;
    color: #cccccc;
    /*
    border-radius: 15px;
    */
    }

    The

    /*

    starts a comment, and the

    */

    ends it.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.