new content type "three column"

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
consistency
Posts: 40
Joined: Sat 5. Mar 2005, 23:59

new content type "three column"

Post by consistency »

made it just for exercise:
quick and dirty implemented an three column html content element.

just try it: http://www.consistency.at/download/phpw ... col0.1.zip
luna
Posts: 28
Joined: Sun 18. Apr 2004, 06:02

Post by luna »

Do you mean three rows content???? :roll:
After installation on 1.2.3 dev I'm getting the content into three rows and not colums :shock:
consistency
Posts: 40
Joined: Sat 5. Mar 2005, 23:59

Post by consistency »

it is three col content.
in backend its only shown as three rows because editing is easier.
luna
Posts: 28
Joined: Sun 18. Apr 2004, 06:02

Post by luna »

ok I have this into the source code
<h3>Title</h3>
<h4>Subtitle</h4>
<div class="threecol" id="threecol">content1</div>
<div class="threecol" id="threecol">content2</div>
<div class="threecol" id="threecol">content3</div>

So is this supposed to work if we add our own "threecol" CSS?
in the zip file there is no an aditional css div class.
consistency
Posts: 40
Joined: Sat 5. Mar 2005, 23:59

Post by consistency »

oh i missed that, you are the first person testing...

Code: Select all

.threecol
{
	float: left;
	width: 190px;
	/*margin-left: 10px;
	margin-right: 10px;*/
	padding-left: 10px;
	padding-right: 10px;
	/*border: 1px solid yellow; */
	margin-bottom: 0px;
	margin-top: 0px;
}
hope it work now, just tell if something is missing.
luna
Posts: 28
Joined: Sun 18. Apr 2004, 06:02

Post by luna »

Ok mate that was :wink:
Now work fine but I think that the width is not neccessary
for smaller or larger {CONTENT} than 190 px so this will work best in this way

Code: Select all

		  .threecol
{
   float: left;
    /* width: 190px;
   /*margin-left: 10px;
   margin-right: 10px;*/
   padding-left: 10px;
   padding-right: 10px;
   /*border: 1px solid yellow; */
   margin-bottom: 0px;
   margin-top: 0px;
}
or setting the width to the {CONTENT} width

BTW. Good Job mate.
consistency
Posts: 40
Joined: Sat 5. Mar 2005, 23:59

Post by consistency »

thank you for feedback, testing and "likeing" :)
luna
Posts: 28
Joined: Sun 18. Apr 2004, 06:02

Post by luna »

I have tested some more this hack and noticed that i'm giving strange results on different browser.
So i think that an good improvement will be to define float left and right in the css
here is an example code

Code: Select all

<html>
<head>
<style>
body {
    margin: 0px;
    padding: 0px;
}
div#header {
    clear: both;
    height: 50px;
    background-color: aqua;
    padding: 1px;
}
div#left {
    float: left;
    width: 150px;
    background-color: red;
}
div#right {
    float: right;
    width: 150px;
    background-color: green;
}
div#middle {
    padding: 0px 160px 5px 160px;
    margin: 0px;
    background-color: silver;
}
div#footer {
    clear: both;
    background-color: yellow;
}
</style>
</head>
<body>
<div id="header">
    <h1>Header</h1>
</div>
<div id="left">
    Port side text...
</div>
<div id="right">
    Starboard side text...
</div>
<div id="middle">
    Middle column text...
</div>
<div id="footer">
    Footer text...
</div>
</body>
</html>
This is working fine in all browsers that i was tested.
consistency
Posts: 40
Joined: Sat 5. Mar 2005, 23:59

Post by consistency »

its the xhtml problem, see my post in this thread: http://www.phpwcms.de/forum/viewtopic.p ... highlight=

but thanks for correcting.
JensZ
Posts: 136
Joined: Wed 16. Feb 2005, 12:18
Location: Stockholm, Sweden
Contact:

Post by JensZ »

Hi,

What is it used for? Is it just used instead of having a template with three custom blocks, say {col1}, {col2}, and {col3}?

Jens
consistency
Posts: 40
Joined: Sat 5. Mar 2005, 23:59

Post by consistency »

yes, just instead of three custom blocks. it was only an exercise for me, just played around.
Post Reply