|
-
Jun 25th, 2012, 04:36 PM
#1
Thread Starter
New Member
style sheet syntax
hi all...
i'm doing a small project that uses a style sheet, and i'm having a problem with the syntax. in the code below, each of the character(s) that are bolded are underlined with a green line, indicating that something is "wrong..." please let me know if anyone see's the error.
thanking you in advance!! 
jay (freabird)
<style type="text/css" title="Application Style Sheet">
<!-
.pageheading
{
color: #000000;
font-family: Tahoma, Arial;
font-size: 16PT;
font-weight: bold;
}
.tableheading
{
color: #FFFFFF;
font-family: Tahoma, Arial;
font-weight: bold;
font-size: 9pt;
background-color: #AA0000;
text-align: center;
}
.tabletext
{
color: #000000;
font-family: Tahoma, Arial;
font-size: 9pt;
}
.tabletext_gray
{
color: #000000;
font-family: Tahoma, Arial;
font-size: 9pt;
background-color: #CCCCCC;
}
->
</style>
-
Jun 25th, 2012, 07:01 PM
#2
Re: style sheet syntax
Hi. It would be nice if you could put your CSS code inside [highlight] tags, so it's easier to read on the forums 
[highlight=CSS].test {
display:none;
}[/highlight]
which displays as:
To answer your question:
I don't think you need/want the title attribute on the <style> tag. The title tag here is used to define alternative style sheet sets, which I don't think you're using.
Adding HTML comments inside the <style> tag is no longer considered necessary (imho), since you're not likely to come across a browser that doesn't support CSS. If you are going to add them in, then you would want to get the syntax correct. That's why it's complaining about those lines.
In future, you can use a tool like CSS Lint to validate your CSS (not that the actual CSS here has any problems)
-
Jun 25th, 2012, 07:57 PM
#3
Re: style sheet syntax
Just for the heck of it i would go on and say that comments in asp.net need two lines.
So it's <!-- -->
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jun 26th, 2012, 10:18 PM
#4
Thread Starter
New Member
Re: style sheet syntax
thanks a lot!!
 Originally Posted by tr333
Hi. It would be nice if you could put your CSS code inside [highlight] tags, so it's easier to read on the forums
[highlight=CSS].test {
display:none;
}[/highlight]
which displays as:
To answer your question:
I don't think you need/want the title attribute on the <style> tag. The title tag here is used to define alternative style sheet sets, which I don't think you're using.
Adding HTML comments inside the <style> tag is no longer considered necessary (imho), since you're not likely to come across a browser that doesn't support CSS. If you are going to add them in, then you would want to get the syntax correct. That's why it's complaining about those lines.
In future, you can use a tool like CSS Lint to validate your CSS (not that the actual CSS here has any problems) 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|