![]() |
Create Horizontal Widget?
When creating a new widget "Recent Articles" - the items appear vertically in a list. How would you change the layout so that the articles appear Horizontally (or side by side)
like this: https://vborg.vbsupport.ru/external/2012/02/39.jpg I want to be able to create a "Read More" article widget for additional similar articles but right now, they display vertically rather than horizontally. The current code I am using to create the widget is: Code:
// Set Your Section ID Here |
You would need to create a grid that has a spot for this widget. Then create a layout from that grid and apply it to the section and make sure to put your widget in that specific spot in the layout.
|
Hi Lynne, thank you for responding! I have a grid that has a spot for the widget. I have a layout from the grid.
The problem that I'm having is that this particular widget code returns the items vertically, rather than horizontally. I need help editing the code (shown in the first post) to change how it appears so that instead of the items coming up vertically like this: photo- link photo- link photo- link they appear horizontally like this instead: Photo Photo Photo Link Link Link The issue appears to be the table output- it repeats vertically- if($text == '') $text = substr($fulltext, 0,150); if($image != '') $output .= "<tr><td><img src='".$image."' width='".$width."px' align='left' height='75' HSPACE='5' VSPACE='3'/></td>"; $output .= "<td><b><a href='content.php?".$nodeid."-".$url."' align='top'>".$title."</a><p>".$text." </b></p><br/></td></tr>"; } $output.="</table>"; But I'm not familiar with how to make it repeat horizontally instead. . . --------------- Added [DATE]1326398068[/DATE] at [TIME]1326398068[/TIME] --------------- I tried changing the table <td><tr> placements, but it just gave me errors. I would assume that I would have to create a class-style for it to follow to get it to repeat horizontally, rather than vertically, but I don't know where to begin to do that. |
Ah, I see what you mean. Can we get a link to see this?
|
Quote:
Yes, you can view it here: link truncated scroll to the bottom - this widget is located underneath the Comments Box. (Thank you !) |
Have you tried using <tr width="33%"> ?
|
Quote:
Parse error: syntax error, unexpected T_LNUMBER in I tried it several different ways in the <tr> and also in the table width itself. |
If you're trying to insert width="33%" in a string that's delimited with double quotes, you have to escape the quotes, like:
Code:
$output .= "<tr width=\"33%\"> some stuff..."; |
Thank you kh! I got it to narrow the table , now I just need it to repeat horizontally, rather than vertically... is there a way to incorporate repeat-x into output?
Code:
if($text == '') $text = substr($fulltext, 0,150); I tried adding a div class and specifying it, but I can't seem to get the syntax right Code:
<style> Code:
$output.="<div class='hloop'>"; |
All times are GMT. The time now is 11:24 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|