sonita Posted April 14, 2013 Share Posted April 14, 2013 hello this image(attach file) is header for my website. I have a header on all pages of monotony.But I do not know how to set it on top of the pages are.Please help me and if possible give me a css code for it. tanks I'm waiting. Link to comment Share on other sites More sharing options...
jeffman Posted April 14, 2013 Share Posted April 14, 2013 One way is to create a header element (it can be a div or a header) and use the image as a background. The header will be the first element of your body. CSS for that might look like this: .header { background-image: url("myImage.jpg"); background-repeat: no-repeat;} But be careful. The image will not show completely if the height of the header is smaller than the height of the image. If that is a problem, set the height or min-height of the header to the height of the image (or more). You may also want to add padding-left to the header that is the width of the image (or a little more) so that the image is not covered by contents of the header, such as text. Link to comment Share on other sites More sharing options...
sonita Posted April 15, 2013 Author Share Posted April 15, 2013 hello ,thnkyou ,I nuderstand. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now