Jump to content

Tables?


czukoman20

Recommended Posts

i have this starting code for my .php for some wierd reason, the table doesn't come out flesh with the top of the page. its a half a step down a bit.

My code for the table with the start is as follows. (take in consideration that this is a template)

<!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" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Adworld-online.com-</title>
<!-- TemplateEndEditable -->
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
background-image: url(../images/bg.jpg);
}
body,td,th {
font-family: Constantia;
}
a:link {
color: #0000FF;
}
a:visited {
color: #0000FF;
}
a:hover {
color: #0000FF;
}
a:active {
color: #0000FF;
}
-->
</style>
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<script src="../Scripts/AC_ActiveX.js" type="text/javascript"></script>
</head>

<body>
<table width="673" height="277" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="12" colspan="3"><div align="center"><img src="../images/top.png" width="824" height="12" /></div></td>
  </tr>
  <tr>

 

The wierd thing is. I put this in an html file, and its flesh with the top, but the pages that im using calls for php. soo im stuck help is appreciated

Link to comment
Share on other sites

Zeroing the margin and padding in the body is not recommended, as it makes form elements unpredictable. Much better to use a CSS reset sheet. Yahoo offers a decent one, and there are others out there as well.

 

All those resets zero the margin and padding on the body. There is nothing wrong with doing so, in fact, I'd say it is essential in any professional development.

Link to comment
Share on other sites

Its not that it wont work, its just that its unpredictable with form elements. It also goes overboard in that it zeros out things that dont need to be zeroed, slowing down rendering time (apparently).

 

Better to use a reset sheet. Here's a good article on the matter:

 

http://meyerweb.com/eric/thoughts/2007/04/12/reset-styles/

 

Actually, this guy has written quite a bit on css reset sheets and his stuff is very informative. I recommend giving his site a read through. I personally use a reset sheet based on his with a few minor changes.

Link to comment
Share on other sites

Its not that it wont work, its just that its unpredictable with form elements. It also goes overboard in that it zeros out things that dont need to be zeroed, slowing down rendering time (apparently).

 

You mentioned zeroing the body but what you have described is not zeroing the body! That is using the universal selector (*) to zero every element. That definitely is a bad idea.

 

Actually, this guy has written quite a bit on css reset sheets and his stuff is very informative.

 

I think most people know who Eric Meyer is ;). I use a modified version of his reset too.

Link to comment
Share on other sites

You mentioned zeroing the body but what you have described is not zeroing the body! That is using the universal selector (*) to zero every element. That definitely is a bad idea.

 

Good point! :D

 

But zeroing out the body is still going to screw with any form elements int eh body.

Link to comment
Share on other sites

But zeroing out the body is still going to screw with any form elements int eh body.

 

No it isn't, it is only targeting the body element. Hence why in those resets you specify numerous elements (apart from intra-form elements), and not just the body, that need to be reset.

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.