/    Sign up×
Community /Pin to ProfileBookmark

put image slices in HTML or CSS??

I have created a site and sliced it in fireworks, and exported it and I am now piecing it together using dreamweaver. I am using CSS to position the slices. Is there a better way to do what I’m doing. The way I am doing it seems rather tedious. I have attached screenshots of my HTML and CSS.

Thanks,
Kris.

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@CaptainkewlauthorFeb 09.2009 — OR is this a better way to do it (see screenshots).

Thanks.
Copy linkTweet thisAlerts:
@CaptainkewlauthorFeb 09.2009 — I have created a site and sliced it in fireworks, and exported it and I am now piecing it together using dreamweaver. I am using CSS to position the slices. Is there a better way to do what I'm doing. The way I am doing it seems rather tedious. I have attached screenshots of my HTML and CSS. Are screenshots Untitled-1 and 2 correct, or screenshots Untitled-3 and 4?

Thanks,

Kris.
Copy linkTweet thisAlerts:
@WebJoelFeb 09.2009 — CSS:[code=html]<style>
.images {clear:left; float:left;.... }
...(etc)
</style>[/code]



[code=html]<div>
<img src="#" class="images" />
<img src="#" class="images" />
<img src="#" class="images" />
<img src="#" class="images" />
<img src="#" class="images" />
(etc.)
....
<img src="#" class="images" />
</div>[/code]
but would need to see you actual code to know if this is closer to what you are trying to do...

You do no need to 'DIV-itis' this... no need to wrap every image in a "DIV" and no need to bloat your CSS with a CLASS or ID for every DIV thereof... let the CSS 'cascade' through your HTML... state it once and let it be re-used.. :p Smaller code is faster-loading, less bandwidth, easier to maintain, etc.

Or, smaller still:

CSS:[code=html]<style>
#images img {clear:left; float:left;.... }
...(etc)
</style>[/code]


[code=html]<div id="images">
<img src="#" />
<img src="#" />
<img src="#" />
<img src="#" />
<img src="#" />
(etc.)
....
<img src="#" />
</div>[/code]
and says exactly the same thing. ?
Copy linkTweet thisAlerts:
@CaptainkewlauthorFeb 09.2009 — Very good point Joel. That makes a lot more sense. I have heard some people say that it's better to put the image URL in the css code rather than the HTML code. Does it really matter?

Kris.
Copy linkTweet thisAlerts:
@FangFeb 09.2009 — Images that are decorative place as background in css.

Images that add to the 'content' place in the html.
Copy linkTweet thisAlerts:
@CaptainkewlauthorFeb 09.2009 — Okay, thanks for the clarification Fang ?
×

Success!

Help @Captainkewl spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...