HTML & CSS
I am currently making a website of fixed width(984px). Now I want to use a background image for header which exceeds 984 px. Is there a way by which i can use wider background image?
Thanks in Advance.
If the bacogrojd iw bigger than the element it is placed on, it will overflow. if yo want it to scale, then you must place it inside the element (as a child element) and give it a width and height of 100%. With CSS3 you can set a background image size, but this does not work on IE8 and lower
You could place a separate div above the main content that is wider than the main section.
I think you may need to clarify the question a little.?
You can always use a wider background image in an element because the background is always the width of the actual element and the image will just be clipped at the elements dimensions.
If you want a bigger element then as Ralph said you will need to make the element bigger or use another element.:)
Or if you want to scale a foreground image then you can do as Tommy suggests but that really depends on the image as some images do not scale nicely.
If you want a header that repeats all along the top of the viewport you could apply it to the body element and repeat it on the x-axis.
It all depends on your exact requirements:)