Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Problem with document type and element style
Old 07-04-2010, 01:34 PM Problem with document type and element style
Dakoom's Avatar
Experienced Talker

Posts: 42
Name: Norman
Location: [Italy]
Trades: 0
In this page:

http://validator.w3.org/check?verbos...-tutti-3958%2F

I get the error:

Code:
document type does not allow element "style" here          //--> </script> <br />  <style type="text/css">
In my website I'm including two PHP files with a content like this:

HTML Code:
<style type="text/css">
/* Klayz Top Menu */
#kbar {
color: #FFFFFF;
background: #686968;
background-image: url(http://imgs.klayz.com/kbar_bgimage.png);
background-repeat: repeat-x;
font-size: 12px !important;
border: 0px !important;
margin: 0px !important;
padding: 5px !important;
font-family: Verdana, Arial !important;
font-weight: bold !important;
}
#kbar a {
text-decoration: underline;
}
#kbar a:link {
color: #FFFFFF;
}
#kbar a:visited {
color: #FFFFFF;
}
#kbar a:hover {
color: #ff6600;
}
#kbar a:active {
color: #FFFFFF;
}
#dropmenudiv { /* Dropdown Menu CSS ("Altro") */
position: absolute;
border-bottom-width: 0;
font: normal 12px Verdana;
line-height: 18px;
z-index: 100;
border: 1px solid #000000;
}
#dropmenudiv a {
background-image: url(http://imgs.klayz.com/kbar_bgimage.png);
background-repeat: repeat-x;
width: 100%;
display: block;
color: #FFFFFF;
text-indent: 3px;
border-bottom: 1px solid #666666;
padding: 1px 0;
text-decoration: none;
font-weight: bold;
}
#dropmenudiv a:hover {
color: #FF4400;
background-image: url(http://imgs.klayz.com/kbar_bgimage.png);
background-repeat: repeat-x;
}
#kbar_right {
float: right;
margin-right: 10px;
font-weight: bold;
}
/* ### */
</style>

<!-- Start Kbar -->
<div id="kbar">
<span id="kbar_right">





Welcome Klayz! - <a href="http://www.klayz.com/sitemap/" title="Site Map - Klayz.com">Site Map</a> - 
                <a href="http://www.klayz.com/feed/" title="RSS feed - Klayz.com">RSS</a>
</span>

<a href="http://www.klayz.com/" title="Klayz.com - Homepage">Klayz.com</a> | <a href="http://www.klayz.com/about/" title="Informazioni su Klayz.com">About</a> | <a href="http://articles.klayz.com/" title="Le risposte alle domande frequenti di Klayz">Articoli</a> | <a href="http://tools.klayz.com/" title="Servizi Online Gratuiti - Tools - Klayz.com">Tools</a> | <a href="http://www.klayz.com/community/" title="La community di Klayz.com">Community</a> | <a href="http://games.klayz.com/" title="Giochi gratis online - Sala Giochi">Giochi</a> | <a href="http://www.klayz.com/sitemap/" onClick="return dropdownmenu(this, event, popup_altro, '200px')" onMouseout="delayhidemenu()">Altro.. &raquo;</a>

</div>
<!-- ### -->
And I sincerely donj't understand how to fix this error and the others about the JavaScript code. Can you please help me?
__________________
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!

Please login or register to view this content. Registration is FREE
Dakoom is offline
Reply With Quote
View Public Profile Visit Dakoom's homepage!
 
 
Register now for full access!
Old 07-04-2010, 01:42 PM Re: Problem with document type and element style
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Stylesheet rules belong in the document head (between the <head> </head> tags)

NOT in the document body.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-04-2010, 02:49 PM Re: Problem with document type and element style
Dakoom's Avatar
Experienced Talker

Posts: 42
Name: Norman
Location: [Italy]
Trades: 0
Consider that I am putting that top bar in a lot of webpages. What would you suggest me? How should I use the CSS for that? Would be a problem to edit all the templates to add that CSS in their respective .css files. The best way is to call the top bar's CSS in that file I'm including.
__________________
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!

Please login or register to view this content. Registration is FREE
Dakoom is offline
Reply With Quote
View Public Profile Visit Dakoom's homepage!
 
Old 07-04-2010, 03:03 PM Re: Problem with document type and element style
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Do the same as the rest of us do who use includes and put the stylesheet or a reference to an external .css file where it should be, in the document head.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-04-2010, 04:09 PM Re: Problem with document type and element style
Dakoom's Avatar
Experienced Talker

Posts: 42
Name: Norman
Location: [Italy]
Trades: 0
Then is there no other way?
__________________
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!

Please login or register to view this content. Registration is FREE
Dakoom is offline
Reply With Quote
View Public Profile Visit Dakoom's homepage!
 
Old 07-04-2010, 04:39 PM Re: Problem with document type and element style
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Unless you propose to rewrite the HTML specifications specially for your convenience, which, of course the W3c may have something to say about.
You either make it so that you do include the CSS rules in the right place or make every single rule on every element inline.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-04-2010, 07:40 PM Re: Problem with document type and element style
Dakoom's Avatar
Experienced Talker

Posts: 42
Name: Norman
Location: [Italy]
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Unless you propose to rewrite the HTML specifications specially for your convenience, which, of course the W3c may have something to say about.
I think there is no need to be so rude. I was just asking. If this is a problem please let me know.
Thank you for your replies.
__________________
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!

Please login or register to view this content. Registration is FREE

Last edited by Dakoom; 07-05-2010 at 06:54 AM..
Dakoom is offline
Reply With Quote
View Public Profile Visit Dakoom's homepage!
 
Old 07-05-2010, 10:15 AM Re: Problem with document type and element style
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
How is stating facts "rude"??

You either follow the rules of HTML & CSS, or you have to write your own specially! Which may or may not be applied by the browsers that you hope people will be using to view your site.

It is as simple as that. The constraints and requirements of where certain components should be included into the document are the same for every web designer and web developer

Now, if whatever templating system you are using does not allow you to include extra style sheets that shows a lack of planning or understanding on whomever designed them in the first place.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Problem with document type and element style
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.09631 seconds with 12 queries