New Posts  All Forums:Forum Nav:

HTML5 Validation

post #1 of 7
Thread Starter 
I am developing a new site probuzzweb.co.uk and I cannot get this code
Code:
<script>document.write('<link rel="stylesheet" type="text/css" href="css/css3.css">');</script>
to validate. I cannot figure out why this does not work. I use the code to help validate some CSS3 Pseudos and moz/webkit code. Also I cannot seem to get html5shim to work in ie8.

Any help will be appreciated.

Thanks.
My Rig
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7600 @ 3.06Ghz Asus P5N-D 750i SLI ATi Radeon HD 6770 4 x 2GB Corsair Dominator DDR3 
Hard DriveHard DriveOptical DriveOS
2 x 500Gb Seagate Barracuda RAID 0 2TB Seagate Barracuda DVD+CD-RW Combo, DVD-RW Windows 8 Professional X64 
OSMonitorMonitorKeyboard
Ubuntu 12.10 x64 AOC F22S+ 22" HD 1080p 17" Monitor Logitech 
PowerCaseMouse
Powercool 850W Antec 902 Logitech 
  hide details  
Reply
My Rig
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7600 @ 3.06Ghz Asus P5N-D 750i SLI ATi Radeon HD 6770 4 x 2GB Corsair Dominator DDR3 
Hard DriveHard DriveOptical DriveOS
2 x 500Gb Seagate Barracuda RAID 0 2TB Seagate Barracuda DVD+CD-RW Combo, DVD-RW Windows 8 Professional X64 
OSMonitorMonitorKeyboard
Ubuntu 12.10 x64 AOC F22S+ 22" HD 1080p 17" Monitor Logitech 
PowerCaseMouse
Powercool 850W Antec 902 Logitech 
  hide details  
Reply
post #2 of 7
I'm not sure what you're trying to do with that code.

I take it you're wanting to use that css3.css stylesheet? If so, only use this in the <head> section:

Code:
<link rel="stylesheet" href="css/css3.css">
When you're using document.write, it's displaying whatever text is in that statement somewhere on the webpage, which I don't see the point in doing.
Time Sink
(21 items)
 
 
CPUMotherboardGraphicsRAM
Intel 2500k ASUS Sabertooth Z77 EVGA GTX 670 FTW G.Skill Ripjaws 8GB (2x4GB) DDR3 1600 
Hard DriveHard DriveHard DriveCooling
Samsung F3 1TB Crucial C300 128GB Corsair Force GT 60GB Noctua NH-U12P 
OSOSMonitorMonitor
Windows 8.1 Professional x64 Apple OS X Mavericks HP ZR24w LG IPS226V 
KeyboardPowerCaseMouse
Razer BlackWidow Seasonic X750 Lian-Li PC-A05B Logitech M500 
Mouse PadAudioAudioAudio
Mionix Propus 380 Zero USB DAC (2009 Version) Emotiva Pro airmotiv 4 Beyerdynamic DT990 600ohm 
Audio
Shure SRH-840 
  hide details  
Reply
Time Sink
(21 items)
 
 
CPUMotherboardGraphicsRAM
Intel 2500k ASUS Sabertooth Z77 EVGA GTX 670 FTW G.Skill Ripjaws 8GB (2x4GB) DDR3 1600 
Hard DriveHard DriveHard DriveCooling
Samsung F3 1TB Crucial C300 128GB Corsair Force GT 60GB Noctua NH-U12P 
OSOSMonitorMonitor
Windows 8.1 Professional x64 Apple OS X Mavericks HP ZR24w LG IPS226V 
KeyboardPowerCaseMouse
Razer BlackWidow Seasonic X750 Lian-Li PC-A05B Logitech M500 
Mouse PadAudioAudioAudio
Mionix Propus 380 Zero USB DAC (2009 Version) Emotiva Pro airmotiv 4 Beyerdynamic DT990 600ohm 
Audio
Shure SRH-840 
  hide details  
Reply
post #3 of 7
Thread Starter 
The moz, webkit and pseudos do not validate in w3c css3 validator, so I am using this code to get around that. But for some reason this code does not validate properly in html5 validator.
My Rig
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7600 @ 3.06Ghz Asus P5N-D 750i SLI ATi Radeon HD 6770 4 x 2GB Corsair Dominator DDR3 
Hard DriveHard DriveOptical DriveOS
2 x 500Gb Seagate Barracuda RAID 0 2TB Seagate Barracuda DVD+CD-RW Combo, DVD-RW Windows 8 Professional X64 
OSMonitorMonitorKeyboard
Ubuntu 12.10 x64 AOC F22S+ 22" HD 1080p 17" Monitor Logitech 
PowerCaseMouse
Powercool 850W Antec 902 Logitech 
  hide details  
