Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 12:29:57 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155557 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Anynews problem  (Read 202 times)
picas2012

Offline Offline

Posts: 12


« on: January 10, 2012, 03:59:52 PM »

Hi

I have this code to displat the news in homepage

Code:
<div >
<!-- BEGIN news_block -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td> {GROUP_IMAGE}</td>
</tr>

<tr>
<td><strong>{TITLE} {POSTED_WHEN}</strong></td>
</tr>
<!-- BEGIN readmore_link_block -->
<tr>
<td>{CONTENT_SHORT}</td>
</tr>
<tr>
<td><a href="{LINK}">{TXT_READMORE}</a></td>
</tr>
<!-- END readmore_link_block -->
<!-- END news_block -->
</table>
</div>

Display the nes in 1 column

But i want i 2 columns, it´s possible ?

Thanks

Paulo
« Last Edit: January 10, 2012, 07:52:46 PM by kweitzel » Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6977


WWW
« Reply #1 on: January 10, 2012, 07:54:23 PM »

First of all I made your code a bit more readable by using the Code tag "#" Icon that this forum provides. Then, please have a look at anynews which supports templates. In those templates you can "design" the required output.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #2 on: January 10, 2012, 11:39:26 PM »

With a table layout you cannot fill 2 columns dynamically. You need to use floating DIV's. This should work (not tested):

Code:
<div>
  <!-- BEGIN news_block -->
  <div>
    <div>{GROUP_IMAGE}</div>
    <div><strong>{TITLE} {POSTED_WHEN}</strong></div>
  
    <!-- BEGIN readmore_link_block -->
    <div style="width:50%;float:left;">
      <div>{CONTENT_SHORT}</div>
      <div><a href="{LINK}">{TXT_READMORE}</a></div>
    </div>
    <!-- END readmore_link_block -->
  
    <!-- END news_block -->
  </div>
</div>

Of course it's better to style the DIV's in the stylesheet, instead of inline like here. You will also want to layout them, because now the columns are right next to each other. So you need to apply margins, and maybe background colors, borders, etc. to make it look nice.
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!