- Joined
- Oct 28, 2010
- Messages
- 888
- Reaction score
- 115
Edit:
Problem is now fixed, credits to EliteGM for the solution and the debugging
Thank you to those who attempted to fix my as well I do appreciate it! 
Hi there, I'm building a website for a driving school and basically I've got these tabs where when you click them, a new panel slides down underneith it using jQuery.
The problem is, when I click the "Booking" tab the page slides down, of which i want it to do, but on the other two tabs, the page doesn't slide down and just overlaps the content of the page.
Pictures to describe:
Screenshot by Lightshot - As you can see, the two tabs overlap
Screenshot by Lightshot - In this one, the booking moves the page down.
What do i want?
I want the two tabs (Feed & Contact) to act the same way as the booking and move the page down when they are expanded.
JSFiddle
http://jsfiddle.net/tgvbE/
Code
HTML
CSS
jQuery
The Specific problem online
http://jsfiddle.net/tgvbE/
Any help would be much appreciated.
Many thanks,
Matt Clarke
Problem is now fixed, credits to EliteGM for the solution and the debugging
Hi there, I'm building a website for a driving school and basically I've got these tabs where when you click them, a new panel slides down underneith it using jQuery.
The problem is, when I click the "Booking" tab the page slides down, of which i want it to do, but on the other two tabs, the page doesn't slide down and just overlaps the content of the page.
Pictures to describe:
Screenshot by Lightshot - As you can see, the two tabs overlap
Screenshot by Lightshot - In this one, the booking moves the page down.
What do i want?
I want the two tabs (Feed & Contact) to act the same way as the booking and move the page down when they are expanded.
JSFiddle
http://jsfiddle.net/tgvbE/
Code
HTML
Code:
<div class="mainFastOption">
<div class="mainFastOptionBook">
<div class="mainFastOptionBookTitle" onclick="bookingToggle()">Book Lessons Now</div>
<div class="mainFastOptionBookPanel">
<input type="text" placeholder="First Name" /><br />
<input type="text" placeholder="Last Name" /><br />
<input type="number" placeholder="Phone Number" /><br />
<input type="email" placeholder="E-Mail Address" /><br />
<button>Send Inquiry</button>
</div>
</div>
<div class="mainFastOptionFeed">
<div class="mainFastOptionFeedTitle" onclick="feedToggle()">View Our Feed</div>
<div class="mainFastOptionFeedPanel">
<p>Loading Social Feeds...</p>
</div>
</div>
<div class="mainFastOptionContact">
<div class="mainFastOptionContactTitle" onclick="contactToggle()">Got a Question?</div>
<div class="mainFastOptionContactPanel">
<p>Loading Contact Page...</p>
</div>
</div>
<div class="clear"></div>
</div>
CSS
Code:
.mainFastOption {
height: auto;
margin-bottom: 15px;
text-shadow: 0px 1px 2px #000;
clear: both;
float: none;
}
.mainFastOptionBook {
width: 310px;
float: left;
margin-right: 10px;
}
.mainFastOptionBookTitle {
height: 70px;
line-height: 70px;
text-align: center; /* Old browsers */
color: #FFF;
box-shadow: 0px 0px 3px 0px #000;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) );
background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
background-color:#fe1a00;
border-radius: 5px;
}
.mainFastOptionBookTitle:hover {
cursor: pointer;
}
.mainFastOptionBookPanel {
text-align: center;
display: none;
background-color: #FFF;
margin-top: 5px;
padding-top: 5px;
padding-bottom: 5px;
box-shadow: 0px 0px 3px 0px #000;
border-radius: 5px;
}
.mainFastOptionBookPanel email, input {
width: 90%;
border: solid 1px #ccc;
padding: 3px;
margin: 5px 0px;
}
.mainFastOptionFeed {
float: left;
width: 310px;
margin-right: 8px;
margin-left: 5px;
height: 70px;
}
.mainFastOptionFeedTitle {
line-height: 70px;
text-align: center;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #3d94f6), color-stop(1, #1e62d0) );
background:-moz-linear-gradient( center top, #3d94f6 5%, #1e62d0 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3d94f6', endColorstr='#1e62d0');
background-color:#3d94f6;
color: #FFF;
box-shadow: 0px 0px 3px 0px #000;
text-decoration: none;
border-radius: 5px;
}
.mainFastOptionFeedTitle:hover {
cursor: pointer;
}
.mainFastOptionFeedPanel {
text-align: center;
display: none;
background-color: #FFF;
margin-top: 5px;
padding-top: 5px;
padding-bottom: 5px;
box-shadow: 0px 0px 3px 0px #000;
border-radius: 5px;
}
.mainFastOptionContact {
float: right;
width: 310px;
margin-left: 3px;
height: 70px;
}
.mainFastOptionContactTitle {
line-height: 70px;
text-align: center;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #89c403), color-stop(1, #77a809) );
background:-moz-linear-gradient( center top, #89c403 5%, #77a809 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#89c403', endColorstr='#77a809');
background-color:#89c403;
color: #FFF;
box-shadow: 0px 0px 3px 0px #000;
text-decoration: none;
border-radius: 5px;
}
.mainFastOptionContactTitle:hover {
cursor:pointer;
}
.mainFastOptionContactPanel {
text-align: center;
display: none;
background-color: #FFF;
margin-top: 5px;
padding-top: 5px;
padding-bottom: 5px;
box-shadow: 0px 0px 3px 0px #000;
border-radius: 5px;
}
jQuery
Code:
function bookingToggle() {
$(".mainFastOptionBookPanel").slideToggle("slow");
}
function feedToggle() {
$(".mainFastOptionFeedPanel").slideToggle("slow");
};
function contactToggle() {
$(".mainFastOptionContactPanel").slideToggle("slow");
};
The Specific problem online
http://jsfiddle.net/tgvbE/
Any help would be much appreciated.
Many thanks,
Matt Clarke
Last edited:
Just saying
