laponac84 Posted January 29, 2013 Share Posted January 29, 2013 This is basic template for soccer manager http://sportskevesti.co/imege/Screenshot_1.png this is the code ( #telo is white space below the menu, #glavno is left blue part, #desno is right blue part) <div id="telo"> <div id="glavno"> </div> <div id="desno"> </div> </div> #telo{ width: 1000px; overflow: hidden; float: left; } #glavno{ width: 650px; overflow: hidden; height:350px; background-color: #336699; float: left; padding: 0px; margin: 10px 0px 0px 0px; } #desno{ width: 340px; min-width: 340px; min-height: 350px; overflow: hidden; background-color: #336699; float: left; margin: 10px 0px 0px 10px; } And, this is OK for now. But... when i put some code in template for GET session and GET option for dinamic webpage i have problem with empty blu space in #glavno, between the top border, and div inside the #glavno example: http://sportskevesti.co/imege/Screenshot_2.png as you see, i have empty blue space in #glavno, and that is not ok...i nead TIM1 div to bi in line with top border #glavno this is code <div id="glavno"> <?php if(!empty($sessija)){ switch ($opcija) { case "moj-tim": include("modul/mod_moj_tim/index.php"); break; //rest of case.... } } elseif(empty($sessija)){ // no session code... } } ?> </div> file: modul/mod_moj_tim/index.php <div id="liga"> <?php echo strtoupper($naziv); ?> </div> liga{ background-color: #131313; overflow: hidden; float: none; width: 650px; padding:10px; margin-top:0px; color: #ffffff; font-size: 16px; border-style:solid; border-width: 0px 0px 1px 0px; border-color: #a1a1a1; } Where is the problem, and what to do? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/273790-php-html-css-and-empty-div-space/ Share on other sites More sharing options...
thara Posted January 29, 2013 Share Posted January 29, 2013 Not sure what is your problem here. If it is top margin in your #glavno div remove margin property and its value from CSS... margin: 10px 0px 0px 0px; Quote Link to comment https://forums.phpfreaks.com/topic/273790-php-html-css-and-empty-div-space/#findComment-1408984 Share on other sites More sharing options...
Love2c0de Posted January 30, 2013 Share Posted January 30, 2013 Have you got a live version? Would be a lot easier to debug. You see the text 'TIM 1', what element is that? If it's a <p> element, try giving it a margin-top: 0px; because <p> elements have a default margin. Kind regards, L2c. Quote Link to comment https://forums.phpfreaks.com/topic/273790-php-html-css-and-empty-div-space/#findComment-1409100 Share on other sites More sharing options...
jardrake Posted January 31, 2013 Share Posted January 31, 2013 Have you checked to see if there is any padding in the glavno or a margin in the inner div of the glavno? Quote Link to comment https://forums.phpfreaks.com/topic/273790-php-html-css-and-empty-div-space/#findComment-1409289 Share on other sites More sharing options...
Love2c0de Posted January 31, 2013 Share Posted January 31, 2013 (edited) Not sure what is your problem here. If it is top margin in your #glavno div remove margin property and its value from CSS... margin: 10px 0px 0px 0px; This would set the margin-top to 10 pixels. The shorthand CSS for margins is like this: margin: top right bottom left; edit: sorry I realize now you were identifying the CSS for him. Regards, L2c. Edited January 31, 2013 by Love2c0de Quote Link to comment https://forums.phpfreaks.com/topic/273790-php-html-css-and-empty-div-space/#findComment-1409292 Share on other sites More sharing options...
laponac84 Posted February 6, 2013 Author Share Posted February 6, 2013 I understand and know how to do that, unfortunately, problem was in Easy PhP. When i upload my example on internet server, all css code work ok. Quote Link to comment https://forums.phpfreaks.com/topic/273790-php-html-css-and-empty-div-space/#findComment-1410470 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.