Closed Thread Icon

Preserved Topic: For all of you experienced HTML gurus Pages that link to <a href="https://ozoneasylum.com/backlink?for=16102" title="Pages that link to Preserved Topic: For all of you experienced HTML gurus" rel="nofollow" >Preserved Topic: For all of you experienced HTML gurus\

 
Author Thread
Ducati
Paranoid (IV) Inmate

From: in your head
Insane since: Feb 2001

posted posted 06-25-2001 19:00

I have a question. The way I design my site is I open new document in photoshop and design the whole page not paying attention to size. Then after I am happy with the outcome I slice it up and save it optimized with each slice individually optimized. Now... in some cases I have a slice that has just a color in it. My question is:

Is it better to just create a cell and fill it up with a color or create a cell and insert the image with the color? I mean...is it better to have a bigger and longer HTML code or little bigger slice size? As I play around more I come into things like this.



[This message has been edited by Ducati (edited 06-25-2001).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-25-2001 19:12

It is better to have cell with defined background color.

Ducati
Paranoid (IV) Inmate

From: in your head
Insane since: Feb 2001

posted posted 06-25-2001 19:16

Thank you Mr Max.. Now I am clear about this.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 06-25-2001 19:45

Ducati,

I agree with mr.maX but there is one thing to watch out for. I have had problems sometimes with certain colors not rendering the same on different platforms. So an image may have a certain shade of purple but a bgcolor setting might come out slightly differently. This can occur say from a PC to a Mac or if you're used to using 32bit color and your audience is using 16bit. Just make sure you test your page out on several different configurations to be sure.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-25-2001 20:05

Also, if you are forced to use images due to problems with same/differnet colors as Bugimus said, it is better to define that image as cell background, instead of including it via <IMG> tag.

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 06-25-2001 21:27

Yes, that way if you have to go with a background image for just a color, you can use a much smaller image than need to fill the space and it will tile. Smaller image = Less download time.

- Resolutions, Of All My Fruitless Searches -

jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 06-25-2001 22:15

Don't make it too small, the tiling operation can take longer than DLing the picture... If you only have a 1 pixel image for instance, on large monitors it could have to tile it over 1,000,000 times! Make a 50x50 image and save it as a GIF. Since GIF is indexed color it will be plenty small.

-jiblet

St. Seneca
Paranoid (IV) Inmate

From: 3rd shelf, behind the cereal
Insane since: Dec 2000

posted posted 06-26-2001 15:03

Bugimus is correct that matching background colors with image colors can be difficult. As long as you are sticking to the 216 websafe colors in your images, however, your problems should be minimal.

Generally speaking, whenever you can replace an image with some funkified and complicated HTML/CSS coding, it is better to go with the code. Code is going to take up less memory in most cases and result in faster downloads.

As far as the background image debate, instead of tiling a background, I would put the 1 pixel gif in an image tag and then set my width and heighth to what I needed, but it all depends on how much space you are trying to kill off. It's better to go with a bgcolor whenever you can.

<DIV STYLE="background-color: #ffffcc;">This CSS box model works so well for so many things.</DIV>

It's your God, they're your rules, YOU go to Hell.

« BackwardsOnwards »

Show Forum Drop Down Menu