PDA

View Full Version : Slicing........awaaayyyy!


africano
08-27-2008, 06:43 PM
Lots of threads today...i know! bit doing some work and many questions/problems!:x

Anyways here goes. Ive got an image of a background for Menu Bar. Instead of slicing the whole image, is it possible to slice only a bit and have it repeat horizontally? Ive tried this, telling it to repeat on the x axis but it makes tiles instead of one smooth image.
I guess Im looking for the "Proper" way to do it as I know I can simply make the image the size of my Navbar div.

Im also interested in any articles tutorials concerning how to make hover efects, etc in Navigation in CSS so if anyone has any good ones please post...off to google for a bit!
Im a pain today...I know!:(

Rob_Che
08-27-2008, 10:51 PM
Is this a photoshop question or CSS?
Do you mean to repeat the gradient in PS or Dreamweaver?

CSS

#divName {
background-image: url(../image.gif);
background-repeat: repeat-x;
}


Photoshop, you just need to duplicate it and merge it into one layer...

Rob

Rob_Che
08-27-2008, 10:53 PM
Re hover...
there's loads of tutorials out there...
Google "pure css" hover for the best results.
People have a habit of turning javascripting off and then there's no hover !

Corrosive
08-28-2008, 06:43 AM
[quote=africano;143580]Lots of threads today...i know! bit doing some work and many questions/problems!:x

That's never a problem Africano. People will always help.


Anyways here goes. Ive got an image of a background for Menu Bar. Instead of slicing the whole image, is it possible to slice only a bit and have it repeat horizontally? Ive tried this, telling it to repeat on the x axis but it makes tiles instead of one smooth image.
I guess Im looking for the "Proper" way to do it as I know I can simply make the image the size of my Navbar div.:(


Make sure you set exactly where you want your image to go. Try adding these to your CSS

background-attachment: scroll;
background-repeat: repeat-x;
background-position: center center;

Also make sure (though I'm sure you have) that you have made your image exactly the right height. :wink:

King Evil
09-01-2008, 07:22 PM
[quote=africano;143580]Anyways here goes. Ive got an image of a background for Menu Bar. Instead of slicing the whole image, is it possible to slice only a bit and have it repeat horizontally? Ive tried this, telling it to repeat on the x axis but it makes tiles instead of one smooth image.
I guess Im looking for the "Proper" way to do it as I know I can simply make the image the size of my Navbar div./quote]

do you have a sample of the background?