Username:

Password:

Author Topic: The STYLE element is placed in the document  (Read 782 times)

ammayya123

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 3
The STYLE element is placed in the document
« on: March 09, 2010, 12:08:58 AM »
The STYLE element is placed in the document HEAD. The required TYPE attribute is used to specify a media type, as is its function with the LINK element. Similarly, the TITLE and MEDIA attributes may also be specified with STYLE.

Very old browsers such as Netscape 2.0, unaware of the STYLE element, would normally show its contents as if they were part of the BODY, thus making the style sheet visible to the user. To prevent this, the contents of the STYLE element may be contained within an SGML comment (<!-- comment -->), as in the preceding example. This use of comment tokens to hide the style sheet from old browsers should only be used in HTML, where the comment tokens are actually part of the style sheet. In XHTML, the comment tokens would be a real XML comment, and the style sheet would be hidden from browsers that treat the document as XML.


Meilleur casino
best casinos
Logged

mughees_javed

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 12
Document type does not allow element "style" here <style type="text/css">
« Reply #1 on: December 09, 2010, 12:56:02 PM »
Line 122, Column 23: document type does not allow element "style" here <style type="text/css"> ✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).





    * Forum Home | Marketplace | Articles | Blogs | Interviews | Tools

    *  REGISTER | SEARCH  | MEMBERS | F.A.Q.

Webmaster-Talk.com

    *     Register Here  Forum Rules

Search Forums
Show Threads   Show Posts
Advanced Search
Go to Page...


Webmaster-Talk.com > Coding Talk > PHP Forum > Document type does not allow element "style" here <style type="text/css">

Reply
Link Back Thread Tools Search this Thread
Document type does not allow element "style" here <style type="text/css">
Old 05-27-2009, 12:15 PM    
#1 (permalink)
Document type does not allow element "style" here <style type="text/css">
Darker81
Novice Talker

Posts: 10
Trades: 0
Talkupation: Darker81 is on a distinguished road
   
Line 122, Column 23: document type does not allow element "style" here <style type="text/css"> ✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).



PHP Code:
<div id="toolbar-body">
<script type="text/javascript" src="http://www.torfil.com/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="http://www.torfil.com//stepcarousel.js">

<!-- /***********************************************
* Step Carousel Viewer script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/ -->


</script>

<style type="text/css">

.stepcarousel{
position: relative; /*leave this value alone*/
border: 5px solid #34C2F0;
overflow: scroll; /*leave this value alone*/
width: 900px; /*Width of Carousel Viewer itself*/
height: 165px; /*Height should enough to fit largest content's height*/
background:#B4E058;
}

.stepcarousel .belt{
position: absolute;
left: 0;
top: 10;
}

.stepcarousel .panel{
float: left; /*leave this value alone*/
overflow: hidden; /*clip content that go outside dimensions of holding panel DIV*/
margin: 11px; /*margin around each panel*/
width: 115px; /*Width of each panel holding each content. If removed, widths should be individually defined on each content DIV then. */
height: 150px; /*Height should enough to fit largest content's height*/
}

</style>



<!-- Myslides -->
<div align="center" id='myslides' class='content2'>
<script type='text/javascript'>
stepcarousel.setup({
    galleryid: 'mygallery', //id of carousel DIV
    beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
    panelclass: 'panel', //class of panel DIVs each holding content
    panelbehavior: {speed:500, wraparound:true, persist:true},
    defaultbuttons: {enable: true, moveby: 2, leftnav: ['http://www.torfil.com/rem1.jpg', -14, 60], rightnav: ['http://www.torfil.com/rem2.jpg', 0, 60]},
    statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
    contenttype: ['external'] //content setting ['inline'] or ['external', 'path_to_external_file']
})
</script>
<div class='stepcarousel' id='mygallery'>
<div class='belt'>
<div class='panel'>
<a href='http://www.torfil.com/29-mirrors-single-link-the-unborn-2009-dvdrip-xvid-ika/' title='[29 Mirrors | Single Link] The Unborn 2009 DVDRiP XViD-iKA'><img alt='The Unborn 2009 ' height='148' src='http://i44.tinypic.com/2ueipud.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/damnation-iso-2009enggerrepack-384-gb-single-link/' title='Damnation ISO (2009/ENG/GER/Repack) - 3.84 GB Single Link'><img alt='Damnation ISO ' height='148' src='http://i42.tinypic.com/2qxrw93.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/lost-season-5-all-episodes-single-links-watch-online/' title='Lost Season 5 All Episodes Single Links Watch Online'><img alt='Lost Season 5 All Episodes' height='148' src='http://i43.tinypic.com/153bl3c.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/green-street-hooligans-2-2009-700mb-single-link-9-hosts/' title='Green Street Hooligans 2 (2009)-700mb SINGLE LINK [9-HOSTS]'><img alt='Green Street Hooligans 2' height='148' src='http://i41.tinypic.com/2gt2id3.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/how-i-met-your-mother-all-seasons-1-2-3-4-all-episodes-single-link/' title='How I Met Your Mother All Seasons 1-2-3-4 | All Episodes | Single Link'><img alt='How I Met Your Mother All Seasons' height='148' src='http://i39.tinypic.com/96jn02.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/90-rihanna-hd-wallpapers/' title='90 Rihanna HD Wallpapers'><img alt='Rihanna HD Wallpapers' height='148' src='http://i41.tinypic.com/wbpg14.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/internet-download-manager-v517-build-4-full-may-19/' title='Internet Download Manager v5.17 Build 4 FULL [May-19]'><img alt='Internet Download Manager v5.17 Build 4' height='148' src='http://i44.tinypic.com/331oq5u.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/kaspersky-kiskav-2009-ultimate-key-collection-260509/' title='Kaspersky KIS/KAV 2009 Ultimate Key Collection - [26.05.09]'><img alt='Kaspersky' height='148' src='http://i44.tinypic.com/2wbxnut.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/alexander-rybak-fairytale-eurovision-2009-winner/' title='Alexander Rybak - Fairytale (Eurovision 2009 winner)'><img alt='Alexander Rybak - Fairytale' height='148' src='http://i42.tinypic.com/nf2lgm.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/ms-mf-mu-rscom-mount-blade-1011-mods/' title='Mount and Blade 1.011 + Mods'><img alt='Mount and Blade 1.011' height='148' src='http://i42.tinypic.com/2j2g7dt.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/terminator-salvation-rip25-gbworking/' title='Terminator Salvation [RIP][2.5 GB][Working]'><img alt='Terminator Salvation [RIP]' height='148' src='http://i40.tinypic.com/im1pwh.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/folio-blogger-themeforestnet/' title='Folio Blogger - Themeforest.net'><img alt='Folio Blogger' height='148' src='http://i40.tinypic.com/293vukm.jpg' width='100'/>
</a>
</div>
<div class='panel'>
<a href='http://www.torfil.com/linkin-park-new-divide-rapidshare-mediafire-megaupload/' title='Linkin Park - New Divide RapidShare MediaFire MegaUpload'><img alt='Linkin Park - New Divide' height='148' src='http://i42.tinypic.com/141v0i8.jpg' width='100'/>
</a>
</div>

