Please can someone help me with css and javascript

jankelly
Community Member Posts: 27
Hi, I'm working in Lectora 16 and have built a certificate with an entry field for the user to enter their name; the course is for web hosting. The entry box is functioning, but the formatting isn't appearing. I want the text to center, and the font to change.
I used the How to Style Entry Fields in Lectora using CSS as a guide, but I'm obviously missing something. CSS code:
.entry1 {
display: inline-block;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding: 10px 20px;
border: 1px solid #b7b7b7;
-webkit-border-radius: 3px;
border-radius: 3px;
font: normal normal bold 22px/normal "Palatino Linotype", "Book Antiqua", Palatino, serif;
color: rgba(0,142,198,1);
text-align: center;
-o-text-overflow: clip;
text-overflow: clip;
background: rgba(252,252,252,1);
-webkit-box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
text-shadow: 1px 1px 0 rgba(255,255,255,0.66) ;
-webkit-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
-moz-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
-o-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
}
.entry1:hover {
}
.entry1:focus {
}
Thanks!
I used the How to Style Entry Fields in Lectora using CSS as a guide, but I'm obviously missing something. CSS code:
.entry1 {
display: inline-block;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding: 10px 20px;
border: 1px solid #b7b7b7;
-webkit-border-radius: 3px;
border-radius: 3px;
font: normal normal bold 22px/normal "Palatino Linotype", "Book Antiqua", Palatino, serif;
color: rgba(0,142,198,1);
text-align: center;
-o-text-overflow: clip;
text-overflow: clip;
background: rgba(252,252,252,1);
-webkit-box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
text-shadow: 1px 1px 0 rgba(255,255,255,0.66) ;
-webkit-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
-moz-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
-o-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
}
.entry1:hover {
}
.entry1:focus {
}
Thanks!
Comments
-
The code surely works (see this: https://jsfiddle.net/j4rujsyb/) so I guess you missed something in Lectora. Like did you add the "entry1" class to the textfield?
-
Hi Serge,
I've checked the settings and all looks well to me. I have attached some screen shots that show the detail.
Also, I want to add an expiry date to the certificate that is generated by javascript (which I have working, but not in the course), I have attached the code. I have tried to get it working in a variety of ways, but can't get it to display. What is the best way to insert it?
Thanks again for your help
Jan -
I re-created your setup from the screenshots and it works fine (see attached). Share your actual title and I'll take a look at what might have gone wrong.
-
-
Thanks, Sergey
I sent you a message that doesn't appear to have been posted for some reason, and a link to Dropbox - I'll resend.
Please let me know if it doesn't arrive as I sent it at 9.10 pm last night, and again at abou.
I made some progress as when I compared your file to mine, I realized I had been inserting the wrong Entry ID code, so I now get the correct font and font size, however, I can't get the box to expand, or the static box to center the input box.
I also still cannot get the javascript to work to show the Expiry Date.
I really appreciate your help.
Thanks
Jan -
I looked at the project and I found the problem. It is related to how you set up the inheritance. The "Certificate" chapter inherits NO objects from title level, including your CSS style sheet. Furthermore, the "Certificate" page inherits no objects from its parent (from the chapter). So you made sure TWICE that the CSS you created does not get into your certiciate....
Solution:
1. Change Certificate chapter to "Inherit specific objects", move all objects except the CSS file into the right column ("excluded").
2. Also change the Certificate page to include ALL objects from parents.
See screenshot. -
Sergey,
You are a star! Thank you so much, and there was me thinking I had inheritance sorted!! The only outstanding issue is the text isn't centering - see attached screenshot.
Thanks for the time you've spent reviewing this, and more so for explaining the solution to me.
Best wishes
Jan
<div id="homeBody" class="homeBody"></div>
Categories
- 35.9K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 25 ELB Learning Content
- 25 ELB Learning Content Discussions
- 329 CenarioVR®
- 196 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 42 Rockstar Learning Platform®
- 39 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 936 All Things eLearning
- 37 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products