Author |
Topic |
Roland
Advanced Member
Netherlands
9335 Posts |
Posted - 24 October 2003 : 14:55:56
|
Since we seem to be correcting Ryan's HTML, here's another tip: use quotes for your attributes: <BODY text="#111111" vLink="#11111l" link="#111111" aLink="green" hLink="green" bgColor="#fffff2"> instead of <BODY text=#111111 vLink=#11111l link=#111111 aLink=green hLink=green bgColor=#fffff2>
And don't name colors, but use their HEX value to ensure you get the same colors in all browsers.
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 24 October 2003 : 16:31:01
|
What is hlink? I don't believe that belongs there at all. There is also an extra character in the vLink value - |. |
|
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
Posted - 24 October 2003 : 18:37:42
|
Ideally BODY should be lowercase to prepare for the new XML-based style of coding - are we getting silly yet? |
Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
Edited by - D3mon on 24 October 2003 18:38:21 |
|
|
Roland
Advanced Member
Netherlands
9335 Posts |
Posted - 24 October 2003 : 18:51:33
|
quote: Originally posted by D3mon
Ideally BODY should be lowercase to prepare for the new XML-based style of coding - are we getting silly yet?
I don't think anything that's been said is silly. Just tips for basic correct HTML coding and some corrections/examples to go with the tips. |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 24 October 2003 : 19:02:36
|
^^^ agreed. Ryan generally has a lot of questions so we really hooked him up this time. |
|
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
Posted - 24 October 2003 : 19:15:17
|
Sorry Roland, perhaps my response was poorly worded. I remember what it was like when I first started coding and asked a question and got chapter and verse on how my code was bad/wrong in so many ways... Just want to lighten it up a little for Ryan. (I'll shut up now ) |
Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 24 October 2003 : 19:29:26
|
quote: Originally posted by Roland
Since we seem to be correcting Ryan's HTML, here's another tip: use quotes for your attributes: <BODY text="#111111" vLink="#11111l" link="#111111" aLink="green" hLink="green" bgColor="#fffff2"> instead of <BODY text=#111111 vLink=#11111l link=#111111 aLink=green hLink=green bgColor=#fffff2>
Excellent point with the quotes, there are still many coders who ignore this for tag attributes or use ' instead of ", which can have undesirable consequences. eg. You populating a text box from a variable
dim sText
sText = "Don't do this"
response.write("<input type=""text"" name=""txtText"" value='" & sText & "'>") Since I have put ' instead of ", the browser will treat the ' in Don't as the end of the value. eg request.form("txtText") will be "Don" instead of "Don't do this"
Getting a bit off topic now, maybe there should be a "good coding practices" forum |
The UK MkIVs Forum |
|
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 24 October 2003 : 19:47:55
|
quote: Originally posted by dayve
quote: Originally posted by RichardKinser
the answer is in Nikkol's post above...
Your response reminds me of a feature that I've seen at other technical support forums where the Accepted Answer is highlighted and the person that gave the answer has their proficiency rating go up. It would be a nice feature here, although probably not all that necessary.
I am thinking of doing this on my forum for the shop area of the site where members can show thier selected answer, or if they feel it was a combination of a few people...points to all of them. Of course if it was given to many users it would be less points per, depending on how many users. |
Erick Snowmobile Fanatics
|
|
|
Ryan
Average Member
USA
858 Posts |
Posted - 25 October 2003 : 01:11:05
|
Ok thanks guys. I will relook at this tomorrow as I am exhausted right now. |
The Poultry Link - "Serving the best of the fancy with the best of the web" Forum Setup Help |
|
|
Ryan
Average Member
USA
858 Posts |
Posted - 25 October 2003 : 10:24:04
|
quote: Originally posted by dayve
you nested your CSS which is incorrect
this:
<style> <!-- BODY{ scrollbar-face-color:#fffff2; scrollbar-arrow-color:brown; scrollbar-track-color:#EEEEEE; scrollbar-shadow-color:''; scrollbar-highlight-color:''; scrollbar-3dlight-color:''; scrollbar-darkshadow-Color:''; A:link { text-decoration:underline; } A:visited { text-decoration:underline; } A:hover { text-decoration:none; } A:active { text-decoration: none; } } --> </style>
should look like this instead
<style> <!-- BODY{ scrollbar-face-color:#fffff2; scrollbar-arrow-color:brown; scrollbar-track-color:#EEEEEE; scrollbar-shadow-color:''; scrollbar-highlight-color:''; scrollbar-3dlight-color:''; scrollbar-darkshadow-Color:''; }
A:link { text-decoration:underline; } A:visited { text-decoration:underline; } A:hover { text-decoration:none; } A:active { text-decoration: none; } --> </style>
you can also remove the properties from your BODY tag although there might be some NON CSS compliant browsers out there. I still never use the body declaration though.
Ok thanks. That corrected it.
DavidRhodes. Thanks. I changed that.
Roland, Thanks for the HEX suggestion.
Thanks everyone. I will let you know if I run in to anything.
|
The Poultry Link - "Serving the best of the fancy with the best of the web" Forum Setup Help |
|
|
Ryan
Average Member
USA
858 Posts |
Posted - 25 October 2003 : 10:37:26
|
So, all around a "good code" would be like this: <style> <!-- BODY{ scrollbar-face-color:#fffff2; scrollbar-arrow-color:#008000; scrollbar-track-color:#EEEEEE; scrollbar-shadow-color:''; scrollbar-highlight-color:''; scrollbar-3dlight-color:''; scrollbar-darkshadow-Color:''; }
A:link { color: #111111 ;text-decoration:underline; } A:visited { color: #111111 ;text-decoration:underline; } A:hover {color:#008000 ;text-decoration:none; } A:active { color: 008000 ;text-decoration: none; }
body {background-color: #fffff2} --> </style> </HEAD> |
The Poultry Link - "Serving the best of the fancy with the best of the web" Forum Setup Help |
|
|
Roland
Advanced Member
Netherlands
9335 Posts |
Posted - 25 October 2003 : 11:13:19
|
You should combine the body styles so they all show in one block. It's not necessary to put those things together to keep thing working, but it's easier to find everything later.
Imagine a style sheet that looks like this: <style> <!-- BODY{ scrollbar-face-color:#fffff2; scrollbar-arrow-color:#008000; scrollbar-track-color:#EEEEEE; scrollbar-shadow-color:''; scrollbar-highlight-color:''; scrollbar-3dlight-color:''; scrollbar-darkshadow-Color:''; }
A:link { color: #111111 ;text-decoration:underline; } A:visited { color: #111111 ;text-decoration:underline; } A:hover {color:#008000 ;text-decoration:none; }
.menu { font-family: verdana; color: #00ED5F; }
body {background-color: #fffff2}
A:active { color: 008000 ;text-decoration: none; }
.copyright { font-family: verdana; color: #999999; }
.menu {font-size: 12px;}
.copyright {font-size: 10px;} --> </style>
Though it doesn't matter for the way things are displayed, it's easier if all definitions for the same items are in the same places. |
|
|
Topic |
|