₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,612 members, 8,427,268 topics. Date: Monday, 15 June 2026 at 04:21 PM

Toggle theme

Image Vs Css - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersImage Vs Css (711 Views)

1 Reply (Go Down)

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 huh? 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.
1 Reply

Write HTML And CSS Codes On Android DevicesHow To: Create A Simple Hover Button With Html And CssHow To Use Ajax For Image Verification Aka CAPTCHA234

DissapointedDreameaver Website Templates?Learn Dynamic Webdesign And Oracle Database: Stop Looking For Work And Work F