Jump to content

php html css and empty div space


laponac84

Recommended Posts

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 :)

Link to comment
Share on other sites

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 by Love2c0de
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.