Jump to content

AH, div's making me crazy


DEVILofDARKNESS

Recommended Posts

Okay so I want to become the same effect with div's and css, as I would have with html and <table>'s

The main part does fit the right height and width, but somehow my navigation bars (left and right) don't fit their normal height...

 

I hope somebody has the time to see what I'm doing wrong,

 

<!-- All php codes are left away, they work fine, it's something with the div's I guess. -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>ATTACK!</title>
	<link href="./css/index.css" rel="stylesheet" type="text/css">
	<link href="./css/attack.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="box">
<form action='' method='post'>
<div id="header">
	ATTACK
</div>
<div id="navigation">
	<iframe src='./navleft.php' height='100%' width='100%' frameborder="0" scrolling="No"></iframe>
</div>
<div id="main_overview">
	<div class="attack_header">
		Step 1: Choose Your Target
	</div>
	<div class="attack_text">
	<!-- some php code left away -->
	<?php
echo "<div class='attack_left'>" . $NYAR['region_name'] . "</div><div class='attack_right'><input type='radio' name='radioNYAR' value='" . $NYAR['region_id'] . "'></div>";
		}
		?>
	</div>
	<?php
	if($region = "visible"){
	?>
	<div class='attack_header'>
		Step 2: Choose the region from where you want to attack
	</div>
	<!-- some php code left away-->
                          <?php
	echo "<div class='attack_left'>" . $YAR['region_name'] . "</div><div class='attack_right'><input type='radio' name='radioYAR' value='" . $YAR['region_id'] . "'></div>";
		}
	}else{
		echo "<div class='attack_center'>Oops You Don't have any regions</div>";
	}
	}
	?>
	<div class='attack_header'>
		Next!
	</div>
	<div class='attack_center'>		
		<input type='submit' name='submit' value='Next!'>
	</div>
</div>
<div id="right_navigation">
	<iframe src="./navright.php" frameborder="0" width="100%" height="100%" scrolling="No"></iframe>
</div>
<div id="footer_overview">
	<iframe src="./footernav.php" frameborder='0' width="100%" height="100%" scrolling="No"></iframe>
</div>
</form>
</div>
</body>
</html>

 

And the CSS:

 

index.css

* {

margin: 0;

padding: 0;

text-align: center;

font-family: 'Times New Roman';

}

body {

color: #FFFFFF;

width: 100%;

height: 100%;

background-color: #000000;

}

/************************* ID's *************************/
#box {

width:100%;

height:100%;

}

#header {

color: red;

text-decoration: underline;

width: 100%;

height: 5%;

text-align: center;

font-size: 15pt;

font-weight: bold;

}

#main_overview {

float: left;

text-align: center;

margin-top: 15px;

width: 68%;

height: 75%;

}

#right_navigation {

float: left;

text-align: center;

width: 90px;

height: 100%;

margin-top: 15px;

margin-right: 50px;

margin-left: 10px;

}

#footer_overview {

float: left;

text-align: center;

width: 80%;

height: 14%;

}

/***************** Classes ******************/

h2.fnav {

height: 15px;

font-size: 12pt;

font-weight: bold;

}

li.nav2 {

list-style-type: none;

height: 0px;

}

h3.rnav {

height: 30px;

font-size: 11pt;

border-style: solid;

border-color: gray;

border-width: 1px;

padding-top: 2px;

padding-bottom: 2px;

font-weight: normal;

}

h3.fnav {

height: 15px;

font-size: 11pt;

font-weight: normal;

}

img.rnav {

height: 30px;

width: 100px;

border-style: solid

border-color: white

border-width: 1px;

padding-top: 2px;

padding-bottom: 2px;

}

 

attack.css

div.attack_header {

float: left;

font-weight: bold;

height: 25px;

width: 100%;

margin-top: 15px;

margin-bottom: 15px;

}

div.attack_left {

float: left;

height: 25px;

width: 69%;

}

div.attack_right {

float: left;

height: 25px;

width: 30%;

}

div.attack_center {

float: left;

height: 25px;

width: 100%;

}

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.