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? Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/ Share on other sites More sharing options...
GameYin Posted May 5, 2008 Share Posted May 5, 2008 Just use width: 100% instead of that. Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/#findComment-533823 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. Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/#findComment-533828 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 %... Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/#findComment-533863 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. Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/#findComment-533901 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. Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/#findComment-533945 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 Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/#findComment-533955 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. Link to comment https://forums.phpfreaks.com/topic/104265-css-div-size-problem/#findComment-534235 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.