- This topic is empty.
December 21, 2012 at 5:45 pm #41518
I am trying to create a site that is just a list of items from the top down. Ie – words in large font. All of which are centered on a page.
I would like to be able to have a user click on a word which would then expand a box that shows more information as well as changing the background color and text color across the full length of the page 100%.
Contained in that box would be a narrow container with paragraph info.
First of all i am having trouble setting up my html with the associated divs that might allow for this.
Secondly, I am thinking this will have to happen by jquery.
Any help would be much appreciated.December 21, 2012 at 5:46 pm #118535Andy HowellsParticipant
Please create a [codepen](http://codepen.io) of what you have already so we can add code and edit to help you achieve what you want.
JQuery will probably be the best solution for this.December 21, 2012 at 6:01 pm #118536
Ok, one more issue. I wanted to add an underline on link-hover on the nav and it’s bumping down the container upon hover… I made the link
border-bottom: 2px solid;
}December 21, 2012 at 8:46 pm #118556wolfcry911Participant
Here’s a fork of your pen
To solve the underline bumping the container down I simply put a transparent border on the normal state. You could also change the height/line-height for the same effect, but this works well enough.
Thank you @wolfcry911December 22, 2012 at 1:54 am #118578
How would I link up the js to my code?December 22, 2012 at 7:14 pm #118669
@wofcry911 struggling with trying to ge the js to automatically cose one expanded div when clicking on another. Also for some reason when closing a div the background color disappears and then the blox slides up. Any idea?
- The forum ‘CSS’ is closed to new topics and replies.