Thursday, December 24, 2009

Im creating a website and i need to know how to make an image stick in the center of the screen when you?

scroll down and i cant find the tag anywere... can someone please help?Im creating a website and i need to know how to make an image stick in the center of the screen when you?
Best way would be to use CSS (Cascading Style Sheets) to make it the background image.





Click here to learn about it:


http://w3schools.com/css/css_background.鈥?/a>Im creating a website and i need to know how to make an image stick in the center of the screen when you?
Well considering you are new to this the answers above might be slightly confusing though there are key elements in both.





So for what you need just add this:


%26lt;style type=';text/css';%26gt;


body {


background-image: url('path_to_your_picture/yourpicture.jp鈥?br>

background-repeat: no-repeat;


background-position: center;


}


%26lt;/style%26gt;


between the %26lt;head%26gt; %26lt;/head%26gt; tags.





There are other ways to do this (such as save all your layout in a *.css file and add a link to it). You can also define MUCH more things with CSS but I suggest you go to the w3schools website mentioned above for that.
background-position: center center; background-position: fixed;

No comments:

Post a Comment