Couple of things (padding questions) |
Couple of things (padding questions) |
cssaddict |
Nov 6 2012, 02:27 PM
Post
#1
|
Member Group: Members Posts: 53 Joined: 20-October 10 Member No.: 12,969 |
Hey all,
I have two questions. One is a CSS question and the other is a javascript question. If I need to post the JS question on the other board, just let be know. Ok, so I'm displaying a div (different blogging info)) with the onclick event. Problem is, the div is shop up too close to the sub nav bar. So I've tried adding padding-top, but it doesn't seem to work. Secondly (and this is my js question), I want to display the div id "respond-1" when the page loads and then if they click on blogs displaying respond-2, I want the respond-1 to disappear. Not sure if that makes since. Let me know if you have any questions. http://0.mk/8d60c |
Frederiek |
Nov 7 2012, 02:47 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
About the CSS.
Since you float the #blogs div, you need to clear the float afterwards, e.g. by setting clear: both; to the #respond-1 div. Or use the micro clearfix hack: http://nicolasgallagher.com/micro-clearfix-hack/ As for the javascript. You could use AJAX to dynamically load an external page into a div. Dynamicdrive seems to have scripts for that. Just search for "javascript dynamically load page inside div". Or go see http://www.alistapart.com/articles/eatcake . |
Lo-Fi Version | Time is now: 26th April 2024 - 03:21 PM |