When adding a dropdown to a table row, it is getting cut off as so:
Other questions have pointed me in the direction of a stacking problem, but I just can't work out how to fix it. I have tried adding z-index:1000 and position:relative style attributes to each of the parent DIV's but that hasn't fixed the issue. Not sure what to try next...
<div class="row-fluid">
<div class="span12">
<div class="grid simple ">
<div class="grid-body table_highlight>
<table class="table table-striped" id="example2">
<thead>
<tr>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="btn-group">
<a class="btn btn-info dropdown-toggle btn-demo-space" data-toggle="dropdown" href="#"> Info <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li>Action</li>
<li>Another action</li>
<li>Something else here</li>
<li>Separated link</li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Edit
I have changed the code to the following to make it clearer how it all fits together:
<div class="row-fluid" style=" border: 5px red solid;">
<div class="span12" style=" border: 5px green solid;">
<div class="grid simple " style=" border: 5px blue solid;">
<div class="grid-title">
...
</div>
<div class="grid-body table_highlight" style=" border: 5px yellow solid;">
This is how it now appears:
It looks like the problem is that the grid-body class has an overflow style set to hidden. When the dropdown is activated, its size is larger than the grid-body's size, so the dropdown gets clipped. You can see it fixed if you add overflow: visible to the style attribute on your div with the grid-body class: fiddle
As a permanent fix, you might want to explore modifying the HTML and/or CSS instead of just adding the style directly to the element, though.
Related
How can I achieve fixed tabs using angular and bootstrap :
Here is my code:
<div #header>
<div *ngIf="loaded; else loading">
<ul ngbNav #nav="ngbNav" [(activeId)]="selectedTab" [destroyOnHide]="false" class="nav-pnb-tabs nav-tabs">
<li [ngbNavItem]="'dashboard'">
<a ngbNavLink>Dashboard</a>
<ng-template ngbNavContent>
<div class="container-fluid" style="margin-top: 50px;">
<dashboard></dashboard>
</div>
</ng-template>
</li>
<li [ngbNavItem]="'policyList'">
<a ngbNavLink>Policy List</a>
<ng-template ngbNavContent>
<div class="container-fluid" style="margin-top: 50px;">
<policy-list></p-policy-list>
</div>
</ng-template>
</li>
<li class="nav-item" [ngbNavItem]="'policysearch'">
<a ngbNavLink>Search</a>
<ng-template ngbNavContent>
<div class="container-fluid" style="margin-top: 50px;">
<policy-search></policy-search>
</div>
</ng-template>
</li>
</ul>
<div [ngbNavOutlet]="nav"></div>
</div>
</div>
I have to keep my tabs fixed while scrolling the content:
When I use: style="position:fixed; width:100%" it is not scrolling the content also.
If I used overflow:scroll on the content div, it is asking for height which if I set it, then my content inside scroll is getting cut after the certain height is reached.
Can you please help me how to achieve Fixed tabs using angular powered with bootstrap?
Thanks.
Disclaimer: I am not really familiar with CSS. I am using overflow: hidden to truncate text on dynamic Bootstrap tabs. When a second tab is created, all the tabs move up slightly because of the padding underneath. I'm trying to get rid of the extra padding because the bottom border appears when all the elements get moved up. I did some Googling, but using vertical align bottom or top does not eliminate the gap. I don't know if this has anything to do with it, but there is also a margin-bottom: -1px in order to hide the bottom border to get the effect of a connected tab.
I want it to look like how it looks without overflow:hidden checked.
unwanted space with overflow hidden
with overflow hidden
with overflow hidden
without overflow hidden
<div class=container-fluid" id="dashboard">
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#overall-statistics" role="tab" aria-controls="Overall Statistics"><span>Overall Statistics</span></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="overall-statistics" role="tabpanel">
<table>
<tr>
<td style="padding: 10px;">
View by
</td>
<td style="padding: 10px;">
<select class="selectpicker" id="view-by" multiple title="Levels">
<option id="view-levels">Levels</option>
<option id="view-store-type">Store Type</option>
</select>
</td>
</tr>
</table>
</div>
</div>
<div class="tab-pane" id="messages" role="tabpanel">...</div>
<div class="tab-pane" id="settings" role="tabpanel">...</div>
</div>
.nav-tabs .nav-item {
margin-left: -1px;
width: 150px;
}
.nav-tabs .nav-link {
width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: bottom;
}
To eliminate the extra border, you may want to add this:
.nav-tabs .nav-link { border-bottom: none; }
My simple footer code uses table of width 100% containing a centered td with another table within it containing the links, this centres the links in the availble space. Its work fine as long as there is enough horizontal space for all the links, but if there isn't (i.e on mobile phone, portait) it does not wrap. How can I keep centred but allow wrapping as necessary ?
<footer>
<table style="width:100%">
<tr>
<td align="center">
<nav>
<table>
<tr>
<td>
<a href="/reports">
Reports
</a>
</td>
<td>
<a href="/preferences.go">
Preferences
</a>
</td>
<td>
<a href="/about.go">
About
</a>
</td>
<td>
<a href="/license.go">
License
</a>
</td>
<td>
<a href="/admin.go">
Admin
</a>
</td>
<td>
<a href="/webhelp/index_frames.html">
Help
</a>
</td>
</tr>
</table>
</nav>
</td>
</tr>
</table>
</footer>
Skip the table or just put the links all in a single td. They are inline and will wrap if necessary. Set text-align:center on the containing element to center the links.
footer nav {
text-align: center;
}
<footer>
<nav>
Reports
Preferences
About
License
Admin
Help
</nav>
</footer>
Here is a solution using Flex if the table markup is not required
.wrapper {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.flex-item {
margin: 0 10px;
}
<footer>
<div class="wrapper">
<a class="flex-item" href="/reports">
Reports
</a>
<a class="flex-item" href="/preferences.go">
Preferences
</a>
<a class="flex-item" href="/about.go">
About
</a>
<a class="flex-item" href="/license.go">
License
</a>
<a class="flex-item" href="/admin.go">
Admin
</a>
<a class="flex-item" href="/webhelp/index_frames.html">
Help
</a>
</div>
</footer>
My dropkick look strange - http://i.imgur.com/0itAA.png
Container is bigger, than dropdown list.
My html:
<div class="text_over_field">
<b>Your language preferences</b>
<b>This is language you would like Print-it-Green service to be displayed in</b>
</div>
<div class="field">
<div class="dk_container dk_theme_default" id="dk_container_color" tabindex="7" style="display: block; ">
<a class="dk_toggle" style="width: 149px; ">
<span class="dk_label">English</span></a>
<div class="dk_options" style="top: 29px; ">
<ul class="dk_options_inner">
<li class="dk_option_current"><a data-dk-dropdown-value="">English</a></li>
<li class=""><a data-dk-dropdown-value="#E15A01">Israeli</a></li>
<li class=""><a data-dk-dropdown-value="#604A42">Ukrainian</a></li>
</ul>
</div>
</div>
</div>
<div class="submit" >
</div>
Check the CSS markup
Check the HTML markup
All is wrapped in form_for_new class.
Also, it crashed my form.
What you can say about it ?
<div>My Cart (0 items)</div> and #cart do not overlap, but they have no pixels between them. The problem I'm running into is when I mouse over the My Cart #cart shows, which is correct given the :hover class, but the problem is when I move my mouse off of My Cart and onto #cart the :hover doesn't stick. Any ideas why? There is no space between these two elements, so I thought it would be seamless.
#hd .top-nav ul .tab:hover .content {
display: block;
}
<li class="tab my-cart"><div>My Cart (0 items)</div>
<div id="cart" style="display: block;">
<table>
<tbody><tr>
<td class="no-result faded" colspan="4">Your cart is empty</td>
</tr>
<tr class="empty-row hide">
<td class="remove"><img src="/images/s.gif"></td>
<td class="product">
<strong></strong>
</td>
<td class="quantity"></td>
<td class="quantity-options">
<div class="adjust">
<div class="increment"></div>
<div class="decrement"></div>
</div>
</td>
</tr>
</tbody></table>
<div class="yui-g">
<div class="yui-u first">
<div class="working faded hide">
Working...
</div>
</div>
<div class="yui-u">
<div class="review hide">
<div class="button">Review purchases</div>
</div>
</div>
</div>
</div></li>
Is your issue with IE6? IE6 has notoriously spotty support for pseudo classes (:anything). IE6 does support :hover, but only on anchor tags.
Check out this writeup.
Sorry, the problem was something stupid... the CSS wasn't doing the hover, it was javascript