Elxis CMS Forum

Extensions => Templates => Topic started by: armpouniotis on December 17, 2012, 16:36:16

Title: About templates
Post by: armpouniotis on December 17, 2012, 16:36:16
Hi there !

I am making a template for Elxis Nautilus, and I am using tables.

When I am puting inside the table this: <?php $eDoc->modules('top'); ?>

unfortunately the module is displayed at the bottom of the table, and not at the middle (by default).

How can I make it shown up at the middle ?

I didn't have this problem when I was using Elxis 2009 series.

Thank you in advance
Christos
Title: Re: About templates
Post by: datahell on December 17, 2012, 20:06:11
Put this in your CSS for the table cells:
vertical-align:top;

BTW using tables for setting a template's structure is a very bad idea. Why don't you use floating boxes? A sample row with 2 "cells":

<div>
     <div style="width:300px; float:left;">a</div>
     <div style="width:400px; float:left;">b</div>
     <div style="clear:both;"></div>
</div>
     
Title: Re: About templates
Post by: armpouniotis on December 17, 2012, 21:08:48
Thank you very much for your help !

actually I am using tables for many years.

Divs are a little pain for me :D

Christos
Title: Re: About templates
Post by: datahell on December 18, 2012, 18:33:01
Tables are too bad for SEO. If you plan to make a template using tables don't do it at all but use a ready -correct- template instead.
Search engines read tables row by row from left to right. This means that your site's HTML will look like a soup. The page's important content will be surrounded by useless information from modules and other not-related to the actual page subject content.

Divs are very easy, think of them as boxes placed side by side (floated). You set the width for each box and that's it. Not hard at all...