Need help with news: 2 columns, 2 rows, 3 news items, 1 banner

e107 CMS » Forums » e107 Themes » Theme Developer Discussion << Previous thread | Next thread >>
Liquid_Squelch
Jan 27 2012, 12:51PM
Registered Member #22677
Joined: Nov 28 2005, 03:06PM
Location: Long Island, NY
Posts: 419
My newspage is a mess. It contains 3 news items "stacked" one ontop of the other. I'm trying to setup it up so that it is laid out as follows::

---------------------------------
|News Item 1   |  News Item 2   |
|              |                |
---------------------------------
| News Item 3  |  Banner Ad     |
|              |                |
---------------------------------


Using the coding found in the lamb theme, it seems that the item# shortcode seems to do a nice job adding "tr" tags to move down to the next cell. But, no matter how I try and code it or add "td" tags, I always seem to fall "outside the box".

Any help to code the banner ad in the bottom right corner of the table box would be great help.


Thanks
[ Edited Jan 27 2012, 12:51PM ]
Go to top
Website
Tgtje
Jan 29 2012, 07:28AM
  • e107 Support Team
Registered Member #30653
Joined: Sep 18 2006, 01:25AM
Location: Born, The Netherlands
Posts: 1991
most likely : area size
maybe this helps along [-link-]
Go to top
Website
Liquid_Squelch
Feb 01 2012, 07:01AM
Registered Member #22677
Joined: Nov 28 2005, 03:06PM
Location: Long Island, NY
Posts: 419
I understand how to build and create tables.. I feel this is a shortcode problem for me and not HTML.

Example,
here is the newspost_template.php file for leaf.

$NEWSCOLUMNS = 2;

$NEWSCLAYOUT = "
<table style='width: 100%;'>
<tr>
<td style='width: 48%; vertical-align: top;'>{ITEMS1}</td>
<td style='width: 4%;'></td>

<td style='width: 48%; vertical-align: top;'>{ITEMS2}</td>
<td style='width: 4%;'></td>

</tr>

</table>
";


What it shows with 3 news items is the following:

---------------------------------
|News Item 1   |  News Item 2   |
|              |                |
---------------------------------
| News Item 3  |                |
|              |                |
---------------------------------


When I try and add the banner into the 2nd "td" for the bottom right, it actually places it into a new row.

<td style='width: 48%; vertical-align: top;'>{ITEMS2}</td>
<td style='width: 52%;'>BANNER AD HERE</td>


If I create a NEW "td", a new column is created, so I have 3 columns and/or 3rows.
[ Edited Feb 01 2012, 07:01AM ]
Go to top
Website
Tgtje
Feb 03 2012, 01:12PM
  • e107 Support Team
Registered Member #30653
Joined: Sep 18 2006, 01:25AM
Location: Born, The Netherlands
Posts: 1991
Like HEIGHT and WIDTH attributes on images, the WIDTH attribute in tables gives browsers vital information about your page layout. (source? quote)
now guessing : the banner add (example sc banner code)
is based on an image with a certain size.
the table does stretch if image is larger than table if no size is set to banner (image)also.
[ Edited Feb 03 2012, 01:13PM ]
Go to top
Website
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System