how to make layout expand when content is big!!

ayushgrg

New Member
hi guys, can anyone help me out thers,
i have a website designed and sliced in photoshop, when i export to dreamweaver to add a content with a div tag, my layout gets messedup? can anyone tell me how to fix this, when content is small layout remains good but when big all the design moves up and down, also when i embedd google map, it gets messedup, any help!!

Thanks
Ayushgrg
 

ayushgrg

New Member
currently i am not able to upload website as a example, i have a header on top navigation bar on left main body on right and a footer, when the content of body is too large, everything messesup, nav head footer and body starts moving up and down??
 

horrorshow75

New Member
It's impossible to help you without seeing the code. We have no way of knowing how it's written or if maybe something is missing. Almost every website has a header, side nav, content and footer. This info doesn't help troubleshoot anything.

Even if you can't upload the site and put it online you can paste the code to this forum using the code tags.
 

ayushgrg

New Member
here is the code for

index.php

<html>
<head>
<title>tong-modified</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="site_layout.css" rel="stylesheet" type="text/css">
<style type="text/css">
</style>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (tong-modified.psd) -->
<div id="div_layout">
<table id="Table_01" width="1267" height="987" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="6">
<img src="images/index_01.gif" width="144" height="986" alt=""></td>
<td rowspan="3">
<img src="images/index_02.gif" width="198" height="267" border="0" alt="" usemap="#index_02_Map"></td>
<td colspan="3" rowspan="2">
<img src="images/index_03.gif" width="60" height="265" border="0" alt="" usemap="#index_03_Map"></td>
<td>
<img src="images/index_04.gif" width="717" height="230" border="0" alt="" usemap="#index_04_Map"></td>
<td rowspan="6">
<img src="images/index_05.gif" width="147" height="986" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="230" alt=""></td>
</tr>
<tr>
<td>
<img src="images/index_06.gif" width="717" height="35" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="35" alt=""></td>
</tr>
<tr>
<td colspan="2" rowspan="2">
<img src="images/index_07.gif" width="40" height="46" alt=""></td>
<td colspan="2" rowspan="3" bgcolor="#C0C0C0">&nbsp;</td>
<td>
<img src="images/spacer.gif" width="1" height="2" alt=""></td>
</tr>
<tr>
<td>
<img src="images/index_09.gif" width="198" height="44" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="44" alt=""></td>
</tr>
<tr>
<td colspan="2" rowspan="2" bgcolor="#000000">
<?php
include('map.php');
?>


</td>
<td rowspan="2">
<img src="images/index_11.gif" width="19" height="675" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="634" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/index_12.gif" width="737" height="41" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="41" alt=""></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="144" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="198" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="19" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="20" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="717" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="147" height="1" alt=""></td>
<td></td>
</tr>
</table>
</div>
<map name="index_02_Map">
<area shape="rect" alt="" coords="0,0,191,220" href="#">
</map>
<map name="index_03_Map">
<area shape="rect" alt="" coords="46,121,48,125" href="#">
</map>
<map name="index_04_Map">
<area shape="rect" alt="" coords="62,144,64,145" href="#">
</map>
<!-- End ImageReady Slices -->
</body>
</html>


if i insert php function, i.e <?php
include('map.php');
?>

the layout gets too messy!! any help or suggestion??
 

ayushgrg

New Member
and map.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Location</title>


<style type="text/css">

* {
padding:0px;
margin:0px;
font-family:Tahoma, "MS Sans Serif", Arial;
font-size:10pt;
color:#4B4B4B;
}

body {
text-align:center;
background-image: url(../images/main3.gif);
}

#main-wrapper {

text-align:left;
margin:auto;
margin-top:20px;
background-color:#EEEEEE;
border-bottom:2px solid #4B4B4B;
border-right:2px solid #4B4B4B;
}

#main-padding {
padding:10px;
}

.footer-fix {
height:20px;
}

#menu {
text-align:center;
margin-top:20px;
}

#content {
margin-top:20px;
}

a {
color:#4B4B4B;
}
a:hover {
color:#999999;
}

h1 {
font-family:Georgia, "Times New Roman", Times, serif;
font-size:14pt;
margin-bottom:15px;
}

h2 {
font-family:Georgia, "Times New Roman", Times, serif;
font-size:10pt;
margin-bottom:15px;
}

.inline-image {
vertical-align:middle;
}

#map_canvas {

height:400px;
margin-top:15px;
}

#directions {
margin-top:10px;
}

.form {
margin:0px;
padding:0px;
margin-top:20px;
}
.form-field {
vertical-align:middle;
border:1px solid #999999;
background-color:#EEEEEE;
}
.form-submit {
font-family:Georgia, "Times New Roman", Times, serif;
border:1px solid #999999;
background-color:#EEEEEE;
font-size:7pt;
font-weight:bold;
}

