Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-09-24 12:38:45

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

css question: how to leave the space between articles?

if i have little text in article, the next article “drives in” to first.
how to leave the space between articles?
it happens with ff and opera.

here

Offline

#2 2007-09-24 12:50:49

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: css question: how to leave the space between articles?

First change p.tooted to div.tooted, like this:

<div class="tooted">
	<!-- Original article code -->
</div>

Because paragraphs doesn’t allow block-objects inside of them. And now lets add the there one object more, a line breaker <div style="clear:both;"></div>, like:

<div class="tooted">
	<!-- Original article code -->
	<div style="clear:both;"></div>
</div>

That overdriving situation was experienced because of the floating-objects, images, won’t obey other elements. Why? Because they float.

Cheers!

Offline

#3 2007-09-24 13:06:29

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: css question: how to leave the space between articles?

imo it’s better to clear floats without using any additional markup, just by the handy css :after pseudo element.

.tooted:after {
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
}

Offline

#4 2007-09-24 13:14:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: css question: how to leave the space between articles?

A better way is described here


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2007-09-24 13:39:35

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: css question: how to leave the space between articles?

solved. many-many thanks all you guys

Offline

Board footer

Powered by FluxBB