Jump to content

busted doctype


bellyboy22

Recommended Posts

I have a php calendar. It was coded with a bad doctype, so no matter what I try to do the wrapper won't center in ie7 and ie 6. Once I change the doctype to a correct one the wrapper centers but then my calendar cells shrink to these small boxes and whatever I do I can't size them once they are small.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<?php javaScript() ?>
<link rel="stylesheet" type="text/css" href="css/default.css">
    <link rel="stylesheet" type="text/css" href="/web.css">
    <!--[if lte IE 6]>

<link rel="stylesheet" type="text/css" href="/ie6calendar.css" media="screen" />

<![endif]-->

    <!--[if gt IE 6]>

<link rel="stylesheet" type="text/css" href="/ie7calendar.css" media="screen" />

<![endif]-->
</head>
<body>
<!-- BEGIN WRAPPER-->
<div id="wrapper">


<!-- BEGING HEADER -->
<div id="header">



<div id="logo"><img src="/images/gda_logo.jpg" alt="gdz_logo" width="330" height="53" /></div>



<div class="headerblackbox">

</div>



<div id="headerimage">
<img src="/images/header_image.jpg" alt="header_logo" />
</div>



</div>
<!-- END OF HEADER -->






<!-- BEGIN NAV-->



<div id="nav">



    <ul>

     <li><a href="http://chubb.gregkilian.com/index.html">HOME</a>   I</li>

 <li><a href="http://chubb.gregkilian.com/print.html">PRINT</a>   I</li>

     <li><a href="http://chubb.gregkilian.com/web.html">WEB</a>   I</li>

     <li><a href="http://chubb.gregkilian.com/3d.html">3D MODELING & ANIMATION</a>   I</li>

     <li><a href="http://chubb.gregkilian.com/video.html">AUDIO VIDEO</a>   I</li>

     <li><a href="http://chubb.gregkilian.com/bio.html">BIOS</a>   I</li>

     <li><a href="http://chubb.gregkilian.com/contacts.html">CONTACTS</a>   </li>

  </ul>

  </div>

  

   <div id="buttonnav">

<img src="/images/photoshop_btn.jpg" alt="photoshop" /><img src="/images/illustrator_btn.jpg" alt="illustrator" /><img src="/images/indesign_btn.jpg" alt="indesign" /><img src="/images/dreamweaver_btn.jpg" alt="dreamweaver" /><img src="/images/flash_btn.jpg" alt="flash" /><img src="/images/premiere_btn.jpg" alt="premiere" /><img src="/images/aftereffects_btn.jpg" alt="aftereffects" /><img src="/images/3dmax_btn.jpg" alt="3dsmax" />



</div>

<!-- END NAV -->

<br><br><br>

<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
	<?php echo $scrollarrows ?>
	<span class="date_header">
	 <?php echo $lang['months'][$m-1] ?> <?php echo $y ?></span>
</td>

<!-- form tags must be outside of <td> tags -->
<form name="monthYear">
<td align="right">
<?php monthPullDown($m, $lang['months']); yearPullDown($y); ?>
<input type="button" value="GO" onClick="submitMonthYear()">
</td>
</form>

</tr>

<tr>
<td colspan="2" bgcolor="#000000">
<?php echo writeCalendar($m, $y); ?></td>
</tr>

<tr>
<td colspan="2" align="center">
<?php echo footprint($auth, $m, $y) ?></td>
</tr>
</table>

<!-- CHUBB FOOTER START-->
<div id="chubbfooter">


<!-- CHUBB FOOTER LINKS START-->
<div>
<ul>

    <li><a href="http://www.chubbinstitute.edu/about/">About Us</a>   I</li>

    <li><a href="http://www.chubbinstitute.edu/locations/">Location</a>   I</li>

    <li><a href="http://www.chubbinstitute.edu/admissions/">Admissions</a>   I</li>

    <li><a href="http://www.chubbinstitute.edu/financial-aid/">Financial Aid</a>   I</li>

    <li><a href="http://www.chubbinstitute.edu/request.php">Request Information</a>   </li>

  </ul>
</div>
<!-- CHUBB FOOTER LINKS END-->



<!-- CHUBB DISCLAIMER START-->
<div id="chubblegal">

The Chubb Institute is part of the High-Tech Institute family of schools. Learn more <a href="http://www.hightechinstitute.edu/?HTISession=6b571843adb90c508c37cf53f794e5b4"><em>here</em>.</a>
Copyright © High-Tech Institute Inc. <a href="http://www.chubbinstitute.edu/policy.php">Privacy Policy & Terms of Use</a></div>
<!-- CHUBB DISCLAIMER END-->




</div>
<!-- CHUBB FOOTER END-->








</div>
<!-- WRAPPER END-->

</body>
</html>

 

this is my html

 

 

the site is a http://chubb.gregkilian.com/calendar/index.php

Link to comment
Share on other sites

couple suggestions...

 

don't think many will attempt to help you with that big chunk of code.

 

for the best results you should restrict your code blocks to that which is relevant to your problem.

 

Also, This would appear to be a CSS problem, not a php problem.  (try posting this in the css forum)

Link to comment
Share on other sites

here is the problem I understand that.. I adjust the doctype and then I can't effect the style at all. if i keep the doctype the way it is the page doesn't center. Im using the right css cause once I change the doctype it sits center but the table which is created in php is tiny and can't be effected anymore.

Link to comment
Share on other sites

It comes down to this. Which is better - something that is broken, and has been rigged to work, or something that isn't broken, but needs a bit of work to get to work.

 

The size of your table is alterable by CSS. There is no setting that can stop that. If the CSS you are applying isn't working, it's because you are applying it wrong, or you have errors in your (X)HTML.

Link to comment
Share on other sites

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<style type="text/css">
  			@import url("master.css");
	</style>

	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

	<title>Template Test</title>

</head>

 

This is how A CORRECT doctype and head would look like. I recommend using it! Of course, it boils down to personal preference if you want to use xhtml and if you want to do it like this...  ;)

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.