Content Text going outside divs

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
splendidbloke
New Member
New Member
Posts: 8
Joined: Thu May 16, 2013 8:37 am

Content Text going outside divs

Post by splendidbloke »

Hi there!

Loving this program but I currently am not very good at using it so forgive this very basic question, however:

I have 3 divs of the same class in a template and a different content tag in each one. I want the content to fit into the width of the div, but it seems to enjoy stretching to the width of the parent div...

Here is my code.

<div id="content">

<div class="3column">
{content}
</div>

<div class="3column">
{content block=second_block label="block2"}
</div>

<div class="3column">
{content block=third_block label="block3"}
</div>

</div>

and here is my css

.3column
{
width:300px;

height:300px;
float:left;
}

In dreamweaver, this creates 3 divs in a row that line up next to each other in the page with the text staying nicely within each div. Something about the content tags seems to override the text staying within the div.

thoughts?

Sorry about my English, I'm Australian.
splendidbloke
New Member
New Member
Posts: 8
Joined: Thu May 16, 2013 8:37 am

Re: Content Text going outside divs

Post by splendidbloke »

Sorry if I wasn't clear...

basically I want it to be a 3 column layout, but the content tag seems to break free of each div so instead of getting 3 divs floating next to each other in a row, i get 3 divs in a column.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Content Text going outside divs

Post by Dr.CSS »

I would have to see the site to help, but it sounds like you are missing a closing div or ? as the content block can't do anything to break the layout unless you put long text sting in the content...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Content Text going outside divs

Post by velden »

Your code looks okay, so there must be something else going wrong. Obviously it's not the whole template nor css you show us.

Of course a three column layout is perfectly possible with cmsms:

http://www.bbvandeven.nl/informatie/links
splendidbloke
New Member
New Member
Posts: 8
Joined: Thu May 16, 2013 8:37 am

Re: Content Text going outside divs

Post by splendidbloke »

Thanks for your help, I figured it was the kind of problem I would never be able to find so I simply remade the template and now it works.
Post Reply

Return to “Layout and Design (CSS & HTML)”