Thanks, columns are displaying correctly, I have to work out how to make them a fixed size and not resize when entering text and inserting images.
Can you tell me how to go about entering image paths correctly, as images are broken?
Regards
Thanks, columns are displaying correctly, I have to work out how to make them a fixed size and not resize when entering text and inserting images.
Can you tell me how to go about entering image paths correctly, as images are broken?
Regards
Just use cell width and height setting as follows:
for pixel width.
for percentage width.HTML Code:<table border="0" width="300"> <tr> <td width="100" height="100"> </td>
As I said, basic HTML is OK - so don't be frightened to use it.HTML Code:<table border="0" width="100%"> <tr> <td width="30%" height="30%"> </td>
------------------------------------------------------
The PATH to the images depends entirely on where you store the images.
In your zencart webshop, you have an images folder at the root level of the installation.
What I do (to distinguish index page design element images from product images) is create a sub-folder in the images folder, and call that folder defined-pages.
That is where I store images that appear in any defined page that appear
The PATH in this case, will be:
Note that if the link to the image is internal, you need only have the path shown as I show above, because ZC will put into your header, the <base-href="............"> tag.Code:images/defined-pages/picture1.jpg
Naturally, EXTERNAL images will require the FULL path:
Note that in this case (full path), you run the risk of Browser SSL warnings when/if you invoke SSL on your server, if the PATH to an element is itself insecure... ie: http:// instead of https://HTML Code:http://www.some-other-website.com/images/picture.jpg
20 years a Zencart User
Another way to do it, without using tables or hardwired sizes, is to enter your columns of info inside DIVs with class names and then style the classes in your stylesheet. Makes for cleaner code. One drawback is that vertical alignment issues are harder to deal with in CSS than in tables. Here's the general idea...
<div class="col1">
<h3>Header</h3>
<div class="img"><img code here...></div>
<div class="txt">text here</div>
</div>
<div class="col2">
<h3>Header</h3>
<div class="img"><img code here...></div>
<div class="txt">text here</div>
</div>
<div class="col3">
<h3>Header</h3>
<div class="img"><img code here...></div>
<div class="txt">text here</div>
</div>
<div class="col4">
<h3>Header</h3>
<div class="img"><img code here...></div>
<div class="txt">text here</div>
</div>
Define the column classes something like...
.col1 {
height: 1%;
width: 23%;
float: left; }
The 1% height is the Holly Hack to avoid IE display bugs. Adjust the 23% as need to keep everything within your centercolumn. You may have to play with that float: left; definition to make everything line up. I only use two columns and have float: left on the left one and float: right on the right one. It gets trickier when you need more columns I think.
Define the img and txt classes as needed for your purposes.
Rob
P.S.
You could also just put the class names into the table structure instead and then add the styles to the stylesheet. Makes adjusting things easier than editing a bunch of hard-coded values.
I just gotta get me a load of those donuts! See how clever you become when you eat Rob's donuts.![]()
20 years a Zencart User
I love this forum. Would be lost with out it, exactly what I needed to do add text and images etc to the main page. Thanks guys![]()
I want to setup a defined page called main.html, as opposed to index.html, that is based on the About_Us mod. Would there be any conflicts with zc code in doing so.
TIA
What you are suggesting is not within the context of a PHP-driven site.
The DEFINED PAGES are actually just PARTS of raw html code that get "parsed" into the display - that display having been assembled by the php code.
You have to "think differently" when working with PHP - expecially if you've come out of a flat html background.
Strictly speaking, there are no "pages" in zencart (or any other content-managed system).
"Web pages" come into existence only when a user sends a request for them to be assembled, and the php then gets to work to cobble the elements together before delivering the result to the browser. When the user clicks a link, the page they are on "evaporates" forever, and a new "page" is assembled in its place.
So... You can't use files with .html extensions. They make no sense in this context.
... Or rather, you CAN create a html page... but it will exist outside of the schema.
20 years a Zencart User