|
| |
|
|
Donkey
Posts: 3895 Joined: 11/13/2001 From: Blackfield United Kingdom Status: offline
|
Style Sheet Layout - 7/5/2004 9:09:19
I have never seen this mentioned in the forums before, but where you put your styles in a style sheet seems to make a big difference to whether they work properly or not (at least in Firefox and IE, Opera works wherever the styles are). I found this out this weekend after finishing about 20 pages which I had checked in FF, Opera and IE and all looked perfect. Then suddenly big chunks of the page I was working on reverted to unformatted text except when viewed in Opera. When I checked back the same had happened on all the other pages. I couldn't understand it because I had checked the code was OK and valid, and within the same positioning div one block of text was fine and the next one unformatted. After much tearing hair out and changing things then changing them back, it occurred to me that the only thing I had done differently before writing the last page was to add a few more styles to the style sheet. Although these styles were not used yet on the page they had the effect of lengthening the style sheet and pushing the text formatting style classes further away from the positioning div classes. (The style sheet is quite long.) I moved the formatting style classes nearer to the positioning style classes and it all worked perfectly again.
_____________________________
I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't. Samuel Clemens
|
|
|
|
d a v e
Posts: 4147 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Style Sheet Layout - 7/5/2004 10:21:56
sounds bizarre - the only way it shoud make any difference is if the new styles had a direct influence on the existing ones and won out due to the cascade, or more likely contained errors thus resulting in no styles after that point.
_____________________________
David Prescott Gekko web design
|
|
|
|
d a v e
Posts: 4147 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Style Sheet Layout - 7/5/2004 13:03:43
huh i do that all the time, though in topstyle lite it shows when you do something like that. still have to notice it though!
_____________________________
David Prescott Gekko web design
|
|
|
|
markhawker
Posts: 511 Joined: 5/31/2004 From: Leeds, UK Status: offline
|
RE: Style Sheet Layout - 7/6/2004 4:43:59
Hi, glad you found the mistake Donkey! Just a question, how do you layout your CSS files? I'd recommend:
name {
xxx: xxx;
xxx: xxx;
xxx: xxx;
}
I tend to use that when I'm coding too, especially with recursion and IF commands and FOR loops in PERL. Just because it gives you a better insight visually. I've seen some people putting their CSS all on one line, I guess it's personal preference. All on one line saves formatting etc. time, but is harder and takes longer to debug if things go wrong! Mark
_____________________________
Mark Hawker my business - http://www.thebubblejungle.com/ facebook - http://www.thebubblejungle.com/facebook/ web hosting - http://www.crucialp.com/
|
|
|
|
d a v e
Posts: 4147 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Style Sheet Layout - 7/6/2004 5:14:26
I can recommend that way as well. topstyle et al do it like that.
_____________________________
David Prescott Gekko web design
|
|
|
|
d a v e
Posts: 4147 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Style Sheet Layout - 7/6/2004 10:36:44
(i don't work for them) but topstyle lite will be sooooo much easier than using notepad http://www.bradsoft.com/download/index.asp and it's free (obviously the pro version is better) but the lite version is great
_____________________________
David Prescott Gekko web design
|
|
|
|
why me!
Posts: 43 Joined: 4/30/2004 Status: offline
|
RE: Style Sheet Layout - 7/13/2004 15:43:23
Are you sure you dont work for them! I can agree that top style light is a very good free tool and its also very simple to use........ and when i get better i WILL upgrade. Jim
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|