Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-11-15 06:16:21

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: p tags inside a tags with spans?

Well I tend to use an <code><hr class=“clearing” /></code> tag at the moment with CSS similar to this:-

<code>.clearing {
clear:both;
display: none;
height: 1px;
}</code>

Last edited by thebombsite (2005-11-15 06:17:23)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#14 2005-11-15 11:39:35

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

So I guess I would put a clearing div inside it all like this:?
<code>
<span class=“lk”>
<img class src=”<txp:ext_author_image_url />&amp;default=http://artiswork.org/css/images/face.jpg&amp;size=50”“ alt=“authorimage” />
<txp:ext_author_about />
<div class=”.clearing”></div>
</span>
</code>

Thanks.


Offline

#15 2005-11-15 16:37:54

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: p tags inside a tags with spans?

I’m not sure. Can you put a div inside a span?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#16 2005-11-15 18:00:55

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

stuart,
I have no idea. Although I think I may go for this instead, since I am running up against these validation issues.

Thx.

Matthew


Offline

#17 2005-11-17 03:17:37

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: p tags inside a tags with spans?

Offline

#18 2005-11-17 13:53:54

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

So, here’s the outcome of this whole extravaganza. Thanks for all your help.
This is not the outcome of my work, but others who must have had pity on me :) the young grasshoppa

Here is the final html:
FORM :
<code> <div class=“box”> <p><a class=“over” href=”/yoursectionHere”>YourSectionTitleHere</a></p> <div class=“lk”> <p class=“image”><img src=“ImageUrlHere” alt=”“ /></p> <p>YourParagraphHere</p> </div><!—close lk—> </div><!—close box—>
</code>

PAGE: (note: it is set up this way, so that it will validate, if you put the Div id in the form it repeats and that’s a no no.
<code>
<div id=“user-list” class=“menu”>
<txp:your_listing_tag_goes_here form=“the form above” />
</div><!—close user-list menu—>
</code>

The Javascript is as follows:
<code>
function userList()
{ var divs = document.getElementById(‘user-list’).getElementsByTagName(‘div’);

var mark = 1;

for (var i = 0; i < divs.length; i++) { if (divs[i].className == ‘box’) { var hide = divs[i].getElementsByTagName(‘div’);

for (var j = 0; j < hide.length; j++) { if (hide[j].className == ‘lk’) { hide[j].id = ‘desc-’ + mark; hide[j].style.display = ‘none’; } }

var as = divs[i].getElementsByTagName(‘a’);

for (var k = 0; k < as.length; k++) { if (as[k].className == ‘over’) { as[k].id = ‘link-’ + mark;

as[k].onmouseover = function() { document.getElementById(‘desc-’ + this.id.substr(5)).style.display = ‘block’; };

as[k].onmouseout = function() { document.getElementById(‘desc-’ + this.id.substr(5)).style.display = ‘none’; }; } }

mark++; } }
}

window.onload = function()
{ userList();
};
</code>

THE CSS: (note: do not include any display: styling besides what I have included below. Also make sure not to use any “link-12” or “desc-12” for id’s (not that you would), but it would interfere with the JS.)
<code>

/*the only thing that must remain “static” for these two divs is the positioning. If you take that out, the height of your parent element will constantly shift, making the page jump up and down – do this if you like jumping jacks!—-*/
.box { position: relative; }

div.lk { position: absolute; z-index: 1; top: 0px; left: 200px; width: 300px; height: 100%; }
/*.lk display:none so that the browser doesn’t show what it’s loading*/

.lk { display: none; }
</code>

Have fun.

Matthew


Offline

#19 2005-11-17 21:56:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: p tags inside a tags with spans?

And it works too! :grin: Well done. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#20 2005-11-19 02:16:44

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

If anything’s well done, its that I am a persistant S.O.B.! I have a lot of help from some core txp folks like you.
Thanks for cheering on the student,

Matthew


Offline

Board footer

Powered by FluxBB