Reply
My Rig
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7600 @ 3.06Ghz Asus P5N-D 750i SLI ATi Radeon HD 6770 4 x 2GB Corsair Dominator DDR3 
Hard DriveHard DriveOptical DriveOS
2 x 500Gb Seagate Barracuda RAID 0 2TB Seagate Barracuda DVD+CD-RW Combo, DVD-RW Windows 8 Professional X64 
OSMonitorMonitorKeyboard
Ubuntu 12.10 x64 AOC F22S+ 22" HD 1080p 17" Monitor Logitech 
PowerCaseMouse
Powercool 850W Antec 902 Logitech 
  hide details  
Reply
post #4 of 7
Thread Starter 
bump
My Rig
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7600 @ 3.06Ghz Asus P5N-D 750i SLI ATi Radeon HD 6770 4 x 2GB Corsair Dominator DDR3 
Hard DriveHard DriveOptical DriveOS
2 x 500Gb Seagate Barracuda RAID 0 2TB Seagate Barracuda DVD+CD-RW Combo, DVD-RW Windows 8 Professional X64 
OSMonitorMonitorKeyboard
Ubuntu 12.10 x64 AOC F22S+ 22" HD 1080p 17" Monitor Logitech 
PowerCaseMouse
Powercool 850W Antec 902 Logitech 
  hide details  
Reply
My Rig
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7600 @ 3.06Ghz Asus P5N-D 750i SLI ATi Radeon HD 6770 4 x 2GB Corsair Dominator DDR3 
Hard DriveHard DriveOptical DriveOS
2 x 500Gb Seagate Barracuda RAID 0 2TB Seagate Barracuda DVD+CD-RW Combo, DVD-RW Windows 8 Professional X64 
OSMonitorMonitorKeyboard
Ubuntu 12.10 x64 AOC F22S+ 22" HD 1080p 17" Monitor Logitech 
PowerCaseMouse
Powercool 850W Antec 902 Logitech 
  hide details  
