CSS problem / reload/refresh

This forum is for discussions on the Help & Manual Premium Pack and the Premium Pack Toolbox configuration utility introduced with Premium Pack 3

Moderators: Alexander Halser, Tim Green

Post Reply
thschaer
Posts: 9
Joined: Wed Feb 22, 2017 3:50 pm

CSS problem / reload/refresh

Unread post by thschaer »

Hello!

I've made some adjustments to a V3 responsive skin.
So far it worked out fine. But now I've come to a problem, I can't resolve... or it keeps annoying me...

I've added a new div to the template and some entries to the CSS file (max-width for this div and different colors for the links in this div).
When I open the exported WebHelp it looks like it should.
Then I switch to an other topic/site – and these CSS additions don't apply anymore (div is larger and the colors are like the default ones).
When I reload the exactly same topic/site, the CSS addtions are there again...
Seems like the CSS definitions I've added just work on the first "call" of the site/topic or when the reload button is hit.
Strange for me... respectively I'm wondering, how the CSS execution works exactly.
Is there an explanation for this behaviour? Or any hint, how to add new (not just customized) CSS definitions?

Thanks for any help!

Best regards,
Thomas.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: CSS problem / reload/refresh

Unread post by Tim Green »

Hi Thomas,
I've added a new div to the template and some entries to the CSS file (max-width for this div and different colors for the links in this div).
When I open the exported WebHelp it looks like it should. Then I switch to an other topic/site – and these CSS additions don't apply anymore (div is larger and the colors are like the default ones).
This won't work, because of the way the new WebHelp 3 format works. When you browse in topics only the topic content is replaced in the page dynamically, from a compressed JSON version of the content only in the /jstopics folder in the WebHelp directory. This is extremely fast and it is what makes the whole new structure possible. The JSON versions are generated by Help+Manual at compile time and it knows nothing about what you added to the template. That will show up on first access, but when the topic content is replaced you will get the standard content again.

Doing this can also create problems with Google, because Googlebot will eventually notice that your dynamic content is different from your indexed content (Google indexes the static content of the pages on loading) and you can then get worse rankings because of it.

All this is the price you have to pay for frameless and responsive design... :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
thschaer
Posts: 9
Joined: Wed Feb 22, 2017 3:50 pm

Re: CSS problem / reload/refresh

Unread post by thschaer »

Thank you for the quick response, Tim.

So it's not a CSS problem and I found a workaround.
The main cause for the adaptation is the width of the content area.
In my (and my clients) opinion is this area on most desktop screens way to large.
Topics with quite a lot of text are hard to read with lines stretching almost all over the screen.
This should be improved in the templates; for example with a max width, a boxed layout – or an other, better idea (I didn't came up with yet).

Thanks for the superb support.

& best regards,
Thomas.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: CSS problem / reload/refresh

Unread post by Tim Green »

thschaer wrote:In my (and my clients) opinion is this area on most desktop screens way to large.
So adjust the size of the window to suit your preferences. Why would you use a browser in full-screen mode anyway, except on a tiny screen, or on the original version of Windows 8? Artificially restricting the width of the content in the topic pane would be counterproductive because it would prevent users who do want it to be wider from making it wider. Definitely not something we would ever do.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply