different layout between HTML in C5
Permalink
Just in the process of creating a theme and have copied an existing HTML code from an old site into the C5 php files. Even though I have not added any areas yet or any other php code the result should show the same in dimensions as the old HTML does.
I noticed that there was a difference when it came to
between the two sites. For some reason the resulting height is greater in C5 than that of the old pure HTML site. Is there a reason why this happens when converted into C5 ?
I have attached two screen shots to show the difference and there is not difference in coding or image files etc.
I noticed that there was a difference when it came to
<td> </td>
I have attached two screen shots to show the difference and there is not difference in coding or image files etc.
Concrete5 has some styles defined by default. Likely this is causing your problem. Just add a style declaration in your header to adjust the <td> to the correct height (make sure this is below the header_required declaration). I recommend adding a wrapper to your page with an id so that you can segregate your styles from the Concrete5 core styles.
Its strange as even if i remove all CSS files and <?php Loader::element('header_required'); ?> i still get a difference in height on the td tag where it contains an image 10px height but shows the td height of 20px. Its exactly the same coding as the html file but the results are still different.
I tried an experiment with just the below code and no CSS at all and found that for some reason a normal HTML file gives a height of 10px in the td tag but in C5 its 20px. I would have thought the td height should be the same as the content which in this case is 10px.
I tried an experiment with just the below code and no CSS at all and found that for some reason a normal HTML file gives a height of 10px in the td tag but in C5 its 20px. I would have thought the td height should be the same as the content which in this case is 10px.
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0"> <tbody><tr> <td colspan="4"><img src="/themes/coats/imgs/10px.gif" alt="10" width="10" height="10"></td> </tr> </tbody></table>
Turned out to be the DOCTYPE in the document that affects this. I am now using <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> which is giving the correct format.
Hope this helps others
Hope this helps others