CSS Layout - images
- Started
- Last post
- 5 Responses
- mg33
I keep starting these kind of threads to see what many of you prefer for certain aspects of CSS layout.
I'm mulling over a particular dilemma at the moment, tell me what you think:
Imagine a section of a page that lists news for different business groups - 10 total
Version 1)ALL site images controlled with the CSS, with a particular div title exclusive to graphics that change from page to page, ex. scrolling menu titles.
Version 2)
Positioning only for a common div, with the images added in the HTML page itself.If you had 10 different graphics as titles for these sections, loading images in the CSS (prefered) would really increase the length of code to deal with positioning them. It would be in the CSS, but only 1 of 10 would be active on any given HTML page.
Creating one div in the desired position and putting an image link in the HTML would cut down on CSS file size, but spread your links all over the place, less centralized control.
Thoughts?
- stewart0
ohlala!
- ornj0
javascript?
- mg330
condensed version:
10 seperate divs in css, each with images loaded, but only 1 div active in an HTML page.
vs.
1 div in css, and 1 of 10 seperate images loaded with an img tag in the HTML.
Which one would you go to bed with?
- Quisp0
Sounds like either would work. Maybe the question is, are the images considered "content" or are they considered "interface". If "content" (ie stuff that may change over time or throughout different pages), consider keeping them in the HTML. If "interface" ie: navigation elements, then consider doing in CSS, particularly if a section uses the same graphic over multiple pages.
For me, sounds like the HTML solution is what you're lookin' for but hard to say based on the details.
- mg330
Thanks, that actually was a good example, content vs. interface.