I have a script which allows to display favicon based on the url over here: JsBin
I have set a padding right for img in the css. Th problem is that the second url(nu.nl) is also getting the css padding right while there is no favicon img. How can I set the css or change the script so that my img styling would only effect the img and not the other urls?
i think you can set width to imgs like this. And you can use margin for the image.
img {margin-right: 10px;width:16px;height:16px;}if there is no image, there will be a blank square.
Edit:
if there is no image, the image will not be displayed with jsvascirpt.
i am added the following lines :
http://jsbin.com/udukut/9/edit