Coding issue

tyler785

New member
Joined
May 4, 2006
Messages
131
Reaction score
0
Ok, i'll try to make this as simple as possible, but does any body know how to make 4 column with in a tag.  The info that will be in the 4 columns will be pull from a DB.  Something I tried was this:

<div id="mainContent">

<? forloop{ ?>

    <div id="loopContent<?=$i?>">

1.

        this is the image

        Description

   

<?}?>

</div>

I can do it with a table but I want to avoid using tables if at all possible.  Any advice or sources would greatly be appreciated!

 
I wish I could help but not programming for over 4 years = lost knowledge. I went to school for it but my path has been computer and software support. I do miss programming though.
 
I tried finding out for you tyler785, but no one has responded yet. I'm also not very good with things like that, sorry man  :smt102
 
Oh well, thanks anyways, I'm just going to have to settle using a table.  Although the AJAX that i'm using doesn't look as "eye candy" as using div's would be.  Maybe i'll run accross an example sometime on the internet that will solve my issue.  :smt024
 
so are you trying to make 4 div's containing those three <span> lines? I'm slightly confused since your snippet appears your trying to make 4 columns each having an image and description, and if the 100,200,300 is pixels that would be 2400 pixels wide, but i'm not sure what HTML defaults too exactly, just a little rusty
 
Well my php syntax may be off on the for loop, but I'd be tempted to try something like the following to get one Div holding the 4 columns, unfortunately my server needs a rebuild so I can't test it out quick.

CSS

<style type="text/css"></style>

DIV CODE

<? for ($i=0;$i<4;$i++ ;) { ?>

<div class="fourcolbox" id="something<? $i ?>">

Content here

<? } ?>

</div>

 
Thanks, I'll have to give it a try and let you know how it works out.
 
Back
Top