CSS Disappearing into a Vacuum

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
tylerh33
New Member
New Member
Posts: 3
Joined: Mon Aug 18, 2008 3:12 pm

CSS Disappearing into a Vacuum

Post by tylerh33 »

Hello Fellow CMSMS Folk,
I've just completed my first site on CMSMS, and had a pretty good experience.  I'm getting troubled by one issue that seems out of my control, and would really appreciate any help with this.

The problem is, once every 20 clicks or so (it might just be random, as it happens all over the place, but not often), one of the pages will randomly drop it's menu CSS.

*** It ends up looking like this: ***

Image

*** When it should look like this: ***

Image

Has anyone heard of this before??  Muchos gracias!

Tyler
Attachments
proper.jpg
problem.jpg
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Re: CSS Disappearing into a Vacuum

Post by CWebguy »

Sometimes the browser will fail to download css file, either at all or completely (so you will get a page with no styling).  Sounds like maybe your menu stylesheet isn't getting downloaded?  If it works fine on a local machine, but just happens on your server, sounds like maybe your server is "hiccuping".  Just my guess.  Maybe someone else knows more!

CWebguy
Last edited by CWebguy on Mon Aug 18, 2008 3:27 pm, edited 1 time in total.
CMSMS Made
tylerh33
New Member
New Member
Posts: 3
Joined: Mon Aug 18, 2008 3:12 pm

Re: CSS Disappearing into a Vacuum

Post by tylerh33 »

Hi CWebGuy,
The client is on "GoDaddy", which is probably not the best host around, so it's quite possible.  Thanks for your thoughts!

Tyler
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Re: CSS Disappearing into a Vacuum

Post by CWebguy »

Hey, yeah, I have them also, (but I don't use it, haha).  You may be able to set the stylesheet to cache, and then this shouldn't be a problem as it won't have to download/re-download it on each page (I think?)  I'm no expert in these fields, but I hope this helps! Just my thoughts :)

CWebguy
CMSMS Made
tylerh33
New Member
New Member
Posts: 3
Joined: Mon Aug 18, 2008 3:12 pm

Re: CSS Disappearing into a Vacuum

Post by tylerh33 »

OH, that would be incredibly useful if that worked.  I've set that in CMSMS to 10000.  Is there anywhere else I can re-enforce it?  I'd have thought that would be enough to solve the problem, but it still seems to occur.  Very weird.  :<
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Re: CSS Disappearing into a Vacuum

Post by CWebguy »

I haven't messed much with it, so I don't know.  You could technically combine all your stylesheets into one file, or at least squeeze a couple together.  This would probably actually be beneficial, and it's what Yahoo recommends to speed up server speed (less header requests made on the server).  Then you would just need to link your template to that one file (or couple files) in CMSMS.

Hope this helps ;)
CWebguy
Last edited by CWebguy on Mon Aug 18, 2008 8:40 pm, edited 1 time in total.
CMSMS Made
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am

Re: CSS Disappearing into a Vacuum

Post by fredp »

CWebguy wrote: I haven't messed much with it, so I don't know.  You could technically combine all your stylesheets into one file, or at least squeeze a couple together.  ... Then you would just need to link your template to that one file (or couple files) in CMSMS.
Hi CWebguy,

I think you're right.  At least manually merging the stylesheets worked for me.  I independently ran into the "css hiccup" problem last week on my linux development machine (openSUSE 10.3, cmsms 1.4.1).  I'm new to CMSMS; so, I investigated what I was seeing for the "learning experience".  Wish I'd of waited for your post instead!   ;)    For anyone interested, here are a few details:

There were no problems viewing my localhost site with the linux version of Firefox3. But, if I viewed the same site with IE6 under Wine (v1.1.2), then I'd see frequent intermittent styling problems when viewing/reloading any page with 4+ stylesheets.  Out of curiosity, I copied the contents of the db stylesheets used by my template into one physical css file (foo.css). Then I manually ed that stylesheet file into my template, instead of using {stylesheet}. That worked great. Consistent styling in EI6/Wine after that.  ;D

Hope this helps,
fredp
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: CSS Disappearing into a Vacuum

Post by Dr.CSS »

I combine them all the time, best way for me is to use the Web Dev. toolbar in Firefox and hit the edit CSS and all of them appear on the right side and I just copy then paste it into one new stylesheet and attach that to the template...
User avatar
CWebguy
Forum Members
Forum Members
Posts: 139
Joined: Thu Jul 24, 2008 3:31 am

Re: CSS Disappearing into a Vacuum

Post by CWebguy »

I knew that toolbar was good for something!  Thanks mark!

CWebguy
CMSMS Made
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am

Re: CSS Disappearing into a Vacuum

Post by fredp »

Hi again,

It looks like other folks are seeing the multiple stylesheet problem with IE:   http://forum.cmsmadesimple.org/index.ph ... 078.0.html  So, I was thinking about how we might enhance the {stylesheet} tag to implement the "use one stylesheet" workaround automatically.  (Insert evil laugh here)   ;D

Would it be good if the {stylesheet} tag were modified to optionally generate a single tag that links to a single "virtual" stylesheet that would contain the contents of each of the template's associated stylesheets wrapped with an appropriate css2 @media {...} rule? The virtual stylesheet would look something like this:

Code: Select all

  @media handheld {
    /* Start of CMSMS style sheet 'Handheld' */
    ...
  }
  @media screen {
    /* Start of CMSMS style sheet 'Layout: Left sidebar + 1 column' */
    ...
  }
  @media screen {
    /* Start of CMSMS style sheet 'Module: News' */
   ...
  }
  @media print {
    /* Start of CMSMS style sheet 'Print' */
   ...
  }
...
With this enhancement, users wouldn't have to maintain parallel versions of the same css content.  A further enhancement might be to detect the frontend client's browser and only perform this workaround when the client is using IE (or some similarly broken browser).  ;)

...Just a thought,
Fred
Last edited by fredp on Wed Aug 27, 2008 4:06 am, edited 1 time in total.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
Joe The Plumber
New Member
New Member
Posts: 5
Joined: Sat Oct 18, 2008 6:45 pm

Re: CSS Disappearing into a Vacuum

Post by Joe The Plumber »

CWebguy wrote: Hey, yeah, I have them also, (but I don't use it, haha).  You may be able to set the stylesheet to cache, and then this shouldn't be a problem as it won't have to download/re-download it on each page (I think?)  I'm no expert in these fields, but I hope this helps! Just my thoughts :)

CWebguy
This may be the solution to my problem, too. My page CONTENT is randomly "disappearing" though it is actually still there-- if I re-open and re-save the page it suddenly comes back! Otherwise, it won't come back ever. It just stays a blank page even if I force-refresh the browser. So, I'm doubting it is a caching problem, but I will try it. How do you set the stylesheet to cache?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: CSS Disappearing into a Vacuum

Post by Dr.CSS »

I think the whole problem, all of them like this, is the server....

I have a site with 14 pages of style sheets, and growing, and have never had a problem with the styles not showing up for a page...
Post Reply

Return to “CMSMS Core”