Skip to main content
samjae
Participant
April 23, 2017
Answered

CSS ID not saving to newly created DIV inserts

  • April 23, 2017
  • 2 replies
  • 1064 views

Hi,

Every time I create a new DIV via inserts I have an issue with the CSS ID i give it does not actually save and it saves without a CSS Class. This is annoying because I am new and lazy to dreamweaver and would rather not have to manually write the code in all the time.

Many Thanks

Using Dreamweaver cc 2017.01

MacBook Pro (13-inch, Mid 2012)

2.9 GHz Intel Core i7

16 GB 1600 MHz DDR3

    This topic has been closed for replies.
    Correct answer Jon Fritz

    None of the above has worked sorry. I renamed my configuration folder to "configuration_new" and it created another folder "configuration" is this right? otherwise I am at a loss here.


    Yes, that is how it should work. DW creates both a new cache file and config folder when you open the program, so if you renamed the folder, a new one will take its place (renaming it allows you to move files from the old configuration to the new if needed).

    Restoring preferences didn't help either?

    Something else to check would be structural errors in your HTML may be throwing the program off. Run the validator under File > Validate > Current Document W3C and see if there are any problems (like missing end tags) anywhere in your html. A lot of the program's functionality relies on clean code, when it runs into errors, it can break all sorts of things.


    As an alternative way to get the id in place, what happens if you place the <div> without adding the ID to the dialogue, then add it to the Div ID field in the main Properties window instead (Window > Properties or Ctrl + F3 if it's not open)?

    2 replies

    Nancy OShea
    Community Expert
    Community Expert
    April 23, 2017

    I am confused as well.

    ID is not the same as class.

    CSS

         #unique_ID { }

         .reusable_class { }

    HTML:

         <div id="unique_ID"> </div>

         <div class="reusable_class"> </div>

    If your code contains errors, DW will not behave as expected.  Save your document.  Examine code error indicators, Output & Validation Panels.   These will alert you to problems in your code. It's a good idea to save often.

    Nancy

    Nancy O'Shea— Product User & Community Expert
    Community Expert
    April 23, 2017

    Can we see the code of what you are doing?  You say you are having issues with the CSS ID and it saves without a CSS class.  Classes and IDs are 2 separate things.  IDs can only be used once on a page while classes can be applied to multiple objects.  Are you trying to give the DIV a Class an ID or both and what is not saving or working as expected?

    samjae
    samjaeAuthor
    Participant
    April 24, 2017

    Sorry my fault. I did not mean to put css class, I was on about CSS ID. Every time I create a new Div in Dreamweaver I enter a new CSS ID in the pop up box. However when I click ok, the div appears but with no assigned CSS ID. This is more of a point of it being irritating. I can insert a CSS ID after i create the div in the properties panel.

    My point is that what is the point in giving me a pop up with the option to give a div a CSS ID when it wont actually generate an ID.

    Thank you for your responses

    Sam Jae

    Jon Fritz
    Community Expert
    Community Expert
    April 24, 2017

    When I go to Insert > HTML > Div and add an ID in the dialogue box, the id is correctly added to the <div> tag in the html in my Windows version of CC2017.0.1.

    If you're using the same version, you may have had something go corrupt in your configuration or preferences that is making DW act up. Try clearing the program cache, renaming the entire personal configuration folder and/or restoring preferences...

    Clear Program Cache - https://forums.adobe.com/thread/494811

    Rename Personal Configuration Folder - https://forums.adobe.com/thread/494812

    Restore Preferences (CS4-CS6) - https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs4-cs5.html

    Restore Preferences CC Versions - https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver.html

    One of those items will typically clear up unusual behaviors like this.