Hi guys, I am using <div> for this page: http://www.postdotcom.com/directorylist.php for the Free Directories Column. I would like to make another column right next to it for another category, how do I do this properly? Is it possible with <div>?
Well, there are multiple ways of doing it. Would you prefer the easy way or the hard way? First, let's start off with the easy way. CSS div#first_column { float: left; margin-right: 15px; } div#second_column { float: left; } Code (markup): HTML <div id="first_column"> Free Directories: ... </div> <div id="second_column"> Second column text goes here </div> Code (markup): If that doesn't work, you can try the hard way... CSS div#container { width: 280px; position: relative; } div#first_column { width: 130px; position: absolute; top: 0px; left: 0px; } div#second_column { width: 130px; position: absolute; top: 0px; right: 0px; } Code (markup): HTML <div id="container"> <div id="first_column"> Free Directories: ... </div> <div id="second_column"> Second column text goes here </div> </div> Code (markup): If you get stuck you can always fall back to HTML tables as a last resort.
Hi, thanks for the code. But I got this error : Fatal error: Smarty error: [in directorylist.tpl line 29]: syntax error: unrecognized tag: width: 130px; position: absolute; top: 0px; left: 0px; (Smarty_Compiler.class.php, line 436) in /home/postdotc/public_html/libs/smarty/Smarty.class.php on line 1088 for each of them, but maybe a different error but about the same, an error =|
I think you may have mistakenly placed the css in your tpl file. It either needs to go into a css sheet, or in the header as a style.
I guess so, its actually not a mistake but thats where all my codes go, including the current column I have on the page. What should I do instead?