The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Couple of things (padding questions)
cssaddict
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post 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 .

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 03:21 PM