SharePoint Online cannot expand web part zone width - sharepoint-2013

I have a blog subsite on a SharePoint Online (2013) site that by default has 3 web part zones: BlogNavigator, Left and Right (ordered from left to right).
The layout of the zones is frustrating, because the Left zone, which houses the actual content for the site, is relatively narrow considering the amount of available space to the right of the Right zone.
When I move all the Web Parts from the Right zone into BlogNavigator, the Left zone maintains its size, even though there is room to expand rightward.
I have tried manually declaring the Left zone ContainerWidth on the page file in SP Designer, I have tried applying a CSS file to the page to set the width, but nothing seems to work.
I have even removed all references to the Right zone on the page file, removing it completely, but the Left zone still remains its original width.
Is there some way I can alter this zone?

The out-of-the-box SharePoint page layouts use a peculiar grid framework to layout the different webpart zones.
This framework, which is defined in the layout css, uses display: table and display: table-cell to position the zones in the horizontal layout.
Table layouts usually result in odd sizing issues similar to how you have described.
In a project that I have worked on recently, I needed to fix the table layout to be more rigid so that there were no sizing issues. The site I was working on was a Publishing site so I am not sure if the classes are the same on you blog but here is the CSS I used to tweak the grid framework.
#DeltaPlaceHolderMain .ms-table {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-left: -15px;
margin-right: -15px;
width: auto; }
#DeltaPlaceHolderMain .ms-table > div[class*="tableCol"] {
-webkit-box-flex: 1;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
padding-left: 15px;
padding-right: 15px;
box-sizing: border-box; }
#DeltaPlaceHolderMain .tableCol-75,
#DeltaPlaceHolderMain .tableCol-33,
#DeltaPlaceHolderMain .tableCol-25,
#DeltaPlaceHolderMain .tableCol-50 {
width: 100%;
display: block;
min-width: 0; }
#contentBox {
padding-left: 15px;
padding-right: 15px; }
#titleAreaRow {
display: table; }
#contentRow {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap; }
#sideNavBox {
margin-right: 5px; }
#contentBox {
min-width: 0;
margin: 0;
-webkit-box-flex: 1;
-ms-flex: 1 0;
flex: 1 0; }
#s4-titlerow,
#contentRow {
max-width: 1450px;
margin: 0 auto; }
#media screen and (min-width: 1020px) {
#DeltaPlaceHolderMain .tableCol-75 {
width: 66.666%; }
#DeltaPlaceHolderMain .tableCol-33 {
width: 33.333%;
}
#DeltaPlaceHolderMain .tableCol-25 {
width: 33.333%; }
#DeltaPlaceHolderMain .tableCol-50 {
width: 50%; } }
#media screen and (min-width: 1340px) {
#DeltaPlaceHolderMain .tableCol-75 {
width: 75%; }
#DeltaPlaceHolderMain .tableCol-25 {
width: 25%; } }
* {
outline: none; }
html {
-webkit-text-size-adjust: 100%; }
/* Sidenav */
#sideNavBox {
min-width: 180px;
max-width: 300px;
width: auto; }

Related

Height 100% Changing with border/padding

I have two divs, which I aligned side by side, inside a container. I want to make both of them height 100%. I do that and it works fine, but after i change the left div's border or padding it seems to alter the height so it's larger than the right div. Is there any idea how to fix this problem?
.container {
height: 200px;
width: 100px;
}
.one {
height: 100%;
width: 100px;
background-color: green;
float: left;
}
.two {
height: 100%;
width: 100px;
background-color: red;
float: right;
}
Thanks in advance.
Flex is a good solution for what you want to achieve
.container {
display: flex;
height: 200px;
width: 100px;
}
.one {
flex: 1;
min-height: 100vh;
width: 100px;
background-color: green;
float: left;
}
.two {
flex: 1;
min-height: 100vh;
width: 100px;
background-color: red;
float: right;
}

Angular 2 material tab active color customize