Reply
post #5 of 7
Does it need a type value in the script tag for validation? Just a WAG.
White TITAN
(16 items)
 
   
CPUMotherboardGraphicsRAM
intel core i7-3770k Asus Z77 Sabertooth EVGA GTX 780 SC ACX Corsair Dominator Platinum 16GB (2x8GB) 
Hard DriveHard DriveHard DriveOptical Drive
Samsung 840 Pro  WD Black Crucial M4 LG Blueray 
CoolingOSMonitorPower
Swiftech H220 (Stock cooler on while RMA :( ) Windows 7 64bit Dell 2311h Ultrasharp x 2 Corsair AX850 
CaseMouseMouse PadAudio
Fractal Design Define R4 White (w/ Window) Logitech G700 Razer Control Edition Sound Blaster ZxR 
CPUMotherboardGraphicsRAM
Intel 980x Asus Rampage iii Extreme EVGA GTX580 SLI Patriot Viper Xtreme 12GB DDR3 2000 (PC3 16000) 
Hard DriveHard DriveHard DriveOptical Drive
120GB Corsair Force Series 3 SSD WD Caviar Black 640GB Crucial M4 128GB SSD LG Black Blu-ray Drive SATA Model UH12LS28 
CoolingCoolingCoolingCooling
XSPC RX360 and RX120 Rads Watercool HeatKiller 3.0 Limited Edition Black ... XSPC Dual Bay Res with Swiftech MCP655 Pump Silver Shining Bitspower Compression Fittings 
CoolingCoolingCoolingCooling
PrimoFlex Pro LRT Black Tubing -1/2in. ID X 3/4in. 3x Gentle Typhoon 120mm Fan 1850RPM (AP-15)  1x Noiseblocker NB-BlackSilentPro PL-2 120mm Ul... Koolance VID-NX580 Full Cover GPU Waterblock x2 
OSMonitorKeyboardPower
Windows 7 Home Premium x64 Dell U2311 Ultrasharp x2 Max Keyboard Nighthawk X8 Semi-Custom - Mechani... Antec High Current Gamer 900W 
CaseMouseMouse PadAudio
Xigmatek Elysium Black Logitech G700 Razer Goliathus Creative Sound Blaster Recon3D Fatal1ty Pro 
  hide details  
Reply
White TITAN
(16 items)
 
   
CPUMotherboardGraphicsRAM
intel core i7-3770k Asus Z77 Sabertooth EVGA GTX 780 SC ACX Corsair Dominator Platinum 16GB (2x8GB) 
Hard DriveHard DriveHard DriveOptical Drive
Samsung 840 Pro  WD Black Crucial M4 LG Blueray 
CoolingOSMonitorPower
Swiftech H220 (Stock cooler on while RMA :( ) Windows 7 64bit Dell 2311h Ultrasharp x 2 Corsair AX850 
CaseMouseMouse PadAudio
Fractal Design Define R4 White (w/ Window) Logitech G700 Razer Control Edition Sound Blaster ZxR 
CPUMotherboardGraphicsRAM
Intel 980x Asus Rampage iii Extreme EVGA GTX580 SLI Patriot Viper Xtreme 12GB DDR3 2000 (PC3 16000) 
Hard DriveHard DriveHard DriveOptical Drive
120GB Corsair Force Series 3 SSD WD Caviar Black 640GB Crucial M4 128GB SSD LG Black Blu-ray Drive SATA Model UH12LS28 
CoolingCoolingCoolingCooling
XSPC RX360 and RX120 Rads Watercool HeatKiller 3.0 Limited Edition Black ... XSPC Dual Bay Res with Swiftech MCP655 Pump Silver Shining Bitspower Compression Fittings 
CoolingCoolingCoolingCooling
PrimoFlex Pro LRT Black Tubing -1/2in. ID X 3/4in. 3x Gentle Typhoon 120mm Fan 1850RPM (AP-15)  1x Noiseblocker NB-BlackSilentPro PL-2 120mm Ul... Koolance VID-NX580 Full Cover GPU Waterblock x2 
OSMonitorKeyboardPower
Windows 7 Home Premium x64 Dell U2311 Ultrasharp x2 Max Keyboard Nighthawk X8 Semi-Custom - Mechani... Antec High Current Gamer 900W 
CaseMouseMouse PadAudio
Xigmatek Elysium Black Logitech G700 Razer Goliathus Creative Sound Blaster Recon3D Fatal1ty Pro 
  hide details  
Reply
post #6 of 7
You need to append it to the <head>, you can't use document.write to do this.

something like this should work
Code:
     
var headtg = document.getElementsByTagName('head')[0];
var cssNode = document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = 'css/css3.css';
cssNode.media = 'screen';
headtg.appendChild(cssNode);

Edited by Jonowxeno - 10/14/11 at 2:36pm
Main PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k Asus Maximus IV Gene-Z MSI 6950 2gb Unlocked Ref GSkill Ripjaws X 8GB CL8 
Hard DriveOSMonitorKeyboard
Crucial M4 128GB Windows 7 Ult Samsung 24" ToC Das Professional Silent 
PowerCaseMouse
Seasonic X750 Corsair 650d Logitech G700 
  hide details  
Reply
Main PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k Asus Maximus IV Gene-Z MSI 6950 2gb Unlocked Ref GSkill Ripjaws X 8GB CL8 
Hard DriveOSMonitorKeyboard
Crucial M4 128GB Windows 7 Ult Samsung 24" ToC Das Professional Silent 
PowerCaseMouse
Seasonic X750 Corsair 650d Logitech G700 
  hide details  
Reply
post #7 of 7
vendor prefixes are still in debate as to if they needed to be included in CSS3 validation...

I would just use the normal style of calling an external CSS file rather than complicating things...validate your CSS3 file w/o vendor prefixes and if it passes just add in the prefixes for the vendors you want included.
Intel System 2011
(18 items)
 
AMD System 2009
(14 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II X4 630 Propus @ 3.5Ghz Gigabyte GA-880GM-UD2H Rev.1 ASUS EAH5450 SILENT/DI/512MD2(LP) 4x2GB G.Skill NQ DDR3 PC 1600 
Hard DriveOptical DriveCoolingOS
Seagate Momentus XT LG GSA-H30N Scythe Samurai ZZ Rev.B Win7 x64 Ultimate 
MonitorKeyboardPowerCase
LG CS 460 - 32" LCD TV Microsoft Reclusa Gaming Keyboard Thermaltake TR2 750w Fractal Design Core 1000 
Mouse
Microsoft Comfort Mouse 6000 
  hide details  
Reply
Intel System 2011
(18 items)
 
AMD System 2009
(14 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II X4 630 Propus @ 3.5Ghz Gigabyte GA-880GM-UD2H Rev.1 ASUS EAH5450 SILENT/DI/512MD2(LP) 4x2GB G.Skill NQ DDR3 PC 1600 
Hard DriveOptical DriveCoolingOS
Seagate Momentus XT LG GSA-H30N Scythe Samurai ZZ Rev.B Win7 x64 Ultimate 
MonitorKeyboardPowerCase
LG CS 460 - 32" LCD TV Microsoft Reclusa Gaming Keyboard Thermaltake TR2 750w Fractal Design Core 1000 
Mouse
Microsoft Comfort Mouse 6000 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding