SyntaxPro Posted December 5, 2010 Share Posted December 5, 2010 Before I add the E-Mail text. After I add the E-Mail text. Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/ Share on other sites More sharing options...
requinix Posted December 5, 2010 Share Posted December 5, 2010 There's something wrong with your HTML. Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143138 Share on other sites More sharing options...
SyntaxPro Posted December 5, 2010 Author Share Posted December 5, 2010 <!DOCTYPE HTML> <html> <head> <title>oddim</title> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <link rel="shortcut icon" href="graphics/favicon.ico"> <style type="text/css"> body { margin: 0px; padding: 0px; background-color: #DDDDEE; font-family: Arial; } div.main { margin: 10px auto 0px auto; width: 648px; height: 294px; } div.menu { display: inline-block; margin: 0px 0px 2px 6px; width: 564px; height: 30px; background-image: url('graphics/menu.png'); font-size: 20px; font-weight: bold; color: #FFFFFF; vertical-align: 12.5px; } div.box_1 { display: inline-block; margin: 0px 0px 3px 0px; width: 342px; height: 229px; background-image: url('graphics/box_1.png'); } div.box_2 { display: inline-block; margin: 0px 0px 3px 6px; width: 300px; height: 229px; background-image: url('graphics/box_2.png'); } div.bar_1 { display: inline-block; width: 342px; height: 22px; background-image: url('graphics/bar_1.png'); } div.bar_2 { display: inline-block; margin: 0px 0px 0px 5px; width: 300px; height: 22px; background-image: url('graphics/bar_2.png'); } img.logo { display: inline-block; margin: 0px 0px 2px 0px; } </style> <script type="text/javascript"> </script> </head> <body> <div class="main"><img class="logo" src="graphics/logo.png"><div class="menu">E-Mail:</div><div class="box_1"></div><div class="box_2"></div><div class="bar_1"></div><div class="bar_2"></div></div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143143 Share on other sites More sharing options...
haku Posted December 5, 2010 Share Posted December 5, 2010 I didn't dig through your CSS, but it appears you've got some top margin on whatever tag your 'Email' text is wrapped in. Either take the top margin off that element, or take it out of that element altogether. Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143163 Share on other sites More sharing options...
SyntaxPro Posted December 5, 2010 Author Share Posted December 5, 2010 Btw people when you read my code... i didnt mean the have the vertical-align in there... also can someone explain this in more detail please Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143259 Share on other sites More sharing options...
SyntaxPro Posted December 5, 2010 Author Share Posted December 5, 2010 Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143351 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 :/ Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143448 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 Why if I add overflow: hidden; to the div with the text it fixes the problem? Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143456 Share on other sites More sharing options...
haku Posted December 6, 2010 Share Posted December 6, 2010 Read my explanation in my last post. Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143460 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 Can you explain why what you told me to do would fix it? So I learn what was wrong? Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143463 Share on other sites More sharing options...
haku Posted December 6, 2010 Share Posted December 6, 2010 It's kind of hard to explain, but basically, the top margin of the child element pushes outside of the parent element, instead of on the inner edge of the parent element. This means that instead of pushing the child element down, it actually pushes the parent element down. The end effect is that the child element is pushed down according to the amount specified in it's upper margin, but the unexpected effect is that it also brings the parent element down that much. Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143465 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 Basically the margins are collapsing? Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143467 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 and btw there has never been any top margin :/ Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143475 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 Why would adding "E-Mail:" in between the divs cause that anyways??? Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143631 Share on other sites More sharing options...
haku Posted December 6, 2010 Share Posted December 6, 2010 I just tried your code out, I don't see that happening at all. Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143634 Share on other sites More sharing options...
SyntaxPro Posted December 6, 2010 Author Share Posted December 6, 2010 You have to remove the vertical-align... that was a quick fix.. i left it in my code by mistake... Quote Link to comment https://forums.phpfreaks.com/topic/220714-unknown-space/#findComment-1143636 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.