I was looking to customize the active color for md-tab.
The classes in chrome dev console shows ==> -mat-tab-label mat-ripple mat-tab-label-active. But none has any border bottom. There was a chevron class which i tried to change, but no effect.
I tried /deep/ with almost all classes. Dint work.
Also checked md-tab-header, but nowhere am seeing even that color! Any help would be appreciated :)
Try to it's work for me
::ng-deep .mat-ink-bar {
background-color:#ee2925 !important;}
It's worked for me in Angular 6
.mat-tab-group.mat-primary .mat-ink-bar, .mat-tab-nav-bar.mat-primary .mat-ink-bar {
background-color: #1f29a2;
}
Works in Angular 7
.mat-tab-group.mat-primary .mat-ink-bar,.mat-tab-nav-bar.mat-primary .mat-ink-bar {
background-color: #2C702A;
}
To customize the active underline, modify this class
mat-ink-bar{ background-color:#fff; }
In your component, set ViewEncapsulation to None and add the styles in your component.css file.
Changes in Typescript code:
import {Component, ViewEncapsulation} from '#angular/core';
#Component({
....
encapsulation: ViewEncapsulation.None
})
Component CSS:
/* Styles for tab labels */
.mat-tab-label {
min-width: 25px !important;
padding: 5px;
background-color: transparent;
color: red;
font-weight: 700;
}
/* Styles for the active tab label */
.mat-tab-label.mat-tab-label-active {
min-width: 25px !important;
padding: 5px;
background-color: transparent;
color: red;
font-weight: 700;
}
/* Styles for the ink bar */
.mat-ink-bar {
background-color: green;
}
.mat-tab-group.mat-primary .mat-ink-bar, .mat-tab-nav-bar.mat-primary .mat-ink-bar{
background: black;
}
This works with Angular 10.
This solution is tested and works fine in Angular 10 -
.tabs .mat-tab-label.mat-tab-label-active {
background-color: #5e70db;
opacity: 1 !important;
}
.tabs .mat-ink-bar {
background-color: #3f51b5 !important;
}
any of those solutions didn't work for me but i did a general solution without use the encapsulation.none
/* Styles for tab labels */
::ng-deep .mat-tab-label {
min-width: 25px !important;
padding: 5px;
background-color: transparent;
color: red;
font-weight: 700;
}
/* Styles for the active tab label */
::ng-deep .mat-tab-label.mat-tab-label-active {
min-width: 25px !important;
padding: 5px;
background-color: transparent;
color: red;
font-weight: 700;
}
/* Styles for the ink bar */
::ng-deep .mat-ink-bar {
background-color: green;
}
using ::ng-deep you are telling to css inside material being overrite, then you can customice it

Nav bar isn't working properly?

