Reputation: 15
I have a HTML file that i get from the web, when i open it locally everything looks great, but if u upload the file to web server half of the elements disappear from the page. Even more, some navigators seems to be able to show the elements while others cannot. IE for example shows everything, while Chrome and Opera does not. Here is the code:
<div class="top-ads row">
<div class="col-md-4 sec-heading">Top Ads</div>
<div class="col-md-4"></div>
<div class="col-md-4">
<a class="left-arr-btn right carousel-control" href="#carousel-example-generic" data-slide="prev" >
<img class="left-arr-img" src="images/left-arrow.png">
</a>
<a class="right-arr-btn right carousel-control" href="#carousel-example-generic" data-slide="next">
<img class="right-arr-img" src="images/right-arrow.png">
</a>
</div>
</div>
It seems that all top-ads is buggy, here is the styling:
.top-ads{
margin-top: 2em;
}
I don't understand, if it shows ok from disk, why it shows blank on the web? I'll try to add some screenshots... Working Not working
Upvotes: 0
Views: 102
Reputation: 730
Perhaps you should check your images
folder is at the right place on the server.
You could also try giving a relative path, by replacing this:
src="images/left-arrow.png"
by this:
src="../../images/left-arrow.png"
or an equivalent relative path going back up to the root directory of your website.
Upvotes: 1
Reputation: 2963
Have you provided all your code? If so you have no doctype declaration, no html or body tags - modern browsers will forgive this but older ones won't. Read up on html structure here: https://www.w3.org/TR/html401/struct/global.html
This for HTML4:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>My first HTML document</TITLE>
</HEAD>
<BODY>
<P>Hello world!
</BODY>
</HTML>
And to run html5 instead use this doctype:
<!DOCTYPE html>
Upvotes: 0