css - Why can't I adjust my div's position -


basically using "tryit editor" w3 website , code started out with

<!doctype html> <html> <head> <style>  body { background-image:url("img_tree.gif"),url("img_flwr.gif"); background-color:#cccccc; } </style> </head> <body>  </body> </html> 

i wanted change background color , background images found on div, not on whole page. wanted move div around page. able make div background elements, wasn't able move around page. used following code, thinking

top:150px; left: 150px; 

would have caused div change position

<!doctype html> <html> <head> <style>  div  { position=fixed; top:150px; left: 150px; background-image:url("img_tree.gif"),url("img_flwr.gif"); background-color:#00dccc; height: 200px; width: 200px; } </style> </head> <body> <div> </div> </body> </html> 

alas, div did not change position. gives?

thanks! :]

you have equals sign rather colon in position declaration causing page ignore it. change , it'll work!

edit: fixing awful terminology pavlo, can't believe did :p


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -