- This topic is empty.
-
AuthorPosts
-
February 23, 2013 at 11:47 am #41960
Anonymous
InactiveI’m not all that experienced with javascript and i would like to know how can i apply this javascript code.
to the header navigation bar of this pen? [http://codepen.io/Jarolin/pen/iHCzc](http://codepen.io/Jarolin/pen/iHCzc “”)
The source and use of the javascript code can be found here [http://www.metaltoad.com/blog/resizing-text-fit-container](http://www.metaltoad.com/blog/resizing-text-fit-container “”)
February 23, 2013 at 11:57 am #125722chrisburton
Participant`elem` represents to replace that with an actual element.
February 23, 2013 at 12:00 pm #125723Anonymous
Inactive@chrisburton I’ve already tried that and tried it again but there was no change.
February 23, 2013 at 12:03 pm #125724chrisburton
ParticipantWhere are you loading jQuery? Why isn’t the javascript in the javascript panel?
You might want to rethink some of your markup as well. Using `
` tags to separate content is pointless when you could just use a block level element (such as a `p` tag).February 23, 2013 at 12:03 pm #125725Anonymous
InactiveI also updated the pen and included the javascript code. I basically want the navigation link to fill the entire width of the header div automatically. And shrink automatically when it overflows.
February 23, 2013 at 12:13 pm #125728Anonymous
Inactive@chrisburton I got rid of that on my original html code. that code is from a few days ago. But how do i apply the javascript? also i dont know what you mean by> Where are you loading jQuery? Why isn’t the javascript in the javascript panel?
February 23, 2013 at 12:19 pm #125731chrisburton
Participant@Jarolin Please take some time to read this: https://css-tricks.com/forums/discussion/comment/87079
February 23, 2013 at 12:43 pm #125734Anonymous
Inactive@chrisburton i don’t see what it is your asking me to do. The javascript code is in the pen.
February 23, 2013 at 12:51 pm #125741chrisburton
ParticipantIf you’ve read the link above, I was teaching you how to use CodePen properly.
February 23, 2013 at 12:59 pm #125748Anonymous
Inactive@CrocoDillon there is a change but the text remains the same size even when it overflows the header. I want the text to automatically shrink to the proper size to prevent it from overflowing.
February 23, 2013 at 1:08 pm #125752Anonymous
Inactive@CrocoDillon i updated the pen with the changes you provided.
February 23, 2013 at 1:10 pm #125753chrisburton
ParticipantIt’s because he isn’t properly using CodePen. Remove the script tags at the beginning and end of the code on the JS panel. Then, click on the sprocket button on the JS panel next to the number (top right corner) and choose jQuery on the dropdown. Done.
February 23, 2013 at 1:11 pm #125754Paulie_D
MemberCould someone please provide a link to the latest good Pen?
February 23, 2013 at 1:14 pm #125755chrisburton
Participant@Paulie_D It’s the link on his first post. If you changed some stuff and it isn’t updating, go to his profile and click on the pen we’re working on (last page).
February 23, 2013 at 1:15 pm #125757Anonymous
Inactive@chrisburton I made those changes and it works now. Thank you.
@CrocoDillon thank you for your help also. -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.