PDA

View Full Version : Bizarre Happenings!



Qnuts
Jan 28th, 2010, 04:10 PM
The html and css are the same for these 2 files but one's width fills the whole page and the other one stays the right length.

The css:

.layoutMain {
margin-left: 20px;
width: 740px;
}

The html which is the same for both as far as I can tell. This is the one that doesn't work. Basically I want it to have a width of 740. :


<body link="#008000">

<table cellspacing="0" cellpadding="0" class="layoutMain">
<tr>
<td style="text-align:center">
<img src="../new_images/bevelogo.jpg" alt="Parks logo" width="55" height="48" /></td>
</tr>
<tr>
<td>
<table style="width: 100%" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 119px; height: 39px;" class="topnav">
<a href="../Default.htm">Home</a></td>
<td style="width: 2px; height:2px;">
<img src="../topnav_brk.gif" width="2" height="39" alt=""/></td>
<td style="width: 119px; height: 39px;" class="topnav">
<a href="http://intranet/">National Intranet</a></td>
<td style="width: 2px; height:2px;">
<img src="../topnav_brk.gif" width="2" height="39" alt=""/></td>
<td style="width: 119px; height: 39px;" class="topnav">
<a href="../library/library.php">Library</a></td>
<td style="width: 2px; height:2px;">
<img src="../topnav_brk.gif" width="2" height="39" alt=""/></td>
<td style="width: 119px; height: 39px;" class="topnav">
<a href="../search.htm">Search</a></td>
<td style="width: 2px; height:2px;">
<img src="../topnav_brk.gif" width="2" height="39" alt=""/></td>
<td style="width: 119px; height: 39px;" class="topnav">
<a href="../people/refGrid.php">WNSC People <br />
Directory</a></td>
<td style="width: 2px; height:2px;">
<img src="../topnav_brk.gif" width="2" height="39" alt=""/></td>
<td style="width: 119px; height: 39px;" class="topnav">
<a href="../org_structure/WNSC_Organizational_Structure.pdf">Organizational Structure</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="subnav" style=" border-top:1px solid black; width: 182px; background-color:#006699;" >

<ul class="jsddm"><li><a href="#">Corporate</a>
<ul style="background-color:#006699;" id="corporate">
<li><a href="../finance_contracting/finance.php">Finance</a></li>
<li><a href="../finance_contracting/contracts.php">Contracting</a></li>
<li><a href="../Official_Languages_and_Translations/O-L_pge1.php">Official Languages and Translation</a></li>
<li><a href="../Official_Languages_and_Translations/Translations_page1.php">Real Property Managment</a></li>
<li><a href="../information_management/information_management.php">Information Management</a></li>
<li><a href="../ATIP/ATIP.php">ATIP</a></li>
<li><a href="../Mgmt_Planning/Mgmt%20Planning.php">Management Planning</a></li>
</ul>
</li>
</ul>
</td>

<td style="width: 2px; "><img src="../../new_images/topnav_brk.gif" width="2" alt=""/></td>
<td class="subnav" style=" border-top:1ps solid black; width: 178.5; background-color:#003366"><ul class="jsddm"><li><a href="#">Cultural Resources</a>

<ul style="background-color:#003366;">
<li><a href="../history/historic_research.php">History</a></li>
<li><a href="../historic_building/historic_conservation.php">Historic Building Conservation</a></li>
<li><a href="../artifacts_historical/artifacts.php">Artifacts and Historical Objects</a></li>
<li><a href="../curatorial/Curatorial_Services.php">Curatorial Services for Site Interpretation</a></li>
<li><a href="../artifact_conservation/artifact_conservation.php">Artifact Conservation</a></li>
<li><a href="../archaeology/archaeology.php">Archaeology</a></li>
<li><a href="../Fam_of_NHS_Cost_Share/Fam%20NHS.php">Family of National Historic Sites/Cost Share Program</a></li>
</ul>

</li></ul></td>

<td style="width: 2px; "><img src="../../new_images/topnav_brk.gif" width="2" alt=""/></td>
<td class="subnav" style=" border-top:1ps solid black; width: 178.5px; background-color:#006600"><ul class="jsddm"><li><a href="#">Environment</a>

<ul style="background-color:#006600;"><li><a href="../fire_management/fire_management.php">Fire Management</a></li>
<li><a href="../environmental_assessment/ea.php">Environmental Assessment</a></li>
<li><a href="../contaminated_sites/contaminated_sites.php">Contaminated Sites</a></li>
<li><a href="../ecosystem_science/ecosystem_science.php">Ecosystem Monitoring & Active Management Science</a></li>
<li><a href="../species_risk/species_risk.php">Species at Risk</a></li>
<li><a href="../geomatics/geomatics.php">Geomatics</a></li>
</ul>
</li>
</ul>
</td>
<td style="width: 2px; ">
<img src="../../new_images/topnav_brk.gif" width="2" alt=""/>
</td>
<td class="subnav" style="border-top:1ps solid black; background-color:#993300" ><ul class="jsddm"><li><a href="#">People</a>

<ul style="background-color:#993300"><li><a href="../social_science/social_science.php">Social Science</a></li>
<li><a href="../visitor_experience/visitor_experience.php">Visitor Experience</a></li>
<li><a href="../marketing/marketing.php">Tourism Planning and Marketing</a></li>
<li><a href="../Consultation_Planning/Consult%20Plann.php">Consultation</a></li>
<li><a href="../external_relations/external_relations.php">External Relations and Outreac</a></li>
<li><a href="../Aboriginal_Affairs_Treaties/AB%20Affairs.php">Aboriginal Affairs Treaties</a></li>
<li><a href="../media/media.php">Media and Interpretive Design</a>
</li>
</ul>
</li>
</ul>
</td></tr>
</table>

Excavator
Jan 28th, 2010, 05:48 PM
Hello Qnuts,
You mention "these 2 files" but I see only one table with the class layoutMain and it is 740px wide.

Can you describe your problem a little better?
What's not working?

Qnuts
Jan 28th, 2010, 05:50 PM
that file is the same for both.

One of them displays with an actual 740 width while one takes up the whole page.

I have copyed and pasted the contents from one to the other and still the same problem.

Thanks

Excavator
Jan 28th, 2010, 05:56 PM
that file is the same for both.

One of them displays with an actual 740 width while one takes up the whole page.

I have copyed and pasted the contents from one to the other and still the same problem.

Thanks

If the snippet has been copy/pasted without error, then something else must be different.

Are you using a DocType?
Have you checked with the validator?

See the links in my sig about both of those, as well as the link about tables.