Warptweet Posted September 29, 2007 Share Posted September 29, 2007 I'm having trouble with positioning my CSS div's properly. I need the CSS div's to be exactly 75 pixels down from the top, how would I be able to accomplish this? I'm positive this is quite easy, but I totaly forgot how. Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 29, 2007 Share Posted September 29, 2007 top? top of what? I don't understand the question but margin might be the answer. Quote Link to comment Share on other sites More sharing options...
Warptweet Posted September 30, 2007 Author Share Posted September 30, 2007 Yes, I set a margin now. But a new problem has arisen, I need a way to center my divs. Not the text, but the entire div itself, to the very center of the web page. Any help/suggestions are appreciated. Thanks, -Warptweet Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 30, 2007 Share Posted September 30, 2007 margin:auto Quote Link to comment Share on other sites More sharing options...
Warptweet Posted September 30, 2007 Author Share Posted September 30, 2007 Not to the absolute center of the entire web page. I meant center the entire divs on an x axis. Sorry, lol =( I tried using float: center; but it screwed everything up because I have 3divs connected to each other. Making them all centered made the rightnavigation div go below the other two. Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 30, 2007 Share Posted September 30, 2007 Rather than us guessing any more, why don't you post a link to the online version of this code so we can see for ourselves. Trying to debug oddments out of context and with no code just isn't working. Explain what should be happening to what and where. Quote Link to comment Share on other sites More sharing options...
Warptweet Posted September 30, 2007 Author Share Posted September 30, 2007 http://www.warptweet.com/v2 Look at it in Internet Explorer, then Firefox. In Internet Explorer it is slightly different aligned on the x-axis than Firefox. So in that case, I need a way to make it align automatically regardless of which browser. Quote Link to comment Share on other sites More sharing options...
dbrimlow Posted September 30, 2007 Share Posted September 30, 2007 Wartweet, you've done this before and it has driven you crazy. And it will continue to do so until you finally realize that you need to use a DOCTYPE if you want CSS to work for you. Without a proper DOCTYPE, your web pages will NEVER look and behave the same in FF and IE. You are creating "quirks mode" web pages. You can't just start a web page with "<HTML>". And since you are using xhtml style closed tags, use the xhtml DOCTYPE instead of just an <html> tag: <!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"> Until you do, no one can help you because the css will not work properly. Quote Link to comment Share on other sites More sharing options...
Warptweet Posted September 30, 2007 Author Share Posted September 30, 2007 Alright, I did that. Fortunately enough, it now works fine in IE and Firefox. Just in case I'm using an outdated version of IE, I'd appreciate anyone who tests it in IE and Firefox to see if theres any major difference in the centering of the layout. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.