CSS rules disappear, then reappear

HTML Source, Tables, CSS, JavaScript, and Embed/Object.

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

CSS rules disappear, then reappear

Postby skreynol on Fri Nov 11, 2011 2:10 pm

When editting a page using external css rules, I have observed several occasions when the rules displayed in Kompozer disappear. The following scenario is one instance. In the editor, via CSS icon, added rules to existing rule set, viewed page in 'Normal' view to confirm rules were working, then went into 'Source' view and did some editting - in this case, I deleted some in-line styles Kompozer had inserted. When I went back to 'Normal' view, the rules I had added to the rule set were no longer workikng, and when I went into the css table, the rules were gone - although the rules that had existed when I opened the page were stilll showing. I then went back to 'Normal' view, did a 'File' 'Save' and 'Exit', and then went back into Kompozer. The rules I had added and then saw 'gone' were back, visible in the css table, and working on the screen. I have seen this a number of times, and have not really come up with a reliable way to get the rules to 'stick'. I make copies of my css tables and save often. I am running version 0.7.10.
Posts: 11
Joined: Thu Mar 10, 2011 4:20 pm
Country: United States (us)

Re: CSS rules disappear, then reappear

Postby gregtutor on Fri Nov 11, 2011 3:11 pm

There isn't a 100% reliable way to get the rules to stick.

General rules of thumb to reduce it to an absolute minimum are:

# Use an external editor *NOT* SOURCE view, which is always prone to screw up code and re-write what you've just written in ways that it thinks fit.

# Avoid entering code under the GENERAL tab of the CSS Stylesheets dialogue. Use the fields under the other tabs instead.

If you find the CSS Stylesheets dialogue awkward to use and are generally competent coder then it's worth setting up the "Site Manager" - not for the publishing function which is broken -but simply to provide a panel where you can double click a file to load it into the main window. You can happily load and edit an external CSS file this way, seeing the whole thing at once instead of small snippets in the dialogue. It's much easier to re-order the rules this way too!
Greg Chapman
Helping new users of KompoZer - but using BlueGriffon
Posts: 3790
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: CSS rules disappear, then reappear

Postby wink0r on Fri Nov 11, 2011 4:40 pm

Sometimes the 'revert' function under the file tab will bring back 'lost' css rules. Revert is also available from the context menu if you right click on a tab.
Posts: 2595
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Return to Advanced Design Q & A

Who is online

Users browsing this forum: No registered users and 1 guest