Hi,
I created a style sheet for this page, when I link to it in the code the styles in the stylesheet are not being applied to the xhtml:
http://www.wisetopic.com/photos/photo.aspx?userid=66&imageid=298
*Notice that the font for the Image Title is not styled. If you click the "Leave Comment" link the comment box there is not styled either...
I copied and pasted the exact same style inline (into a style code block in the body) on this page and it works fine:
http://www.wisetopic.com/photos/phototest.aspx?userid=66&imageid=298
Click on the "Leave Comment" link now - it has the style it is supposed to have.
The CSS for the first page is here: http://wisetopic.com/photos/css/common.css
Any ideas on why the style in the style sheet are being ignored???
Thank you.
Hey Jenni,
Hey Jenni,
you've got some weird *beep* happenin' at the start of your stylesheet. vis:
div, p, a, span, input, textarea {
font-family: Trebuchet MS, Arial, Verdana, sans-serif;
}
Have you tried using an absolute path to your stylesheet? That might be a fruitful place to start troubleshooting. There may be a problem with your file heirarchy. Are you using server side .asp includes?
I think that that "weird
I think that that "weird **beep***" has been mentioned before? it's a byte order mark (BOM) you're saving your files all of a sudden as utf-8, save as plain ANSI
Hi Phreestyle. That is so
Hi Phreestyle.
That is so weeeeeiiird! Where are those funky characters coming from? I assume you saw them in the common.css file? I deleted the whitespace and resaved it. Maybe that fixed those problems...
So does it still look weird when you go here?: http://wisetopic.com/photos/css/common.css
Ok I hard coded the URLs in per your suggestions. They now look like this:
That did not seem to help at all on this page:
http://www.wisetopic.com/photos/photo.aspx?userid=66&imageid=299&imageDetails=False
What an annoying problem! I've been banging my head on this for a couple days.. I dunno what else to look at :/ I'm stmped and about ready to rebuild it from scratch.......
JQ
Nope they are still
Nope they are still there.
You should probably investigate Hogo's suggestion. Check out the settings on whatever editor or upload systems you are using. Something is obviously awry.
OK, THansk for your advice
OK, THansk for your advice Hugo. I opened up the common.css file in notepad and removed the whitespace around that first tag. I can't think of any other way of saving the file as plain ANSI. Is that the best way of saving as ANSI as opposed utf-8.
I still can't see the funky characters in the css still. I looked at the source in notepad, Visual Studio (which prolly is what messed it up) and the Source Viewer in FireFox.
Also, in FireFox I dont see ny kind of formatting now whatsoever. It looks ok in IE. I cleared the cache in FF by going to Tools > Clear Private Data > Cache (checked) then "Clear Private Data Now". Even after I flush the cache and hit refresh I'm no seeing any style on either of those pages..
Why am I having these stupid weird problems w/this page??
Thank you.
By the way - thanks to you
By the way - thanks to you too Phreestyle!
Jenni are you seriously
Jenni are you seriously writting/editing and saving in notepad? the actual windows Notepad!
If you are coding you should be using a code editor only( not sure whether 'Visual studio' counts as one!); all true code editors will allow you to see any character marks in a file.
In notepad you need to do 'save as' from file menu and check what the bottom 'drop down' says for 'file encoding', you want it set to 'ANSI'.
LoL - Not sure if Visual
LoL - Not sure if Visual Studio counts as one. That's rich! I love it...
hmm hmm hmm. You truly were
hmm hmm hmm. You truly were right - the common.css file was saved as UTF-8. I went ahead and saved it as ANSI, flushed out my cache, and tried the original page that has the stylesheet reference again and still, its not picking up the formatting in the stylesheet.
I'm trying to think what else the problem can be.... The "Common.css" file is the the last referenced style sheet in the head tag, so it is not getting over written by other styles. The style sheet validates. I just commented out all the javascript on that page, so I know its not interfering with the css (there is a funky "style swapper" script in there, but its commented out now)
ARGH! :curse:
Jenni same problem - iirc -
Jenni same problem - iirc - as before, you have style block in your body section of the page, it probably won't effect the problem but please sort that out so that your page validates.
re the stylesheet having disabled javascript also just try removing the title attribute so that it's not a 'preferred' sheet but a 'persistent' one and move it before the 'alternate' ones, just to ensure that these aren't factors in things.
So what code editor do you
So what code editor do you use Hugo?
At the moment HTML-kit as
At the moment HTML-kit as I'm trying to get used to the full capabilities of it's customizable potential.
Apologies for the unintentional slur on Visual Studio
So have you sorted the stylesheet?
Hugo is my new hero.
Bloody hell Hugo - that did the trick!! I removed the "title" attributes from teh style sheet declarations and moved the common.css file to the top of the list - that seemed to fix it. I would have never ever ever figured that out on my own - and everyone on my team was like *daaaar*.
I am forever in your debt. I guess what they say is true - "Learn of the skillful; for he that teaches himself has a fool for his master." In this case you're the skillful and I am the fool (but hey whats new right).
I'll have to check out HTML-kit. I'm not a Visual Studio fan really... I mean its an amazingly complex tool that does a whole heck of a lot, but for CSS its not really super great. But you can't really "hate" Visual Studio - right? I mean, Its a tool... that'd be like saying "I hate hammers, but screwdrivers totally rule!" If you want to cut something you don't use a screwdriver... If you write .NET code I would hope you'd try stay away from notepad.
In appreciation of your help here is a picture of me dressed as a pirate:
Cheers!
Morning, I'm glad you got
Morning,
I'm glad you got your problem sorted out.
I too use HTML-kit as a code editor (and ftp manager) and would recomend it to anyone. And, it is free.
BTW, I like your site a lot.
cheers
Arrrrr
"Learn of the skillful; for he that teaches himself has a fool for his master"
I'll have to remember that, it's a good one
For the record I pretty much exclusively use notepad or notepad2 for all my coding, which is mainly CSS/HTML and some ASP stuff.
Great pic I've been
Great pic
I've been learning from a fool for a long time probably why it's been a struggle
For interests sake and if you have time it would be worth establishing the exact cause of the problem i.e with the stylesheet call in the new position add back in the title attribute as it was, ergo was it in actual fact a problem with the multiple whitespace seperated words in the attribute? both 'persistent' and 'preferred' stylesheets are supposed to be read, only 'alternate' sheets are overlooked until actually requested.