- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m trying to add coding in my HTML so that only the first 9 lines of text are shown unless the surfer clicks on “See more”.
I’m retired but still trying to help a friend update his website. Can some kind person look at this page http://www.go-there.co.uk/attractions/a-blank.phtml and scroll down to the two boxes and tell me where I’ve gone wrong.
The top one works fine but I need each box to be independent of the other. Is there a way around this?
Please note that I don’t have access to the <head> so some JS is out of the question.
Thanks.
It’s because both labels are linked to the same checkbox
<label for="post-1" class="read-more-trigger"></label>
Make the second one
<label for="post-2" class="read-more-trigger"></label>
I see from a previous thread you have a lot of these…well that’s the downside of the “checkbox hack”.
Javascript / Jquery just does this so much easier.
It could also be a lot more compact than what I initially posted in the other thread, without the need for a line of script for each clickable item…
A big thank you to Paulie_D and Shikkediel who have helped me make this work. Just one more question before closing (but not sure if you’ll know the answer) and that is ‘when I produce a separate totally new page can I name them as “post-1” to “post-10” or do I have to continue numbering the new page “post-11” to “post-20”?
If it’s a new page then you can repeat IDs & names with no problems.
Thanks. If in the USA do have a great July 4th.