Ok on my forum i am trying to center a header image at the top but it always goes to the left side of the page, is there a code i can make that will center it?
try putting <div align="center"> before your picture. just make sure to close the above tag with a </div> after your picture. try that, or use CSS to make your layout and use something like the code below for your header: Code: #header { margin: 20px; padding: 10px; height: 100px; background-image: url(*your picture*.gif, jpg, png)
bad way ^^^ good way \/\/\/ Code: #header { width:600px /*Or whatever you want*/ height: 100px; margin:auto; /*centers the div*/ background: url(*your picture*.gif, jpg, png) top center no-repeat; /*centers the background image to the top*/ }
Ok thanks alot guys, So can i actually resize this banner by just that code you show will, instead of bringing it back into photoshop to resize everytime?
Not AFAIK If your host has the GD lib working then you could always resize it using that! Alternatively, to allow it to be resized you could just create an img element with a z-index lower than the text with the dimensions you require.
I thought you meant that you wanted the image center, not that it would stretch to fit.... Tbh, stretching an image in a browser looses the quality vber badly.