Hi! My name is Max Lionhart.
I'm a writer, not a webmaster, hi. But I still know alittle bit of Css/html...
Well, I'm not good at English, so if I make wrong grammar here, please forgive me.
First of all, I want to say that "thank you so much because you spend time to read this topic".
Well, I intend to make a web for my reader, but I got a problem about position-fixed.
In resolution 1024*768 as my computer use now, the Screen is good, position of object is okie.
You can look at that pic:
But then, when I change resolution to bigger size (like 1280*1024 or something like that), the position of object change.
I understand that because I set the back-ground and object is px in padding. So, then I changed them to percent (%), and I fix the back-ground to center of the web, but it still not completed.
Well, I have no ideas right now, so, please, help me if you have free time.
I will post my Css code here:
body { background:url(images/mlbackground.jpg) no-repeat fixed center center #ffffff; padding-top:21%; padding-left:61%; }
My html code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Max Lionhart Test Website</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style2.css" /> </head> <body> <a href="#"> <img src="images/trangchu.png" alt="homepages" border=0> </a> <Br> <Br> <Br> <a href="#"> <img src="images/thongtin.png" alt="news" border=0> </a> <Br> <Br> <Br> <a href="#"> <img src="images/diendan.png" alt="forum" border=0> </a> <Br> <Br> <Br> <I> <font color=0000gf size=2> Copyright © 2011 by Max Lionhart Foundation, <Br> All rights reserved. </font> </I> </body> </html>
Well, for any one who want to see all the web and code, you can download here: http://www.mediafire.com/?e2dh4ch80n2e1uo
Thank you so much for reading my topic.
I hope you can help me if you have free time.
Thanks,
Max Lionhart
Is the layout supposed to be centred?
If so, make body margin: 0 auto then use pixel values for the left and top padding because your background-image is a fixed size and doesn't vary depending on the size of the browser window.