atrum Posted November 28, 2010 Share Posted November 28, 2010 Just a quick best practices question here. I have noticed that some sites use background-color:#hexcodes for a header background, and others use pixel slivers and just repeat-x on the image. I am not talking about gradients, but solid colors blocks. Personally I think that for a solid color background in let's say a menu header or menu item block it's best to just use the background-color. However I was wondering is there an advantage in using slivers over hex codes? Quote Link to comment https://forums.phpfreaks.com/topic/220086-question-on-css-solid-color-background-vs-1px-image-slivers/ Share on other sites More sharing options...
haku Posted November 29, 2010 Share Posted November 29, 2010 None whatsoever if it's not a gradient. Images take many more bites than text, so a CSS declaration will always be better than an image if one can be used. Often one small image will be the same size as an entire CSS file. Quote Link to comment https://forums.phpfreaks.com/topic/220086-question-on-css-solid-color-background-vs-1px-image-slivers/#findComment-1140772 Share on other sites More sharing options...
fortnox007 Posted January 13, 2011 Share Posted January 13, 2011 for a solid color with opacity it could be nice, but than again there are ways to do that in css Quote Link to comment https://forums.phpfreaks.com/topic/220086-question-on-css-solid-color-background-vs-1px-image-slivers/#findComment-1159122 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.