MegaSack DRAW - This year's winner is user - rgwb
We will be in touch
I'm having a nightmare of a time trying to use CSS stylesheets. I've only got a basic understanding of things but I'm having a real problem getting them to work. I've set up the stylesheet and attached it using Dreamweaver. Everything displays correctly in Dreamweaver's WYSIWYG design mode; so far so good. I upload the page and the stylesheet and that's where it starts to go wrong.
Viewing the page online in Internet Explorer 8 a few of the styles display but some don't. If I view the same page using Firefox 3.6 none of them do.
Just to make things even weirder, if I view the page locally off my harddrive everything displays correctly in IE8 and some, but not all, display correctly in Firefox.
Either something weird is going on or I'm doing something wrong, but I've no idea what!
have you a link to it online?
I'm just working on a redesign of a website so have just been playing around. I've sorted out some beginner's syntax error but still have the odd issue of certain styles only displaying locally, not off the server.
I wonder whether there's some sort of caching issues going on, for example I changed the value for some text background, uploaded the stylesheet and the background colour remained the same (whilst displaying correctly in Dreamweaver and whilst browsing locally).
I'm going to set up a page to display all the styles and try and remember to put a link up.
CSS can be tricky. Best use firebug in Firefox then you can see what style has been applied to each element
What SFB said. If you can show a page advice might be easier.
Ok, there's a page with some styles from the stylesheet at [url=" http://www.swedauk.org/new/styles.htm" ]http://www.swedauk.org/new/styles.htm[/url]
All the styles display correctly as per the stylesheet BUT when I then alter an item in the stylesheet up upload it the styles on the page don't change and only some change locally. I guess I've a lot to learn.
The stylesheet itself (possibly full of errors) is at [url=" http://www.swedauk.org/new/styles.htm" ]http://www.swedauk.org/new/styles.htm[/url]
Apologies if this is all beginner's stuff but I'm just managing a website for a local charity and learning as I go.
and now my links aren't working!
What SFB + vrapan said + use Internet Explorer developer toolbar for the same reasons.
one thing I find helpful for troubleshooting are the validators available at w3.org fro example the css validator flags a couple of errors in the ccs file: [url= http://jigsaw.w3.org/css-validator/validator?uri=http://www.swedauk.org/sweda.css&profile=css21&usermedium=all&warning=1&lang=en ]here[/url]
hope this helps
Iain
error parsing font line 11 (font : normal;) [font needs multiple attributes]
error parsing Font line 16 (Font : Arial;)
selector expected, ruleset ignored line 32 [spurious "{" on line 31]
Sounds like you might be having file path issues to start with and caching issues on top. WYSIWYG editors aren't flawless either.
If you upload a new stylesheet then you will need to refresh it in your browser. Just keep it open in a tab and refresh it to make sure your browser is using your latest version.
Yeah, I've been refreshing the page with no luck. The .menu class (at the bottom of the page) is showing white text on a blue background. The background was set to blue when the stylesheet was first uploaded but was changed to grey some hours ago, but it's still displaying as blue; refreshing the page doesn't help. It may be a cacheing issue, I'm not sure but I'll try and iron out the errors and see it that helps.
Thanks for all the suggestions.
Always use CTRL-F5 when refreshing - often we have cacheing issues and I have to bat people over the head when they call me over.
Presumably you haven't sent the CSS file to the wrong place. That won't be the first time it's happened....
Ok, one more observation. I've run the stylesheet through a CSS validator and there are no error now, but I'm still getting no change in the styles when I alter them in the stylesheet.
I've just deleted the stylesheet entirely from the server and the styles are still displaying so this may be some sort of caching issue. Is there some sort of directive I can include in a stylesheet or prevent caching?
it's 'background-color' not 'background'
there is no .menu class it's .menus
psuedo classes :active etc have to be in the correct order (which I forget)
you have ignored some of the errors I pointed out earlier, eg spurious '}' on line 31
I didn't mean refresh the page; I meant refresh the stylesheet by opening it in a tab and hitting F5 or Ctrl+F5, depending on your browser. You should be able to just view it as a text file in your browser.
MOTD on. Bye.