So I'm making a website for a school assessment, and I was wondering why my Nav bar links are always slightly below the actual nav bar itself. If anyone could help that'd be great :).
ul {
text-align: center;
padding-left: 1px;
top: -10px;
list-style: none;
}
ul li {
font-family: Arial;
font-size: 15px;
font-weight: bold;
display: inline-block;
margin-right: -4px;
position: 0px;
padding: 10px 89.5px;
background-color: #6C2DC7;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
transition: all 0.2s;
}
ul li:hover {
background: #8467D7;
}
a:link {color:#FFFFFF;} /* unvisited link */
a:visited {color:#FFFFFF;} /* visited link */
a:hover {color:#FFFFFF;} /* mouse over link */
a:active {color:#FFFFFF;} /* selected link */
a {
text-decoration: none;
}
This is what it looks like on my website.
If you change this it will work:
line 75 of your style.css
ul {
text-align: center;
top: 0px;
list-style: none;
margin-top: -5px;
}
really you should make this just for your nav bar and not for every ul so you could change it to the below: up to you though both ways work :)
#navigation ul {
text-align: center;
top: 0px;
list-style: none;
margin-top: -5px;
}

How to center-align svg-based Google Charts (since they have position: absolute)

Does anybody please have an idea how to center-align the new (i.e. svg-based) Google Charts?
When I inspect the chart elements at my web page (please scroll down to the jQuery Tabs with several Google Charts at that page), I see that the chart itself is given an absolute position:
<div style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; ">
<svg width="800" height="500" style="overflow: hidden; ">
I'm not sure why Google does it, but it breaks my layout (other than that the charts work well for me):
My CSS-code:
h1,h2,h3,p,div,form {
text-align: center;
}
And I've also tried adding there:
margin-left: auto;
margin-right: auto;
My JavaScript-code:
var money_data;
var money_chart;
var money_options = {
width: 800,
height: 500,
legend: {position: 'top'},
areaOpacity: 1.0,
vAxis: {format: '# $'},
hAxis: {title: 'Номер недели', titleTextStyle: {color: 'blue'}, slantedText: true, viewWindow: {min: 39, max: 52}},
colors: ['CCFFCC', '66CC66', 'FF9999'],
animation: {duration: 1000, easing: 'out'}
};
function initMoney() {
$.ajax({
url: '/money-json.php',
data: { id: 'OK408547485023' },
dataType: 'json'
}).done(function(jsonData) {
money_data = new google.visualization.DataTable(jsonData);
money_chart = new google.visualization.SteppedAreaChart(document.getElementById('money_chart'));
google.visualization.events.addListener(money_chart, 'ready', function() {
$('#money_slider').slider('enable');
});
drawMoney();
});
}
function drawMoney() {
money_chart.draw(money_data, money_options);
}
If no CSS-based solution possible here, could I maybe use JavaScript to move the SVG to the same x-position as the money_slider while enabling the latter (please see the above code)?
You could set the size of money_chart DIV to the size of the graph ( I am guessing 800px ) and use auto margins like this.
#money_chart{
margin-left: auto;
margin-right: auto;
width: 800px;
}
You will need to make the chart side another div here is my code and it works for me
.chart_outside{
position:relative;
display: inline;
border: 2px solid #FFF;
width: 500px;
height: 460px;
background: #000;
margin: 5px 5px 5px 5px;
}
.chart_inside{
position:absolute;
right:0px
;top:0px;
}

css - dynamic width horizontal lists

I'm trying to build a horizontal list based menu. In this menu, the two left floated menu links are fixed width, while the remaining menu links are floated right.
The issue is I'd like the two fixed width links to stay as is, however the floated right items to be spaced evenly throughout the rest of the available whitespace.
See my fiddle
CSS:
#footer_menu {
margin: 0;
height: 54px;
padding: 0px;
}
#footer_menu ul {
margin: 0;
height: 54px;
padding: 0px;
display: table;
table-layout: fixed;
width:100%;
}
#footer_menu li {
list-style: none;
padding: 0px;
}
#footer_menu .nav_l {
float: left;
display: table-cell;
white-space:nowrap;
}
#footer_menu .nav_r {
float: right;
width:auto;
display: table-cell;
white-space:nowrap;
}
HTML:
<div id="footer_menu">
<ul>
<li class="nav_l">Link</li>
<li class="nav_l">Link</li>
<li class="nav_r">Link</li>
<li class="nav_r">Link</li>
<li class="nav_r">Link</li>
<li class="nav_r">Link</li>
</ul>
</div>
Anyone have any ideas?
Try this - DEMO
#footer_menu {
margin: 0;
height: 54px;
padding: 0px;
display: table;
width: 100%;
}
#footer_menu ul {
margin: 0;
height: 54px;
padding: 0px;
display: table-row;
background: #ccc;
}
#footer_menu li {
list-style: none;
padding: 0px;
}
#footer_menu .nav_l {
display: table-cell;
white-space:nowrap;
width:50px;
padding:5px;
border: 1px solid #000;
}
#footer_menu .nav_r {
width:auto;
display: table-cell;
white-space:nowrap;
padding:5px;
border: 1px solid #c00;
}​