Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-14-2012, 05:41 PM   PM User | #1
mouseclock
New to the CF scene

 
Join Date: Jul 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mouseclock is an unknown quantity at this point
CSS Images

Currently, my website has tons of images and really that slows my website. I have tried using CSS sprites but failed to comprehend. Here's the CSS code and I wait for your suggestions on how to improve things.

Code:
.header_left {
	background:url(../images/header_left.png) repeat-x 0 0;
	height:64px;
	width:51%;
	position:absolute;
	left:0;
}
.header_right {
	background:url(../images/header_right.png) repeat-x 0 0;
	height:64px;
	width:51%;
	position:absolute;
	right:0;
}
.new_menu li a.new_active{
	background:url(../images/menu_newactive_right.png) no-repeat 100% 0%;
	color:#474747
}
.new_menu li a.active span span{
	background:url(../images/new_menu_active.png) repeat-x 50% 0%;
}
mouseclock is offline   Reply With Quote
Old 09-14-2012, 05:55 PM   PM User | #2
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 860
Thanks: 68
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Why not try to scale your images down so it decreases the file size. That's my only possible suggestion. And I don't know if it's a correct solution at that.

Could always give it a go though. See what happens.

Regards,

LC.
__________________
Carewizard - http://www.carewizard.co.uk
LearningCoder is offline   Reply With Quote
Old 09-14-2012, 05:59 PM   PM User | #3
mouseclock
New to the CF scene

 
Join Date: Jul 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mouseclock is an unknown quantity at this point
Quote:
Originally Posted by LearningCoder View Post
Why not try to scale your images down so it decreases the file size. That's my only possible suggestion. And I don't know if it's a correct solution at that.

Could always give it a go though. See what happens.

Regards,

LC.
That is already done using techniques like yahoo smush. The individual file sizes is already optimized. But there are many individual files, which is the real issue.

So many images ( with each around 300 bytes) and thus many requests. I want to lower those number of requests. So any ideas?
mouseclock is offline   Reply With Quote
Old 09-14-2012, 06:06 PM   PM User | #4
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 906
Thanks: 4
Thanked 212 Times in 211 Posts
tracknut is an unknown quantity at this point
Are these images things that could be done with CSS or text? It's hard to tell without a link to the page or links to the images. If you can create the visual with CSS, that's always best.

But if all the images are necessary, then yes sprites are the only solution I'm aware of.

Dave
tracknut is offline   Reply With Quote
Old 09-14-2012, 06:11 PM   PM User | #5
mouseclock
New to the CF scene

 
Join Date: Jul 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mouseclock is an unknown quantity at this point
Quote:
Originally Posted by tracknut View Post
Are these images things that could be done with CSS or text? It's hard to tell without a link to the page or links to the images. If you can create the visual with CSS, that's always best.

But if all the images are necessary, then yes sprites are the only solution I'm aware of.

Dave
The thing is I am struggling with sprites as well.

They don't seem to work on those kind of repeated images or round corner images. Based on the css code shown above, I am just unable to get it right. So I need help on CSS Sprites more than anything.
mouseclock is offline   Reply With Quote
Old 09-14-2012, 06:17 PM   PM User | #6
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 906
Thanks: 4
Thanked 212 Times in 211 Posts
tracknut is an unknown quantity at this point
I would be doing rounded corners with css at this point, not images. If that's what these are, get rid of them!

Dave
tracknut is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:34 AM.


Advertisement
Log in to turn off these ads.