I'm making a splash video page. I have a page, with a background picture of basically an outdoor cinema with a screen in the middle of the page. The problem is that the picture is 1440x788, and it has scroll bars because the pictures to big. What I would like to happen is for it to cut off (horizontally and vertically) the background so it will look correct. One site I saw that done this is CustomCoD . com. How do I do it like theres?
I have always thought that a background image on a page doesnt make scroll bars if it is too big? Are you using the right CSS? body { background-image:url(image.jpg); } Code (markup):
You can always make the image dimensions smaller. If it is too large and with overflow hidden, it is going to get clipped. A couple of years ago we designed for 800px wide screens. Today it is 1024px, and thus the 960 grid. Your image is too large and you are omitting a lot of traffic from your overall image. Make it smaller and adapt.
I'm using this code exactly. <div style="background-image:url(images/splash-bg-test.jpg); background-attachment:fixed; min-height:100%; width:100%; position:absolute; overflow:hidden;"> </div> Code (markup): Change it around to something that would work if you have an idea of what I can do.
Is this supposed to display as the background image of the whole page, or a single div? I dont see why you dont just add a background image to the body property in this case?
Plus it is kind of hard to advise, when we do not see the Html that comes before and after. It looks like that DIV is going to take up the whole screen and push everything else out of the way.
I just googled "HTML Background" and used the first code I saw. If I can use something else, please give me the full code, and I'll try it out.
body { background:url(images/splash-bg-test.jpg) fixed; } Code (markup): Putting that in an HTML page just prints it. Can you convert that to code that will be fine in an HTML page?
That is CSS not HTML. Put that in an external stylesheet or enclose it in <style></style> tags. Just curious do you have any experience in HTML coding at all?