Hi all, I am working on a client's website and I have this small issue. You can check the initial layout at http://owace.com/DI%20Stuff/index.html. My concern is that when I try to drag the browser edge to increase or decrease the window size, the header div does not move along with the containter? I am sure it's a small thing I am missing; probably something to do with float or overflow. I am in a rush and that's why seek help. Thanks in advance! Cheers!
You can check the source of that link or here it is: #container { width: 789px; height: 487px; margin: 0 auto; margin-top: 100px; background-image: url(images/content_bg.png); } #header { height: 62px; margin-top: -470px; margin-left: 245px; background: url(images/logo.jpg); background-repeat: no-repeat; float: inherit; }
Ok, all i did was put the header inside teh comtainer and take away the massive margins you had.... and added small ones to make it fit nicley, <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>::Globe-Link Sourcing Inc.::</title> </head> <style> html, body { margin: 0; padding: 0; background:url(New-WEBSITE.png); } #container { width: 789px; height: 487px; margin: 0 auto; margin-top: 100px; background-image: url(images/content_bg.png); } #header { background: url(images/logo.jpg); background-repeat: no-repeat; height: 62px; margin-top:15px; margin-left:15px; } </style> <body> <div id="container"> <div id="header"></div> </div> </body> </html> Code (markup):
Thanks again for your correction. Now it works perfect on IE but not on any version of Firefox (I have version 3). I can't seem to move the the logo by changing margins. Any suggestions?
The logo is aligned nicely in center within the header (margin-top: 15px, margin-bottom: 15px) but only in IE and not in FF. In FF it is alined on top left corner and doesn't seem to change it's position if I change the margin. Why don't you test it? Thanks!