gazfocus Posted May 5, 2008 Share Posted May 5, 2008 I am creating a website and have used divs and CSS. The main 'content' div is 800px wide. When I open the login page, the div is the correct size and looks fine. When I open the home page (with the same style sheet linked), it's 4 pixels too wide. Any ideas? Quote Link to comment Share on other sites More sharing options...
GameYin Posted May 5, 2008 Share Posted May 5, 2008 Just use width: 100% instead of that. Quote Link to comment Share on other sites More sharing options...
gazfocus Posted May 5, 2008 Author Share Posted May 5, 2008 Have just changed the width on both the navigation div and the content div to 100% but the content div is still slightly wider than the navigation div on all pages apart from the home page. Quote Link to comment Share on other sites More sharing options...
GameYin Posted May 5, 2008 Share Posted May 5, 2008 Have just changed the width on both the navigation div and the content div to 100% but the content div is still slightly wider than the navigation div on all pages apart from the home page. Then just change the content to a smaller %... Quote Link to comment Share on other sites More sharing options...
gazfocus Posted May 5, 2008 Author Share Posted May 5, 2008 Have just changed the width on both the navigation div and the content div to 100% but the content div is still slightly wider than the navigation div on all pages apart from the home page. Then just change the content to a smaller %... But the point is, it's looks fine on the home page, then if i make it smaller (to suit all the other pages), then the home page is a few pixels out. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted May 5, 2008 Share Posted May 5, 2008 Give us code. A link? Make sure you don't have any padding on the div element. Quote Link to comment Share on other sites More sharing options...
gazfocus Posted May 5, 2008 Author Share Posted May 5, 2008 Give us code. A link? Make sure you don't have any padding on the div element. Hi. The code is in this thread: http://www.phpfreaks.com/forums/index.php/topic,195765.0.html Thanks Quote Link to comment Share on other sites More sharing options...
GameYin Posted May 6, 2008 Share Posted May 6, 2008 Can you show us the parsed HTML code? Hit view source and copy code from there. Also, show us the CSS. You have it in a style sheet on that thread. Can't see it. 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.