</div>
</div>
</div>
<!-- /Myslides -->
</div><!-- /Toolbar -->
Pls fix I didnt find anywhere
Darker81 is offline    
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
   
Old 05-27-2009, 12:58 PM    
#2 (permalink)
Re: Document type does not allow element "style" here <style type="text/css">
netingredient
Novice Talker

Posts: 14
Trades: 0
Talkupation: netingredient is on a distinguished road
   
Quote:
This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head"
move the <style type="text/css"></style> part inside <head></head> section.

Now it's placed in the <body> section.
__________________
NetIngredient
netingredient is offline    
Reply With Quote
View Public Profile
 
Old 05-27-2009, 01:21 PM    
#3 (permalink)
Re: Document type does not allow element "style" here <style type="text/css">
Darker81
Novice Talker

Posts: 10
Trades: 0
Talkupation: Darker81 is on a distinguished road
   
i tried <head></head> section and cument type does not allow element "head" here <head> the same problem again how can i fix can u show me how ?
Darker81 is offline    
Reply With Quote
View Public Profile
 
Old 05-27-2009, 03:00 PM    
#4 (permalink)
Re: Document type does not allow element "style" here <style type="text/css">
Taur
Junior Talker

Posts: 4
Trades: 0
Talkupation: Taur is on a distinguished road
   
You have to move the stylesheet to the head section, not create a new head section around it. There can only be one head section and one body section.
Taur is offline    
Reply With Quote
View Public Profile
 
Old 05-27-2009, 04:12 PM    
#5 (permalink)
Re: Document type does not allow element "style" here <style type="text/css">
Darker81
Novice Talker

Posts: 10
Trades: 0
Talkupation: Darker81 is on a distinguished road
   
Thanks your comment but i try again and i cant do can u recode for me
Darker81 is offline    
Reply With Quote
View Public Profile
 
Old 05-30-2009, 08:31 PM    
#6 (permalink)
Re: Document type does not allow element "style" here <style type="text/css">
larryatwt
Super Talker

Posts: 134
Name: Larry
Trades: 0
Talkupation: larryatwt is on a distinguished road
   
The basic structure of a HTML file is:
<html>
<head>
</head>
<body>
</body>
</html>
The head section should go first and the body section next. Your stylesheet should be in the head section. The rest of the codes you posted here should remain in the body section. Is it clear?
__________________
Tips for Web Newbies | Play online sudoku to kill time
larryatwt is offline    
Reply With Quote
View Public Profile Visit larryatwt's homepage!
 
Reply        « Reply to Document type does not allow element "style" here <style type="text/css">
   
Previous Thread | Next Thread Webmaster-Talk.com > Coding Talk > PHP Forum > Document type does not allow element "style" here <style type="text/css">


Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
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
Forum Rules
   


Webmaster Resources Marketplace:
Text Link Brokers |  Dedicated Server Hosting |  Managed Hosting |  Logo Design Services |     Hosted Exchange Hosting  | Freelance Designer


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

        

Mark Forums Read - View Forum Leaders - Contact Us - Webmaster Forum - Advertise - Archive - Privacy Statement - Top
 

Powered by vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 ©2010, Crawlability, Inc.
Part of the Escalate Media network
Forums Copyright 2004-2010 Webmaster-Talk.com : The time is 04:53 PM GMT -4
Site Sponsored by a Hivelocity Dedicated Server.
SEO Services By SEO Consult
Dedicated Server
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Tweet this Thread! Tweet this Thread!
Page generated in 0.30469 seconds with 13 queries

cashcars

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 196
Re: The STYLE element is placed in the document
« Reply #2 on: January 27, 2012, 11:31:54 PM »
There are many ways to link style sheets to HTML, each carrying its own advantages and disadvantages. New HTML elements and attributes have been introduced to allow easy incorporation of style sheets into HTML documents.

    Linking to an External Style Sheet
    Embedding a Style Sheet
    Importing a Style Sheet
    Inlining Style
    The CLASS Attribute
    The ID Attribute
    The SPAN Element
    The DIV Element