Web Hosting Talk







View Full Version : Placing an image in div tag(s)


luxx
12-03-2008, 12:52 PM
Placing an image in div tag(s)

To place an image within a webpage in <div> tags, would you put it in one div tag or is it more considered better practice to break up the picture and put the image in different div tags?
Hopefully this isnt too confusing.

BergB
12-07-2008, 07:38 AM
Hey luxx,
what exactly do you mean by "break up the picture"?
Ben

nmluan
12-10-2008, 04:06 AM
He might mean breaking the images up like Adobe Image Ready do for you. It slices the picture up and put the little pieces in many table cells to create the visual effect of a design.
This, while very simple and easy to do, leaves no chance for extensibility and modifications.
Any small change to your original design will invoke changes in ALL of the pieces. If you're slicing your image up and somehow lost the original photoshop file (with the slice location and dimensions) your site is gone, no way on earth (meaning you'd go through hell if you want) to get the design back and extend it etc...





__________________
ML

colbyt
12-10-2008, 05:39 PM
Assuming that nmluan was correct in what you meant, any image up to about 40KB will display fine and reasonably quick for most users.
If you are new at this you should really study how much an image can be compressed and still look good on the web. You can cut the file size way down with compression and it will still look great.





__________________
Colbyt

hgworld
12-11-2008, 07:24 AM
Unless your picture is huge in size (~100kb), you're ok without slicing the picture.
Whenever you see those full one page image ads, they're mostly sliced up and optimized.
Its logical... Otherwise the user would have to wait a long time before your image loaded.
if you slice it up, then the parts keep showing up