Image Vs Css - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Image Vs Css (711 Views)
| Image Vs Css by smartsoft(op): 5:32pm On Jan 02, 2009 |
how bad is Image on your website, i mean using image such as image link, image background, image write up e.t.c ve' used image in past at least you yourself know the importance of CSS on a website not to talk of using image for the whole site sometime i just create a one page image web and show it to you and the next day it will be a css thing you might even minimize the of number images you use on your website and a good image optimize machine does the trick so fast it loads up your site fast, yah you know is bad what is the best way to approach this ? hey i didn't say using image aren't good oooo but just for the SEO thing and the speed of the website ! image on a website should be 30% |
| Re: Image Vs Css by yawatide(f): 5:39pm On Jan 02, 2009 |
Using IMG tags adds weight to your files and if such files are heavy, you are in for double trouble. Using CSS for images, typically only works for backgrounds. I say if you need a background, declare in the CSS otherwise, use an IMG tag in the HTML. Having said that, though redundant, there is nothing wrong with you creating IMG tags in ur HTML like so: <img src="whateversource" id="headImg" /> then having in your CSS: img#headImg { width: 30px; height: 30px; border: 0; } though IMHO, after a while, you might end up with bulky CSS files doing this. I personally only use this approach if I have a bunch of images that share teh same dimensions and behaviours and in that case, I would use class not ID. |
| Re: Image Vs Css by Nobody: 5:20am On Jan 03, 2009 |
i think the general idea is that whatever you use, use it reasonably. But we should keep in mind that the browser loads css faster than images, so it is better to have all your declarations in css where possible and minimize unnecessary coding. |
| Re: Image Vs Css by OmniPotens(m): 5:50am On Jan 03, 2009 |
Adding to all contributed so far, the technique still entails coding smartly. Pages loading faster with CSS in an advantage so using the <img> tag and controlling attributes with CSS is preferable. |
Write HTML And CSS Codes On Android Devices • How To: Create A Simple Hover Button With Html And Css • How To Use Ajax For Image Verification Aka CAPTCHA • 2 • 3 • 4
Dissapointed • Dreameaver Website Templates? • Learn Dynamic Webdesign And Oracle Database: Stop Looking For Work And Work F
? hey i didn't say using image aren't good oooo but just for the SEO thing and the speed of the website ! image on a website should be 30%