Solved

JQuery CSS 100% inside Modal Window

Posted on 2014-10-23
5
221 Views
Last Modified: 2014-11-12
Hi All,

This is probably a really simple solution i'm overlooking here.

I have a modal popup which has the following css;

.Popup {
    background-color: #FFF;
    border: 1px solid #000;
    width: 75%;
    height: 80%;
    padding: 25px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

Open in new window


Inside is a container div with the css simply set to 100%.

inside the container div I have some jquery tab controls which I want the content to be 100% height of the div otherwise display vertical scrollbars. However its setting height:100% is just overflowing outside the modal popup?

my .ui-tabs css is as follows;

.ui-tabs {
    position: relative;
    padding: 0.2em;
    height: 100%;
}

.ui-tabs .ui-tabs-panel {
    display: block;
    border-width: 0px 1px 1px;
    padding: 1em 1.4em;
    background: none repeat scroll 0% 0% transparent;
    border-left: 1px solid #2191C0;
    border-right: 1px solid #2191C0;
    border-bottom: 1px solid #2191C0;
}

Open in new window


and gives the attached screenshot. However as you can see the Tab is just wrapping to the content and if the content height is larger than the modal popup the overflow is not hidden or scrollbars displayed? (the divs inside the tab content have the following css;

.PopupImageLibraryContainer {
    overflow-y: scroll;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.6);
}

Open in new window


my tabs are initiated in the jquery document.ready using $("#tabs").tabs();

what am i missing?
screenshot.png
0
Comment
Question by:flynny
  • 3
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 40398997
Can you post more of your page code - difficult to see from what you have posted what the problem is - could be a number of things.

If you have a link to the page that would be great - otherwise if you can post the html here.
0
 

Author Comment

by:flynny
ID: 40399022
yes no problem

link to page is as follows;

fun4all.partyepos.com/public

move the draggable div, select logo settings -> change logo button, and the popup will be shown
0
 
LVL 52

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 40399085
The reason is that the tabs container is pushing the content down.

You need to give your <ul> tabs container a height and your <div> tabs a height that sum to 100%;
So for example I gave your <ul> a height of 20% and the <div> tabs themselves the following
element.style {
  display: block;
  height: 80%;
  overflow-y: scroll;
}

Open in new window

You might need to play around with it but the reason is that your container for the tabs is height: 100% and the tabs themselves take up some space so the <div> tabs are extending too far.
0
 

Author Closing Comment

by:flynny
ID: 40437358
really sorry for the delay on getting back to you on this
0
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 40437442
No problem - thanks for the points
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML and CSS for a complex page 20 57
How can I   ajax html table  rows? 20 62
Angular - disable input field on page load 4 10
Not seen Link button 5 13
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now