#main-wrapper #main-padding #bannerdiv {
width: 132px;
}
#main-wrapper #main-padding #headertextdiv {
width: 570px;
float: left;
}
#main-wrapper #main-padding #seperator {
border-top-width: 1px;
border-top-style: solid;
border-top-color: #CCCCCC;
margin: 7px;
}
#bannerAddress {
float: right;
width: 200px;
}
#bannerLogo {
width: 350px;
float: left;
}


</style>



<script src= "http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAdA4ZLF08TmtqXsfo3vcm-RRSyl0hd6igw9FlWe_okPncpDjMAxTMfXjXVk8ZdRQGJ0-LqUq4mC7tLw" type="text/javascript"> </script>

<script type="text/javascript">

var error_address_empty = 'Please enter a valid address first.';
var error_invalid_address = 'This address is invalid. Make sure to enter your street number and city as well?';
var error_google_error = 'There was a problem processing your request, please try again.';
var error_no_map_info = 'Sorry! Map information is not available for this address.';


var default_address = 'Korte Leidsedwarsstraat 119, amsterdam, 1017 PZ ';



var current_address = null; /* Current address we are displaying, we save it here for directions */
var map = null; /* Instance of Google Maps object */
var geocoder = null; /* Instance of Google Deocoder object */
var gdir = null; /* Instance of Google Directions object */
var map_compatible = false; /* Whether or not user's browser is compatible to show the map */

if( GBrowserIsCompatible() ) {
map_compatible = true;
}

function initialize_map() {
if( map_compatible ) {
map = new GMap2(document.getElementById('map_canvas'));
geocoder = new GClientGeocoder();
show_address(default_address);

map.addControl(new GSmallMapControl());

map.addControl(new GMapTypeControl());

}
}

function show_address(address) {
if( map_compatible && geocoder ) {
current_address = address;
geocoder.getLatLng(
address,
function( point ) {
if( !point ) {
alert(error_no_map_info);
} else {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml(address);
}
}
);
}
return false;
}

function get_directions() {
if( map_compatible ) {
if( document.direction_form.from_address.value == '' ) {
alert(error_address_empty);
return false;
}
document.getElementById('directions').innerHTML = '';

gdir = new GDirections(map, document.getElementById('directions'));

GEvent.addListener(gdir, 'load', onGDirectionsLoad);
GEvent.addListener(gdir, 'error', handleErrors);

set_directions(document.direction_form.from_address.value, current_address);
}
return false;
}

function set_directions(fromAddress, toAddress) {
gdir.load("from: " + fromAddress + " to: " + toAddress,
{ "locale": "en" });
}

function handleErrors(){
if( gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS )
alert(error_invalid_address);
else if( gdir.getStatus().code == G_GEO_SERVER_ERROR )
alert(error_google_error);
else if( gdir.getStatus().code == G_GEO_MISSING_QUERY )
alert(error_address_empty);
else
alert(error_invalid_address);
}

function onGDirectionsLoad(){
setTimeout('eval(\'window.location = "#directions_table"\;\')', 500);
}
</script>

</head>

<body onLoad="initialize_map();">
<div id="main-wrapper">
<div id="main-padding">
<div id="seperator"></div>
<table width="100%" height="94">
<tr valign="top">
<td width="33%" colspan="3">


<div id="headertextdiv">

<div id="bannerLogo">


<h1>Tong-Ah</h1>
<h2>Chinese-Indonesia Restaurant<br />
1017 PZ | Amsterdam<br />
[email protected]</h2>
</div>
<div id="bannerAddress">


<p><strong>ADDRESS</strong><br />
Korte Leidsedwarsstraat 119<br>
1017 PZ Amsterdam<br>

Tel- 020 6234829?
Fax- 020 3205483? <br />

<a href="#" onClick="return show_address('Korte Leidsedwarsstraat 119
, Amsterdam, 1017 PZ');">Map it!</a>
</p>
</div>


</div>

<div align="center"></div></td>
</tr>
</table>

<div id="seperator"></div>
<div id="map_canvas"></div>

<form name="direction_form" onSubmit="get_directions(); return false;" class="form">
Enter Your location below : <input type="text" name="from_address" class="form-field" /><br /><br />
<input type="submit" value=" View Directions " class="form-submit" />
</form>

<a name="directions_table"></a>
<div id="directions"></div>

<a href="http://www.tongah.nl" target="_blank">Back to Tong-Ah</a><br />

</div>
</div>
<div class="footer-fix"> </div>
</body>
</html>
 

horrorshow75

New Member
Is the first post of code your layout? My guess is that everything has a specific size to make up the total size of your site. Anything outside of 1267 pixels wide or whatever space was allotted for your "content" section is going to make the table expand thus breaking the continuity of your images. You should try and rework your site using css and divs.

I don't use tables for layout and I never learned web design that way so maybe someone that has used or uses tables for layout can offer up an opinion.
 
Top