Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2023-01-05 16:41:07

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,066
Website Mastodon

Re: css/style error i can't debug

phiw13 colak thank-you to the both of you for your suggestions. Will try them later today. I think i tried the first option but had problems with the styling. I am keen to give Colak’s a try as it looks exactly like what i am trying to do. Will report back later today.


…. texted postive

Offline

#14 2023-01-05 16:43:08

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,066
Website Mastodon

Re: css/style error i can't debug

PS Forum Editors: I am not receiving emails notices of new posts even though i am subscribed to this topic.


…. texted postive

Offline

#15 2023-01-06 03:08:06

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,066
Website Mastodon

Re: css/style error i can't debug

After days and hours of frustration i tried this approach which took 10 mins to implement :

<txp:if_section name=" ">
<li class="nav-item active"> 
<a class="nav-link active" aria-current="page" href="/">Home |</a> 
                </li>  
<txp:else />
    <li class="nav-item">
                    <a class="nav-link" href="/">Home |</a> 
                </li>  
</txp:if_section>
<txp:if_section name="members">
<li class="nav-item active"> 
<a class="nav-link active" aria-current="page" href="/members">Members |</a> 
                </li>  
<txp:else />
    <li class="nav-item">
                    <a class="nav-link" href="/members">Members |</a> 
                </li>  
</txp:if_section>
<!-- /END members = -->

so is what i have done idiotic? Is there any reason why i shouldn’t leave it as is?

PS i never managed to get colak's or phiw13's suggestions to work.

PPS I will never, ever, again use a bootstrap option… EVER! (easy to say at my age).


…. texted postive

Offline

#16 2023-01-06 06:11:52

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

Re: css/style error i can't debug

I guess that the problem was that you wanted to add an active class to the li as well as to the a elements.

I’m sure that there may be a more economical way to achieve what you wanted, possibly with the use of a variable but I can not think of a way to construct it just now.

I do see a minor issue in your code. href="/members should be href="/members/ as by default txp sections have a trailing slash.


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

Offline

#17 2023-01-06 06:51:29

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,066
Website Mastodon

Re: css/style error i can't debug

colak wrote #334462:

I guess that the problem was that you wanted to add an active class to the li as well as to the a elements.

not sure i grasp the differences. i was just trying to mimic the bootstrap example but add the active state to the link.when on that page.
(on another site , done years ago, i used the txp section list with no issues. but with this bootstrap example it was a challenge)

I do see a minor issue in your code. href="/members should be href="/members/ as by default txp sections have a trailing slash.

thank-you … i have added the /

Last edited by bici (2023-01-06 06:52:12)


…. texted postive

Offline

#18 2023-01-09 21:42:19

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,066
Website Mastodon

Re: css/style error i can't debug

bici wrote #334282:

just when i thought i was done doing websites i got puled into doing another website for, of all people— retired folk, just like me!
i used a bootstrap framework or template. which i bent and adapted for our use. But one issue, albeit small, still haunts me. i cannot figure out how to stye the active link backround from solid black to another colour in the nava bar… see members section. I globally changed all what was black to red in the bootstrap.min.css file but darn it nothing changes! On the plus side i managed to adapt the footer area incorporating something that Gallex had done recently. (with thx!)

Anyways if someone can easily spot the reason why i can’t change the background colour i would appreciate the tip. Otherwise will live with it.
PS there is also a bootstrap.min.js file that i can’t make much sense of. I can see i am a bit rusty. ;-)

Simple Bootstrap website powered by Textpattern. Now ready to add new sections once needed

Last edited by bici (2023-01-09 21:45:42)


…. texted postive

Offline

Board footer

Powered by FluxBB