Skip to content Skip to sidebar Skip to footer

Why Can't My Web Page Apply Its Css?

I have a simple website(primarily static html/css) but for some reason some of the pages won't apply the external css in Firefox (works in IE). http://bjmarine.net/services.html -

Solution 1:

Check out the encoding of the html file

index is ISO-8859-1 and service utf-16 (thats why you see weird characters).

Open the file in an editor, the clic in save as and change the encoding of service.html back to iso.

Solution 2:

services.html appears to be encoded using UTF-16, so Firefox is trying to interpret the stylesheet using the same encoding.

Be consistent about the encoding you use (UTF-8 is a good choice), and configure your webserver to specify that encoding in the HTTP response headers.

Solution 3:

There's an error in your javascript: _gat is not defined in... it looks like line 184 in services.html .

Solution 4:

You might want to make sure that you path for the stylesheet is actually reaching the folder where your stylesheet resides.

The full path should be http://bjmarine.net/images/bjmarine.css

Here is your full page with the path corrected.

<htmlxmlns="http://www.w3.org/1999/xhtml"xml:lang="en"lang="en"><head><metaname="Description"content="Boats, Power, Sail, Marina, Berths, Malahide, Dublin, Bangor, Cork, Malta" /><metaname="Keywords"content="your, keywords" /><metahttp-equiv="Content-Type"content="text/html; charset=iso-8859-1" /><metaname="Distribution"content="Global" /><metaname="Author"content="Denis Hoctor - denishoctor&#64;gmail.com" /><metaname="Robots"content="index,follow" /><linkhref="http://bjmarine.net/images/bjmarine.css"type="text/css" /><linkhref="/fav.ico"type="image/x-"><title>BJ Marine.net Power/Sail New &amp; Used Boats</title></head><body><!-- wrap starts here --><divid="wrap"><divid="header"><divid="logo"><imgsrc="images/BJMarineLogo811x77.jpg"width="811"height="77"alt="BJ Marine Header"class="no-border" /></div><!-- Menu Tabs --><ul><li><ahref="index.html"><span>Home</span></a></li><li><ahref="featuredboats.html"><span>FeaturedBoats</span></a></li><li><ahref="newboats.html"><span>NewBoats</span></a></li><li><ahref="brokerage.html"><span>UsedBoats</span></a></li><li><ahref="ouroffices.html"><span>OurOffices</span></a></li><li><ahref="salesteam.html"><span>SalesTeam</span></a></li><li><ahref="sellyourboat.html"><span>SellYourBoat</span></a></li><liid="current"><ahref="services.html"><span>Services</span></a></li><li><ahref="contact.html"><span>Contact</span></a></li></ul></div><!-- content-wrap starts here --><divid="content-wrap"><divid="header-columns"><divclass="col7"><ahref="new/newboatsframe.html#http://www.beneteau.com/"id="img_rollover_beneteau"><span>Beneteau</span></a></div><divclass="col7"><ahref="new/newboatsframe.html#http://www.searay.com/"id="img_rollover_searay"><span>Searay</span></a></div><divclass="col7-center"><ahref="new/newboatsframe.html#http://www.cranchi.com/"id="img_rollover_cranchi"><span>Cranchi</span></a></div><divclass="col7-center"><ahref="new/newboatsframe.html#http://www.ferretti-yachts.com/"id="img_rollover_ferretti"><span>Ferretti</span></a></div><divclass="col7-center"><ahref="new/newboatsframe.html#http://www.customline-yacht.com/"id="img_rollover_customline"><span>Customline</span></a></div><divclass="col7-center"><ahref="new/newboatsframe.html#http://www.mochicraft.com/"id="img_rollover_mochicraft"><span>Mochi Craft</span></a></div><divclass="col7-center"><ahref="new/newboatsframe.html#http://www.searanger.com/"id="img_rollover_searanger"><span>Searanger</span></a></div></div><divid="main"><h1>Services</h1><p>At our bases in Malahide and Bangor we have the best lifting and boatyard facilities 
            on the east coast, with capacity for 180 boats ashore in safe, secure boatyards.</p><h3>Parts Department</h3><divclass="staff-columns"><div><p>Our parts department can be contacted directly by email at <ahref="mailto:parts&#64;bjmarine.net">parts&#64;bjmarine.net</a> or telephone <strong>+353 1 8061560</strong>. We supply a comprehensive range of all spare parts for the boat brands that we sell. We also supply the following –</p><ulstyle="padding-left: 60px;"><li>Raymarine onboard marine electronic instruments</li><li>Garmin marine equipment</li><li>C-Map electronic navigation charts</li><li>Navionics Marine Charts</li><li>Garmin Bluechart</li><li>Sparcraft masts, booms and rigging systems</li><li>Facnor furling systems</li><li>Quantum Sails, premier sail design and suppliers</li><li>Volvo, Yanmar and Mercruiser marine engine parts</li><li>Trailers</li></ul></div></div><ahref="http://www.dmgsailsports.com/"><imgsrc="images/dmglogo.jpg"width="294"height="130"alt="DMG services"class="float-right-noborder" /></a><br /><h3>Training</h3><p>DMG Sailsports is an ISA Training Centre based in Malahide, Co. Dublin, Ireland. Their courses are based on the ISA Powerboat Scheme and ISA Windsurfing Schemes. Personalised private sail coaching is available to those who have their own boats and would like lessons tailored to their specific needs by our highly experienced ISA Instructors. All of our courses are delivered to the highest standards for both professional and recreational clients and are run all year round, 7 days a week.</p><br /><h3>Marina Berths</h3><p>We can facilitate your boating needs in Portugal, Spain, France, Malta and many other Mediterranean destinations Berths and deliveries etc.</p><br /><ahref="http://www.lombard.ie/lombard/ireland/personal_customers/marine/index.html"><imgsrc="images/lombard.jpg"width="220"height="83"alt="Lombard Marine Finance"class="float-right-noborder" /></a><h3>Finance</h3><p>Whatever your boating dream you could realise it quickly and easily with <ahref="http://www.lombard.ie/lombard/ireland/personal_customers/marine/index.html">Lombard Marine Finance</a>.</p><br /><br /><h3>Weather and tides</h3><ulclass="tidelist"><li><ahref="http://www.met.ie/forecasts/sea-area.asp">Met Eireann</a> – Sea area Forcast
                    <ahref="http://www.met.ie/forecasts/sea-area.asp"><imgsrc="images/met_logo.gif"width="60"height="32"alt="MET Eireann logo"class="float-right-noborder-tides" /></a></li><li><ahref="http://www.met.ie/latest/buoy.asp">M2 Weather buoy</a> – Approx 20 nautical miles east of Howth Headt</li><li><ahref="http://www.ireland.com/weather/tides.htm">Irish Daily Tides</a><ahref="http://www.ireland.com/weather/tides.htm"><imgsrc="images/irishtimes_logo.gif"width="175"height="17"alt="Irish Times logo"class="float-right-noborder-tides" /></a></li><li><ahref="http://www.windguru.cz/int/index.php?sc=47773">WindGuru</a><ahref="http://www.windguru.cz/int/index.php?sc=47773"><imgsrc="images/windguru_logo.gif"width="175"height="55"alt="Wind Guru logo"class="float-right-noborder-tides" /></a></li></ul></div><!-- content-wrap ends here --></div><divid="footer-wrap"><divid="footer-columns"><divclass="col3"><h3>Dublin</h3><code>
                    Malahide<br />

                    Dublin, Ireland<br />
                    Tel:(+353) 1 8061560<br /><ahref="mailto:sales&#64;bjmarine.net">sales&#64;bjmarine.net</a></code></div><divclass="col3-center"><h3>Cork</h3><code>
                    Co. Cork<br />
                    Ireland<br />
                    Tel:(+353) 87 7712224<br /><ahref="mailto:sales&#64;bjmarine.net">sales&#64;bjmarine.net</a></code></div><divclass="col3-center"><h3>Belfast</h3><code>
                    Bangor Marina<br />
                    Co. Down, N. Ireland<br />

                    Tel:(+44) 2891 271434<br /><ahref="mailto:sales&#64;bjmarine.net">sales&#64;bjmarine.net</a></code></div><divclass="col3"><h3>Mediterranean</h3><code>

                    Grand Harbour Marina<br />
                    Malta<br />
                    Tel:(+356) 27019356<br /><ahref="mailto:sales&#64;bjmarine.net">sales&#64;bjmarine.net</a></code></div><!-- footer-columns ends --></div><divid="footer-bottom"><p>&copy; 2008 <strong>BJ Marine Ltd.</strong> | 
            Design by: <ahref="mailto:denishoctor&#64;gmail.com">Denis Hoctor</a> | 
            Valid <ahref="http://validator.w3.org/check?uri=referer">XHTML</a> | 
            <ahref="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<ahref="index.html">Home</a>&nbsp;|&nbsp;<ahref="contact.html">Contact</a></p></div><!-- footer ends--></div><!-- wrap ends here --></div><scripttype="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><scripttype="text/javascript">var pageTracker = _gat._getTracker("UA-1206900-2");
pageTracker._initData();
pageTracker._trackPageview();
</script></body></html>

Placing this path in the page itself locally got eveything except your logo to come up.

Good luck, hope this helps you.

Solution 5:

Looks like you have some css errors.

.align-centre

Might be spelled wrong and the selectors properties are not closed with:

}

I would run through the css file and make sure it is valid.

Post a Comment for "Why Can't My Web Page Apply Its Css?"