i have seen on many websites.. that background is static does not scroll with the page..( like on twitter) and i have also seen that..... some elements on a site are static they do not move when the page is scrolled..
style="background:#09151F url(images/air-plane.jpg) repeat-x fixed left top; "
when i use this above tag it worked
but when i used style="background-image:imageurl; position:fixed"; then it didn't worked for me ? why?
image was shown but postiion was not taken
and can u point me to a tutorial where i can learn css tags of following types style="background:#09151F url(images/air-plane.jpg) repeat-x fixed left top; "
thanks in advance // i never knew of this fixed position.
can u guys help me to fixed position image? because i tried above and it didnt worked for me...
i want to create one image button on fixed position...thanks.. and when it is mouse over... then i want to change this image size.....and add 2 more links...is it possible?
style="background:#09151F url(images/air-plane.jpg) repeat-x fixed left top; "
when i use this above tag it worked
but when i used style="background-image:imageurl; position:fixed"; then it didn't worked for me ? why?
image was shown but postiion was not taken
That is because in your first declaration, the "position" was being applied to the background. In your second declaration, the position was being applied to the element. Example:
<div style="background:url no-repeat fixed top left;"> - this would make the background have no repeat, and be in a fixed position (top, left).
The same thing can be done with:
<div style="background:url; background-repeat:none; background-position:fixed top left;"> - note how all of the other declarations in there all apply to the background.
Your second example:
<div style="background:url; position:fixed;"> - this will not position the background as 'fixed'. Instead, it will position the <div> as fixed.
i have seen on many websites..
that background is static does not scroll with the page..( like on twitter)
and i have also seen that..... some elements on a site are static they do not move when the page is scrolled..
how do we do it?
style="background:#09151F url(images/air-plane.jpg) repeat-x fixed left top; "
when i use this above tag it worked
but when i used
style="background-image:imageurl; position:fixed";
then it didn't worked for me ? why?
image was shown but postiion was not taken
and can u point me to a tutorial where i can learn css tags of following types
style="background:#09151F url(images/air-plane.jpg) repeat-x fixed left top; "
thanks in advance // i never knew of this fixed position.
can u guys help me to fixed position image?
because i tried above and it didnt worked for me...
i want to create one image button on fixed position...thanks..
and when it is mouse over... then i want to change this image size.....and add 2 more links...is it possible?
http://www.w3schools.com/css/css_positioning.asp
That is because in your first declaration, the "position" was being applied to the background. In your second declaration, the position was being applied to the element. Example:
<div style="background:url no-repeat fixed top left;"> - this would make the background have no repeat, and be in a fixed position (top, left).
The same thing can be done with:
<div style="background:url; background-repeat:none; background-position:fixed top left;"> - note how all of the other declarations in there all apply to the background.
Your second example:
<div style="background:url; position:fixed;"> - this will not position the background as 'fixed'. Instead, it will position the <div> as fixed.