Image not loading - "Failed to load the given URL" - html

I have an issue with firefox, it doesn't load an image.All the other,Chrome, Opera and IE can load this but firefox fails, it does not display any picture and if i go check with firebug it displays the following error on the image link: "Failed to load the given URL". I did clear my cache, also, if i open the image link in another tab it works.
THe code:
<ul class="nav navbar-nav navbar-right">
<li>
<a style='padding:4px' href="<?php echo $login_url?>">
<img src="<?php echo base_url(); ?>img/facebook_log22.png" class='facebookLogin' />
</a>
</li>
</ul>
Also in style:
.facebookLogin
{
height:40px;
}
I'm using codeigniter(if u wonder about base_url() function) and bootstrap(but i don't think that matters so much.
Edit: I also see that it adds another class to the code...
Also,the error:

Ok,i finally know what the problem was,and it is called adblock plus.Damnit,totally forgot i have that installed on my firefox.
Thanks a lot guys.

If you are referencing image from domain, it will not work, unless you:
put http:// in front of your link: src="http://<?php echo base_url(); ?>/img/facebook_log22.png", or
create a relative link: src="/img/facebook_log22.png" .

I also ha a similar error , i opened it again with a different browser it was working .
right click >View Image > you must be able to see your image if the link is correct .

I once had a similar problem and after a frustrating time of checking and rechecking my path, I realized the problem was the images were uploaded as ".JPG" but my css had ".jpg" It was a capitalization issue.

Related

Web page doesn't render svg

I have a simple html page :
#my_svg{
width: 75px;
height: auto
}
<a href="#">
<div id="my_svg">
<img src="https://svgshare.com/i/MHB.svg" alt="English flag">
</div>
</a>
All I see is English flag so it seems like my svg is not loading. I'm sure about the path because I have the image as png on the same folder and it's working well. Just changing the extension.
The weird part is that I don't have any 404 error in my console. It's working when I add it throught the link https://svgshare.com/i/MHB.svg but when I use the local file it doesn't work. On my side I don't have any webserver and don't want
So your problem is its not working on the local file right? I think it will work if you use <img src="./flag.svg" alt="English Flag'>. That should work, sometimes not adding "./" on the src attribute will have issues because the browser might think it is a web link, not a path link.

Svg Object - blank/transparent/white

I am trying to have a svg icon using the object tag. However, it does not display anything.
The SVG files is blank/transparent/white, and it does not seem that there are any data on it.
HTML
<div id="navbar-brand-cont">
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>">
<object data="<?php bloginfo('stylesheet_directory'); ?>/img/logoo.svg" type="image/svg+xml">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/logo.png">
</object>
</a>
</div>
Adress: http://bit.ly/1LTSf5b
Export settings:
Any suggestions?
The referenced SVG file does not contain anything renderable i.e. it's got no shapes or text, just SVG font definitions.
The problem was solved by changing some of the code and exporting in a different way.
The image was blank/transparent/white because of a bug in Illustrator. The export problem was solved by doing the following:
Copy the file into a new document
Put everything on one layer
Export
In the code there was an issue with navbar-brand-cont and navbar-brand. This problem was solved by doing some minor changes.
Please, read about the SVG element in HTML and you can achieve it.
http://www.w3schools.com/svg/svg_inhtml.asp
If you include the SVG code it works. Also, read about Räphael that helps you to play with svg objects.
http://raphaeljs.com
Good luck!

Wordpress changes URL?

I have an image which serves as an a href, the following a href doesn't work:
<div id="buttonNext">
<a href="1-5/redrum-10">
<img id="buttonNextImg" src="../../resources/img/buttonImg/next.png"/></a>
</div>
Me clicking on the link results in me being redirected to this website:
http://localhost/redrumwordpress/wordpress/redrum-10/
which also exists, but it doesn't link me to the correct website, the following code does work and links to the correct website:
<div id="buttonNextBottom">
<a href="1-5/redrum-5/">
<img id="buttonNextImgBottom" src="../../resources/img/buttonImg/next.png"/></a>
</div>
Which re-directs me to the correct page:
http://localhost/redrumwordpress/wordpress/1-5/redrum-4/
I've checked if I missed something like a / or ../ maybe it was in the wrong folder.
I've checked for the file not being there, but it is and it isn't corrupt.
Could anyone help me with why WordPress won't link to the correct website, when I use this website outside of wordpress it works just fine.
Can't you use:
<?php bloginfo('url'); ?>
Which will get your site address, then add the link path relative to this?

How make a div link to another page?

Something isn't right! I am trying to link this div to another page but it keeps giving me 404 error when I click it. I tried replacing the page with google.com and it worked fine! I know this page works because if i run it alone in a browser it works fine! Whats going on??
<a style="display:block" href="../unitedStates.php">
<div id="regionsUnitedStates" class="not-open regionsButton">
<div id="regionsUnitedStatesTooltip"></div>
</div></a>
You href your div to parent directory with "../". Instead this use :
<a style="display:block" href="/unitedStates.php">
your path in href is doesnot exists. Try checking the absolute url of your path in browser and add it in href.

links working in Mozilla Firefox, but not in Internet Explorer

I seem to have problems with my links, they are not doing anything in Internet Explorer
<a style="text-decoration:none;" href="<?php echo base_url();?>index.php/person/create/<?php echo $this->uri->segment(4);?>" >
If I look at the source my link is href="http://localhost/index.php/person/create/2".
This is working in Mozilla but in IE the link is going nowhere.
It looks like you didn't mean to put index.php in your url - I doubt that you can traverse into /person/create/2 after index.php. Try removing that?
Try this:
<?php $url = $this->uri->segment(4); ?>
<a style="text-decoration:none;" href="<?php echo base_url("index.php/person/create/$url");?>">click</a>
If you have an index page specified in your 'config.php' you don't have to add /index.php/ to your url.
Hope it helps.