Image Vs Css

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 24, 2009, 10:43 AM
431738 members and 298734 Topics
Latest Member: Sonsowsshooth
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Webmasters (Moderators: OmniPotens, yawa-ti-de)  |  Image Vs Css
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: Image Vs Css  (Read 81 views)
smartsoft (m)
Image Vs Css
« on: January 02, 2009, 05:32 PM »

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%
yawa-ti-de (f)
Re: Image Vs Css
« #1 on: January 02, 2009, 05:39 PM »

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 your 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.
*dhtml
Re: Image Vs Css
« #2 on: January 03, 2009, 05:20 AM »

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.
OmniPotens (m)
Re: Image Vs Css
« #3 on: January 03, 2009, 05:50 AM »

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.
 The Shadekos'  Buying And Selling Of Expired Domain Names  Reliability In Web Hosting Is Important  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.