我有一个简单的网站(主要是静态html / css)但由于某些原因,某些页面不会在Firefox中应用外部css(在IE中工作)。
http://bjmarine.net/services.html - 被打破了
http://bjmarine.net/index.html - 工作正常
我比较了两个文件,看不出有任何区别。我在editplus和记事本中尝试过它们。当我用萤火虫和新鲜的东西查看破碎的页面时,我开始在整个地方看到一些汉字。不知道如何解决这个问题,或者它是如何解决的。我担心该网站已被其他人更改,或者编辑添加了这些隐藏的角色(我只使用VS2008和editplus)。
我可以在破损页面上的js中看到错误,但相同的代码不会在工作页面上出错。
任何人都可以提供解决方案和发生什么原因吗?
由于 丹尼斯
答案 0 :(得分:2)
查看html文件的编码
索引是ISO-8859-1和服务utf-16(这就是为什么你看到奇怪的字符)。
在编辑器中打开文件,保存为clic并将service.html的编码更改回iso。
答案 1 :(得分:1)
对您使用的编码保持一致(UTF-8是一个不错的选择),并配置您的Web服务器以在HTTP响应标头中指定该编码。
答案 2 :(得分:1)
“********************************************”in CSS文件注释可能是尝试删除它的问题。
警告:搜索','或'{'时文件意外结束。由于选择器错误而忽略了规则集。 源文件:http://bjmarine.net/images/bjmarine.css 行:1
根据Firefox(查看源代码),破坏的源文件以UTF-16编码,但作为iso-8859-1。
答案 3 :(得分:0)
您的javascript中存在错误:_gat未在...中定义,它看起来像services.html中的第184行。
答案 4 :(得分:0)
您可能希望确保样式表的路径实际到达样式表所在的文件夹。
完整路径应为http://bjmarine.net/images/bjmarine.css
以下是修正路径的完整页面。
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="Description" content="Boats, Power, Sail, Marina, Berths, Malahide, Dublin, Bangor, Cork, Malta" />
<meta name="Keywords" content="your, keywords" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="Denis Hoctor - denishoctor@gmail.com" />
<meta name="Robots" content="index,follow" />
<link rel="stylesheet" href="http://bjmarine.net/images/bjmarine.css" type="text/css" /><link rel="icon" href="/favicon.ico" type="image/x-icon">
<title>BJ Marine.net Power/Sail New & Used Boats</title>
</head>
<body>
<!-- wrap starts here -->
<div id="wrap">
<div id="header">
<div id="logo"><img src="images/BJMarineLogo811x77.jpg" width="811" height="77" alt="BJ Marine Header" class="no-border" /></div>
<!-- Menu Tabs -->
<ul>
<li><a href="index.html"><span>Home</span></a></li>
<li><a href="featuredboats.html"><span>FeaturedBoats</span></a></li>
<li><a href="newboats.html"><span>NewBoats</span></a></li>
<li><a href="brokerage.html"><span>UsedBoats</span></a></li>
<li><a href="ouroffices.html"><span>OurOffices</span></a></li>
<li><a href="salesteam.html"><span>SalesTeam</span></a></li>
<li><a href="sellyourboat.html"><span>SellYourBoat</span></a></li>
<li id="current"><a href="services.html"><span>Services</span></a></li>
<li><a href="contact.html"><span>Contact</span></a></li>
</ul>
</div>
<!-- content-wrap starts here -->
<div id="content-wrap">
<div id="header-columns">
<div class="col7"><a href="new/newboatsframe.html#http://www.beneteau.com/" id="img_rollover_beneteau"><span>Beneteau</span></a></div>
<div class="col7"><a href="new/newboatsframe.html#http://www.searay.com/" id="img_rollover_searay"><span>Searay</span></a></div>
<div class="col7-center"><a href="new/newboatsframe.html#http://www.cranchi.com/" id="img_rollover_cranchi"><span>Cranchi</span></a></div>
<div class="col7-center"><a href="new/newboatsframe.html#http://www.ferretti-yachts.com/" id="img_rollover_ferretti"><span>Ferretti</span></a></div>
<div class="col7-center"><a href="new/newboatsframe.html#http://www.customline-yacht.com/" id="img_rollover_customline"><span>Customline</span></a></div>
<div class="col7-center"><a href="new/newboatsframe.html#http://www.mochicraft.com/" id="img_rollover_mochicraft"><span>Mochi Craft</span></a></div>
<div class="col7-center"><a href="new/newboatsframe.html#http://www.searanger.com/" id="img_rollover_searanger"><span>Searanger</span></a></div>
</div>
<div id="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>
<div class="staff-columns">
<div>
<p>Our parts department can be contacted directly by email at <a href="mailto:parts@bjmarine.net">parts@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>
<ul style="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>
<a href="http://www.dmgsailsports.com/"><img src="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 />
<a href="http://www.lombard.ie/lombard/ireland/personal_customers/marine/index.html"><img src="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 <a href="http://www.lombard.ie/lombard/ireland/personal_customers/marine/index.html">Lombard Marine Finance</a>.</p>
<br /><br />
<h3>Weather and tides</h3>
<ul class="tidelist">
<li>
<a href="http://www.met.ie/forecasts/sea-area.asp">Met Eireann</a> – Sea area Forcast
<a href="http://www.met.ie/forecasts/sea-area.asp"><img src="images/met_logo.gif" width="60" height="32" alt="MET Eireann logo" class="float-right-noborder-tides" /></a>
</li>
<li><a href="http://www.met.ie/latest/buoy.asp">M2 Weather buoy</a> – Approx 20 nautical miles east of Howth Headt</li>
<li>
<a href="http://www.ireland.com/weather/tides.htm">Irish Daily Tides</a>
<a href="http://www.ireland.com/weather/tides.htm"><img src="images/irishtimes_logo.gif" width="175" height="17" alt="Irish Times logo" class="float-right-noborder-tides" /></a>
</li>
<li>
<a href="http://www.windguru.cz/int/index.php?sc=47773">WindGuru</a>
<a href="http://www.windguru.cz/int/index.php?sc=47773"><img src="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>
<div id="footer-wrap">
<div id="footer-columns">
<div class="col3">
<h3>Dublin</h3>
<code>
Malahide<br />
Dublin, Ireland<br />
Tel:(+353) 1 8061560<br />
<a href="mailto:sales@bjmarine.net">sales@bjmarine.net</a>
</code>
</div>
<div class="col3-center">
<h3>Cork</h3>
<code>
Co. Cork<br />
Ireland<br />
Tel:(+353) 87 7712224<br />
<a href="mailto:sales@bjmarine.net">sales@bjmarine.net</a>
</code>
</div>
<div class="col3-center">
<h3>Belfast</h3>
<code>
Bangor Marina<br />
Co. Down, N. Ireland<br />
Tel:(+44) 2891 271434<br />
<a href="mailto:sales@bjmarine.net">sales@bjmarine.net</a>
</code>
</div>
<div class="col3">
<h3>Mediterranean</h3>
<code>
Grand Harbour Marina<br />
Malta<br />
Tel:(+356) 27019356<br />
<a href="mailto:sales@bjmarine.net">sales@bjmarine.net</a>
</code>
</div>
<!-- footer-columns ends -->
</div>
<div id="footer-bottom">
<p>
© 2008 <strong>BJ Marine Ltd.</strong> |
Design by: <a href="mailto:denishoctor@gmail.com">Denis Hoctor</a> |
Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> |
<a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
<a href="index.html">Home</a> |
<a href="contact.html">Contact</a>
</p>
</div>
<!-- footer ends-->
</div>
<!-- wrap ends here -->
</div>
<script type="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>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1206900-2");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>
将此路径放置在页面本身本地,除了您的徽标外,还有其他内容。
祝你好运,希望这会对你有所帮助。答案 5 :(得分:0)
看起来你有一些css错误。
.align-centre
可能拼写错误且选择器属性未关闭:
}
我会浏览css文件并确保它有效。