Hello, I am editing one of the scripts that my friend done. As far as i can see he used div's for designing page. <div="wrapper"> </div> etc. Anyway, i want to add a row to the page, and i will write Test, Test1, Test2 to that row. I want to align Test to left, Test1 to middle and Test2 to right. Normally its pretty easy to do it with tables but i don't really know what should i add to .css file for the thing i want.
Off of the top of my head, I would suggest setting the css text-align: center; and for the left and right text you can use float: left; / right with a clear: left; / right. I guess an example would be.. <style type="text/css"> #wrapper{ width: 800px; text-align: center; } #left_side{ width: 200px; float: left; clear: right; } #right_side{ width: 200px; float: right; clear: left; } </style> and then for the html you would try: <div id="wrapper"> <div id="left_side">content for left side</div> <div id="right_side">content for right side</div> content to go in middle </div> of course I have not tested this yet and it may take some tweaking to get it right.. it's a start anyway
Show me an example of what you want and what the content of each side will be and I'll show you the right way to do it.
<html> <body> <div style="width:33%; float:left">Left Panel</div> <div style="width:33%; float:left">Mid Panel</div> <div style="width:33%; float:left">Right Panel</div> </body> </html> try above code
That will force all browsers into Quirks Mode. You don't want that since each browser will try to guess what you're trying to do, often with horrible results. It's also not just a matter of where the columns are going to be. It's also a matter of WHAT those columns will be. Is one of the columns a menu? A sidebar? An advertising block? A form? My cat? (Ok, I made that last one up.) I keep telling people this all the time. DEFINE the structure of your Web page with HTML, then use CSS to style it the way you want it to appear.