Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-13 18:30:09

roelof
Member
Registered: 2005-03-27
Posts: 647

bas-lightbox and classes

Hello,

Last question i hope.

What i want i that on some sections that the images are all on the right site of my site and have a magrin of 20 px

I know that i can do this with css #image { float: right, margin: 20px}

But in bas-lightbox i can’t say <bas-lightbox class=“image” />

How can i solve this ??

Please please help.

Roelof

Offline

#2 2006-07-13 18:58:23

WhiteDog
Member
From: Maine
Registered: 2005-09-07
Posts: 174

Re: bas-lightbox and classes

if you want all images on the right you can do

<code>img{float:right; margin:20px;}</code>

otherwsie insert this in the txp image tag

<code>style=“float:right; margin:20px;”</code>


Grrr RRR nnndth grrr Skeek!

Offline

#3 2006-07-13 19:20:41

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: bas-lightbox and classes

oke,

but i use a external css file so the last solution can’t work for me.

Roelof

Offline

#4 2006-07-13 20:10:33

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: bas-lightbox and classes

You can also wrap all the images you want to align to the right in a div with an id, such as “foo”.

Then style your images like this:

<pre><code>#foo img{float:right; margin:20px;}</code></pre>


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#5 2006-07-13 20:24:29

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: bas-lightbox and classes

but i use a external css file so the last solution can’t work for me.

Of yourse, addinng style for all image like WhiteDog suggested would work also with an extrenal css-file.

But this would style all images. Better you use a wraptag an an wrapclass within the plugin and add your style like cbeyls wrote.

Offline

#6 2006-07-13 20:41:44

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: bas-lightbox and classes

oke,

Bas, one question for you.

If a make a #foo img {float : right, margin : 20 px}

is then wraptag=foo and wrapclass =foo or i’m mistaken.

Roelof

Offline

#7 2006-07-14 08:25:11

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: bas-lightbox and classes

is then wraptag=foo and wrapclass =foo or i’m mistaken.

Use label wraptag, wrapclass and break attributes in bas_lightbox in other txp-tags

&lt;txp:bas_lightbox cat="a-cat" wraptag="div" wrapclass="foo" />

Offline

#8 2006-07-14 11:29:11

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: bas-lightbox and classes

the # indicates an id, not a class. If you want to style what Bastian suggests, you have to type

<code>
div.foo img {float : right, margin : 20 px}
</code>

Last edited by cbeyls (2006-07-14 11:29:43)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#9 2006-07-14 11:32:00

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: bas-lightbox and classes

oke,

Thank you,
But it doesn’t work.

In my css i have :
<code>
plaatjes.rechts img
{ float: right ; }
</code>

and in my article i have :
<code>
<txp:bas_lightbox img=“2” label=”“ wraptag=“plaatjes” wrapclass=rechts />
</code>

But now the image is still on the left site.

What went wrong ???

Please help.

Roelof

Last edited by roelof (2006-07-14 11:47:36)

Offline

#10 2006-07-14 12:16:47

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: bas-lightbox and classes

The wraptag must be a XHTML tag, of course.

Maybe i am wrong, but i don’t think plaatjes is XHTML :)

Offline

#11 2006-07-14 12:43:04

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: bas-lightbox and classes

oke,

can img.rechts img then work ??
or can it be img.rechts ?

Roelof

Offline

#12 2006-07-15 01:58:27

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: bas-lightbox and classes

No,

div.rechts img

img.rechts is when you apply the rechts class directly to the image (img). Here I suggest you apply the rechts class to the images container (div), because the images already have the “lightbox” class applied to them.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

Board footer

Powered by FluxBB