New messages Members Forum rules Search
  • Page 1 of 1
  • 1
Forum moderator: kostova  
uCoz Support Forum by uCozers » uCoz » Tag Board » How do I make 2 Columins? (sml[answered]tables)
How do I make 2 Columins?
lu9821Date: Sunday, 2009 November 22, 9:43 AM | Message # 1
Font size: A | A |
Private
Group: User
Message: 1
[ ]
Offline
I Want To Make for 2 Columins For Entries
Example:
Attachments: 7411332.jpg(88.1 Kb)


We Are Cleavers
 
kostovaDate: Sunday, 2009 November 22, 2:35 PM | Message # 2
Font size: A | A |
Colonel
Group: Administrator
Message: 268
[ ]
Offline
There's a simple solution to this. Assuming you're using informers, or even the $last_news$ works fine, because they have a template adjustment. Using floats.

If this is a template for $last_news$, go to Customize Design > Under Site News, go to Appearance of Entries and paste the following code:

Code
<div class="column">
    <div class="image">
     <img src="imageurl.jpg" alt=""/>
     <?$RSTARS$('12','i.png','1','float')?>
    </div>
    <div class="desc">
    <h4>$TITLE$
     <span class="poster">posted by $USERNAME$</span>
    </h4>
<p><b>Added On</b>:$DATE$<br/><b>Category</b>:$CATEGORY_NAME$</p>
    <p><b>Description</b>:$MESSAGE$</p>
</div><div style="clear:both;"></div>
</div>
Now, I'm not up to speed on my css skills right now due to school, as this was made extemporaneously, so if you encounter any problems just come back here and ask.

For the rest of it, you should modify the Module Settings for site news to make this appear correctly. By adding a text limit to the description and also the number of entries that appear on a page should be somewhere along the lines of an even number.
Here's the last part you should add in Customize Design > SIte Pages, anywhere you would like to place it. Just so long as it's between the body tags.

Code
<div class="twocolumn">$LAST_NEWS$<div style="clear:both;"></div><style type="text/css">
.column {float:left;width:48%;margin-right:8px;display:inline-block;height:200px;overflow:hidden;}
.image {width:115px;float:left;}
.image  img,span.poster {display:block;width:100%;}span.poster{font-size:11px;font-weight:normal;}
</style></div>
The beauty of this is, you can have an array of entry numbers, whether it be even or odd, and it will still be two columns. In other words, it is possible. It's sort of the generic method (my markup used for this particular case), but it does the job just fine.
 
jackassDate: Monday, 2009 November 23, 0:21 AM | Message # 3
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
wow kostova, why to make it so complicated? biggrin

just go to Main » Customize design » Editing templates >> Appearance of entries
And paste this in the beginning of code

Code
<div style="width: 50%; float: left;">

and this in the end

Code
</div>

And if you need 3 columns change 50% to 33% or 25% for 4 columns smile


 
kostovaDate: Monday, 2009 November 23, 2:44 AM | Message # 4
Font size: A | A |
Colonel
Group: Administrator
Message: 268
[ ]
Offline
Well your code has the basics, the container basically, I gave him all what's on the picture.
If you get deeper into css, you'll see that in order to create a desired effect, you would have to make complicated markup and styling. You would also need to clear your floats.
I've been told way to many times my coding is complicated wink And it shows when I show you my website soon. tongue
 
uCoz Support Forum by uCozers » uCoz » Tag Board » How do I make 2 Columins? (sml[answered]tables)
  • Page 1 of 1
  • 1
Search:


Copyrights uCozers 2009 - 2019 To TOP
Refresh Smileys Manager