- Posts: 25
COMMUNITY FORUM
CSS help for Extra Fields
- Keith Dick
- Topic Author
- Offline
- Junior Member
Less
More
12 years 1 month ago #102149
by Keith Dick
CSS help for Extra Fields was created by Keith Dick
I have a category with about 5 extra fields.
One of these extra fields contains a PayPal Buy Now button and I have named the field 'buy:'
What I would like to do is remove the 'buy: text when displayed in the front end.
I can hide all the itemExtraFieldsLabel font using
div.itemExtraFields ul li span.itemExtraFieldsLabel {
color: #FFF
}
So the selectors to this point appear to be correct,
but I am trying to use an attribute selector to hide the field that contains 'Buy:' the code generated by K2 is '<span class="itemExtraFieldsLabel">Buy:</span>' so I have tried using:
div.itemExtraFields ul li span.itemExtraFieldsLabel[Buy:] {
color: #FFF
}
but this doesn't work.
Can anyone point me in the right direction with this?
Also is there a better way to hide the text instead of matching the color with the background?
One of these extra fields contains a PayPal Buy Now button and I have named the field 'buy:'
What I would like to do is remove the 'buy: text when displayed in the front end.
I can hide all the itemExtraFieldsLabel font using
div.itemExtraFields ul li span.itemExtraFieldsLabel {
color: #FFF
}
So the selectors to this point appear to be correct,
but I am trying to use an attribute selector to hide the field that contains 'Buy:' the code generated by K2 is '<span class="itemExtraFieldsLabel">Buy:</span>' so I have tried using:
div.itemExtraFields ul li span.itemExtraFieldsLabel[Buy:] {
color: #FFF
}
but this doesn't work.
Can anyone point me in the right direction with this?
Also is there a better way to hide the text instead of matching the color with the background?
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 1 month ago #102150
by william white
Replied by william white on topic Re: CSS help for Extra Fields
You will most likely have to have a conditional statement to do this.
in the override where the extra fields and labels are displayed you will need to wrap the label display with a condtional that test for the value of the lable and omit it if true and display it if not...
there may be a way to do it with css but i am not up on that
in the override where the extra fields and labels are displayed you will need to wrap the label display with a condtional that test for the value of the lable and omit it if true and display it if not...
there may be a way to do it with css but i am not up on that
Please Log in or Create an account to join the conversation.
- Keith Dick
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 25
12 years 1 month ago #102151
by Keith Dick
Replied by Keith Dick on topic Re: CSS help for Extra Fields
I thought span.itemExtraFieldsLabel[Buy:] with the[Buy] added gave the attribute condition to the selector but I'm not too sure about it.
It's possible the syntax isn't correct with the selector but I have tried all sorts of ways to achieve this without any luck.
Thanks for the reply anyway.
It's possible the syntax isn't correct with the selector but I have tried all sorts of ways to achieve this without any luck.
Thanks for the reply anyway.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
12 years 1 month ago #102152
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: CSS help for Extra Fields
You cannot achieve what you want without editing the HTML output ( by making a template override). When you do so, you will be able to detect the desired field by it's ID.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.