css float and clear problem
Posted: Thu Mar 01, 2012 11:42 am
Sorry if this is on the forum somewhere, but I have searched diligently...
I'm wanting to create a content page similar to this:
http://www.cheshiresouth.org.uk/churches.html
I've been given the impression that I shouldn't use tables for laying something like this out - correct??
So, I'm trying to implement something in CSS instead, using the floatutorial here:http://css.maxdesign.com.au/floatutoria ... al0405.htm
I've created the following code in the content section of my standard template page:
I've created an additional style sheet and linked it to the template also:
Everything looks fine in the FCKEditor in preview, but when I look online it looks like this:
http://www.thecrossing.co.uk/index.php?page=float-test
Not sure if it's important but aft er I 'apply' I notice that the editor (or something?) has changed the '<br' line to this:
Am I right in trying to do this in this way or whould I simply do a WYSIWYG table in the editor? If the former any comments on where I might be going wrong greatly appreciated. Perhaps it's the way I've linked my additional css or something?
Thanks.
I'm wanting to create a content page similar to this:
http://www.cheshiresouth.org.uk/churches.html
I've been given the impression that I shouldn't use tables for laying something like this out - correct??
So, I'm trying to implement something in CSS instead, using the floatutorial here:http://css.maxdesign.com.au/floatutoria ... al0405.htm
I've created the following code in the content section of my standard template page:
Code: Select all
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<br class="clearboth">
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<div class="thumbnail"> <img width="90" height="110" alt="" src="uploads/images/ah1.jpg" /><br />
Caption </div>
<p> </p>
Code: Select all
.thumbnail
{
float: left;
width: 90px;
border: 1px solid #999;
margin: 0 15px 15px 0;
padding: 5px;
}
.clearboth { clear: both; }
http://www.thecrossing.co.uk/index.php?page=float-test
Not sure if it's important but aft er I 'apply' I notice that the editor (or something?) has changed the '<br' line to this:
Code: Select all
<br class="clearboth" />
Thanks.