I started with reading Flexbox and vertical scroll in a full-height app using NEWER flexbox api. And the following works pretty well:
html,body{
overflow: hidden;
width: 100%; height: 100%;
max-height: 100%; max-width: 100%;
margin: 0; padding: 0;
}
.site-container {
height: 100%; width: 100%;
display: flex;
flex-direction: column;
}
.site-container .site-header,
.site-container .site-footer{
flex: 0 0 auto;
overflow: visible;
}
.site-container .site-body {
position: relative;
overflow: auto;
min-height: 0px;
flex: 0 1 auto;
}
<div class="site-container">
<div class="site-header">
<div style="height: 40px;background-color:YellowGreen">My Header Test </div>
</div>
<div class="site-body">
blah1<br />
blah2<br />
blah3<br />
blah4<br />
blah5<br />
blah6<br />
blah7<br />
blah8<br />
blah9<br />
blah10<br />
blah11<br />
blah12<br />
blah13<br />
blah14<br />
blah15<br />
blah16<br />
blah17<br />
blah18<br />
blah19<br />
blah20<br />
blah21<br />
blah22<br />
blah23<br />
blah24<br />
blah25<br />
blah26<br />
blah27<br />
blah28<br />
blah29<br />
blah30<br />
blah31<br />
blah32<br />
blah33<br />
blah34<br />
blah35<br />
blah36<br />
blah37<br />
blah38<br />
blah39<br />
blah40<br />
blah41<br />
blah42<br />
blah43<br />
blah44<br />
blah45<br />
blah46<br />
blah47<br />
blah48<br />
blah49<br />
blah50<br />
blah51<br />
blah52<br />
blah53<br />
blah54<br />
blah55<br />
blah56<br />
blah57<br />
blah58<br />
blah59<br />
blah60<br />
blah61<br />
blah62<br />
blah63<br />
blah64<br />
blah65<br />
blah66<br />
blah67<br />
blah68<br />
blah69<br />
</div>
<div class="site-footer">
<div style="height: 40px;background-color:YellowGreen">My Footer Test </div>
</div>
</div>
In the above snippet, the body scrolls quite well.
Now I'm attempting to Flex the Body into Row and create non-scrolling side-bars but keep a the center content scrolling. I have the following, but the content isn't scrolling. What am I missing?
html,body{
overflow: hidden;
width: 100%; height: 100%;
max-height: 100%; max-width: 100%;
margin: 0; padding: 0;
}
.site-container {
height: 100%; width: 100%;
display: flex;
flex-direction: column;
}
.site-container .site-header,
.site-container .site-footer{
flex: 0 0 auto;
overflow: visible;
}
.site-container .site-body {
position: relative;
min-height: 0px;
flex: 0 1 auto;
}
.body-container{
display: flex;
height: 100%;
width: 100%;
flex-direction: row;
}
.body-container .body-left,
.body-container .body-right{
flex: 0 0 auto;
overflow: visible;
}
.body-container .site-content{
position: relative;
overflow: auto;
min-width: 0px;
flex: 1 0 auto;
}
<div class="site-container">
<div class="site-header">
<div style="height: 40px;background-color:YellowGreen">My Header Test </div>
</div>
<div class="site-body">
<div class="body-container">
<div class="site-sidebar-left">
<div style="background-color:lightgray;">
left1<br />
left2<br />
left3<br />
left4<br />
left5<br />
left6<br />
left7<br />
left8<br />
left9<br />
left10<br />
</div>
</div>
<div class="site-content">
blah1<br />
blah2<br />
blah3<br />
blah4<br />
blah5<br />
blah6<br />
blah7<br />
blah8<br />
blah9<br />
blah10<br />
blah11<br />
blah12<br />
blah13<br />
blah14<br />
blah15<br />
blah16<br />
blah17<br />
blah18<br />
blah19<br />
blah20<br />
blah21<br />
blah22<br />
blah23<br />
blah24<br />
blah25<br />
blah26<br />
blah27<br />
blah28<br />
blah29<br />
blah30<br />
blah31<br />
blah32<br />
blah33<br />
blah34<br />
blah35<br />
blah36<br />
blah37<br />
blah38<br />
blah39<br />
blah40<br />
blah41<br />
blah42<br />
blah43<br />
blah44<br />
blah45<br />
blah46<br />
blah47<br />
blah48<br />
blah49<br />
blah50<br />
blah51<br />
blah52<br />
blah53<br />
blah54<br />
blah55<br />
blah56<br />
blah57<br />
blah58<br />
blah59<br />
blah60<br />
blah61<br />
blah62<br />
blah63<br />
blah64<br />
blah65<br />
blah66<br />
blah67<br />
blah68<br />
blah69<br />
</div>
<div class="site-sidebar-right">
<div style="background-color:lightgray;">
right1<br />
right2<br />
right3<br />
right4<br />
right5<br />
right6<br />
right7<br />
right8<br />
right9<br />
right10<br />
</div>
</div>
</div>
</div>
<div class="site-footer">
<div style="height: 40px;background-color:YellowGreen">My Footer Test </div>
</div>
</div>
Eventually it would look like:
Unlike the site-header, which is a flex item of the site-container, the site-footer was nested inside the site-body. Either that was intentional or you were missing a closing div. For the purposes of this answer, I assumed the latter.
Now the site-header, site-body and site-footer are siblings.
Then I added overflow: auto and flex: 1 to .site-content. The first to enable scrollbars and the second to consume free space on the row.
.site-container {
display: flex;
flex-direction: column;
height: 100vh;
}
.site-body {
min-height: 0px;
height: 100%;
}
.body-container {
display: flex;
height: 100%;
}
.site-content {
flex: 1;
overflow: auto;
}
body {
margin: 0;
}
<div class="site-container">
<div class="site-header">
<div style="height: 40px;background-color:YellowGreen">My Header Test </div>
</div>
<div class="site-body">
<div class="body-container">
<div class="site-sidebar-left">
<div style="background-color:lightgray;">
left1
<br /> left2
<br /> left3
<br /> left4
<br /> left5
<br /> left6
<br /> left7
<br /> left8
<br /> left9
<br /> left10
<br />
</div>
</div>
<div class="site-content">
blah1
<br /> blah2
<br /> blah3
<br /> blah4
<br /> blah5
<br /> blah6
<br /> blah7
<br /> blah8
<br /> blah9
<br /> blah10
<br /> blah11
<br /> blah12
<br /> blah13
<br /> blah14
<br /> blah15
<br /> blah16
<br /> blah17
<br /> blah18
<br /> blah19
<br /> blah20
<br /> blah21
<br /> blah22
<br /> blah23
<br /> blah24
<br /> blah25
<br /> blah26
<br /> blah27
<br /> blah28
<br /> blah29
<br /> blah30
<br /> blah31
<br /> blah32
<br /> blah33
<br /> blah34
<br /> blah35
<br /> blah36
<br /> blah37
<br /> blah38
<br /> blah39
<br /> blah40
<br /> blah41
<br /> blah42
<br /> blah43
<br /> blah44
<br /> blah45
<br /> blah46
<br /> blah47
<br /> blah48
<br /> blah49
<br /> blah50
<br /> blah51
<br /> blah52
<br /> blah53
<br /> blah54
<br /> blah55
<br /> blah56
<br /> blah57
<br /> blah58
<br /> blah59
<br /> blah60
<br /> blah61
<br /> blah62
<br /> blah63
<br /> blah64
<br /> blah65
<br /> blah66
<br /> blah67
<br /> blah68
<br /> blah69
<br />
</div>
<div class="site-sidebar-right">
<div style="background-color:lightgray;">
right1
<br /> right2
<br /> right3
<br /> right4
<br /> right5
<br /> right6
<br /> right7
<br /> right8
<br /> right9
<br /> right10
<br />
</div>
</div>
</div>
</div>
<div class="site-footer">
<div style="height: 40px;background-color:YellowGreen">My Footer Test </div>
</div>
</div>
https://jsfiddle.net/9mqxytv4/2/
I'm working on a project and whenever I try to load this page it gives me the same error everytime. Project is being worked on in Visual Studio 2015. What the goal is that users can fill in their name, email and a message they want to send to the owner of the site. Whenever the user is done with the message they click on the button, the button with the text verzenden, and a message is shown below if it is sent correctly or not. The problem is not the code however, I can manage that on myself.
Html code , this is all wrapped in a contentplaceholder because I have made a masterpage for the project :
<form id="Form1" runat="server">
<table>
<tr>
<td>
<br />
<br />
<h1> Stuur ons een berichtje</h1>
<br />
<br />
<p>Alle berichtjes worden ook verstuurd naar info#waasseschrijnwerken.be. Als het correct is verstuurd ontvangt u een bevestigingsmail.</p>
<br />
<br />
<asp:Label ID="lblnaam" runat="server" Text="Naam: "></asp:Label>
<asp:TextBox ID="txtnaam" runat="server"></asp:TextBox>
<asp:Label ID="lblmail" runat="server" Text="Emailadres: "></asp:Label>
<asp:TextBox ID="txtmail" runat="server"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblbericht" runat="server" Text="Bericht: "></asp:Label>
<br />
<br />
<asp:TextBox ID="txtbericht" runat="server" Height="200px" Width="750px"></asp:TextBox>
<br />
<br />
<br />
<asp:Button ID="btnVerzend" runat="server" Text="Verzenden" />
<br />
<br />
<br />
<asp:Label ID="lblres" runat="server" Text="Label" Visible="False"></asp:Label>
<br />
<br />
<br />
</td>
</tr>
</table>
</form>
Translation: One page can only have one form-label with runat server
Check the masterpage for a <form> tag with runat="server". ASP.NET only allows one of these per page.
You can just remove it from your code above;
<table>
<tr>
<td>
<br />
<br />
<h1> Stuur ons een berichtje</h1>
<br />
<br />
<p>Alle berichtjes worden ook verstuurd naar info#waasseschrijnwerken.be. Als het correct is verstuurd ontvangt u een bevestigingsmail.</p>
<br />
<br />
<asp:Label ID="lblnaam" runat="server" Text="Naam: "></asp:Label>
<asp:TextBox ID="txtnaam" runat="server"></asp:TextBox>
<asp:Label ID="lblmail" runat="server" Text="Emailadres: "></asp:Label>
<asp:TextBox ID="txtmail" runat="server"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblbericht" runat="server" Text="Bericht: "></asp:Label>
<br />
<br />
<asp:TextBox ID="txtbericht" runat="server" Height="200px" Width="750px"></asp:TextBox>
<br />
<br />
<br />
<asp:Button ID="btnVerzend" runat="server" Text="Verzenden" />
<br />
<br />
<br />
<asp:Label ID="lblres" runat="server" Text="Label" Visible="False"></asp:Label>
<br />
<br />
<br />
</td>
</tr>
</table>
I have an issue with my renderbody content disappearing beneath my left floated side bar. I tried to figure out what exactly is going wrong in my css by opening the default internet web template provided by visual studio and I can see that they use media queries to change the style on smaller sized screens. I am trying to do the same but see absolutely NO changes :(
To see the problem in action you can definitely visit my dev site. If you make the window width smaller you will see the problem. (problem seen here)
This is the markup for my layout view
#model gcaMusicExchange.ViewModels.ViewModelBase
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>#ViewBag.Title</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
#Styles.Render("~/Content/css")
<link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />
<link href="~/Content/themes/base/chosen.css" rel="stylesheet" />
#Scripts.Render("~/bundles/jquery")
#*<script src="~/Scripts/jquery.min.js"></script>*#
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/jquery-ui-1.8.20.js"></script>
<script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="~/Scripts/chosen.jquery.js"></script>
<script src="~/Scripts/jquery.slider.min.js"></script>
#Scripts.Render("~/bundles/modernizr")
<!--[if !IE 7]>
<style type="text/css">
#wrap {display:table;height:100%}
</style>
<![endif]-->
</head>
<body>
<header>
<div class="content-wrapper">
<div class="float-left">
<p class="site-title">
<img height="70px" style="margin-left:-300px; margin-top:-10px" src="~/Images/jdmxchange.jpg" /></p>
</div>
<div class="float-right">
<section id="login">
#Html.Partial("_LoginPartial")
</section>
<nav>
<ul id="menu">
<li>#Html.ActionLink("Home", "Index", "Home")</li>
<li>#Html.ActionLink("About", "About", "Home")</li>
<li>#Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</nav>
</div>
</div>
</header>
<div class="sidebar ">
<div id="commandControls" class="navbar-leftside-content">
<div id="firstBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1 style="color:#1C75B8">Performance Parts</h1>
#Html.ActionLink("Browse all parts", "Index", "ResultsList")
<br />
<br />
#Html.ActionLink("Browse by vehicle application", "PerformancePartsByVehicle", "Browse")
<br />
<br />
#Html.ActionLink("Browse by part category", "PerformancePartsByCategory", "Browse", null, null)
<br />
<br />
#Html.ActionLink("Browse by part manufacturer", "PerformancePartsByManufacturerLetter", "Browse", null, null)
</div>
<div id="secondBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1 >Vehicle Listings</h1>
#Html.ActionLink("Browse all vehicles", "Index", "VehicleListings", null, null)
<br />
<br />
#Html.ActionLink("Browse custom builds", "Index", "VehicleListings", null, null)
<br />
<br />
#Html.ActionLink("Browse shells", "Index", "VehicleListings", null, null)
</div>
<div id="thirdsBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1>Account</h1>
#* #Html.ActionLink("Mechanical", "ShellBuilds", "Browse", null, null)
<br />
<br />
#Html.ActionLink("Cosmetic", "ShellBuilds", "Browse", null, null)
<br />
<br />
#Html.ActionLink("Electrical", "ShellBuilds", "Browse", null, null)
<br />
<br />
#Html.ActionLink("Computer", "ShellBuilds", "Browse", null, null)
<br />
<br />
#Html.ActionLink("Driving", "ShellBuilds", "Browse", null, null)
<br />
<br />
#Html.ActionLink("Misc", "ShellBuilds", "Browse", null, null)
<br />
<br />*#
#Html.ActionLink("Post a part for sale", "Index", "VehicleSelect", null, null)
<br />
<br />
Post a vehicle for sale
#*#Html.ActionLink("Post a vehicle for sale", "Create", "ItemPost", null, null)*#
<br />
<br />
#*If the user is currently logged on*#
#if (User.Identity.IsAuthenticated)
{
#Html.ActionLink("View your posts", "DisplayMyPosts", "Account", null, null)
<br />
<br />
#Html.ActionLink("View your purchases", "MyPurchases", "Account", null, null)
<br />
<br />
#Html.ActionLink("Messages", "Index", "Message", null,null)
<br />
<br />
<span>Favorites</span>
#*#Html.ActionLink("Notables", "NotablesMain")*#
<br />
<br />
<span>Notifier</span>#*
#Html.ActionLink("Agent", "AgentConfig")
*#<br />
<br />
<span>Account Settings</span>
#*#Html.ActionLink("Account Settings", "Settings")*#
}
else
{
<br />
<br />
}
</div>
<div id="fourthBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1>Events and Meets</h1>
</div>
</div>
</div>
<div>
#RenderSection("featured", required: false)
</div>
<div id="body">
<section class="content-wrapper clear-fix">
#RenderBody()
</section>
</div>
#RenderSection("scripts", required: false)
Rather than post my css (it is huge) I think you can see the css in source code in your browser.
In design page,i am loading HtmlEditorExtender in ajax popup. There i want to load an image. but the image is not loading completely.
i guess: OnImageUploadComplete is not firing.
what could be the problem? and please suggest me the solution??
<ajax:HtmlEditorExtender ID="htmEdtior" DisplaySourceTab="true" OnImageUploadComplete="htmEdtior_OnUploadComplete"
TargetControlID="txtWelcomenotes" runat="server">
<Toolbar>
<ajax:Undo />
<ajax:Redo />
<ajax:Bold />
<ajax:Italic />
<ajax:Underline />
<ajax:StrikeThrough />
<ajax:Subscript />
<ajax:Superscript />
<ajax:JustifyLeft />
<ajax:JustifyCenter />
<ajax:JustifyRight />
<ajax:JustifyFull />
<ajax:InsertOrderedList />
<ajax:InsertUnorderedList />
<ajax:CreateLink />
<ajax:UnLink />
<ajax:RemoveFormat />
<ajax:SelectAll />
<ajax:UnSelect />
<ajax:Delete />
<ajax:Cut />
<ajax:Copy />
<ajax:Paste />
<ajax:BackgroundColorSelector />
<ajax:ForeColorSelector />
<ajax:FontNameSelector />
<ajax:FontSizeSelector />
<ajax:Indent />
<ajax:Outdent />
<ajax:InsertHorizontalRule />
<ajax:HorizontalSeparator />
<ajax:InsertImage />
</Toolbar>
</ajax:HtmlEditorExtender>
Have changed every query string which comes from another page to session..... then it worked..... Problemo solved...
I know that the :before, and :after pseudo elements are not supported in empty elements, but what about these:
<select>
<option>
<textarea>
<button>
A list would be nice! Thanks guys!
I put together a list of every HTML element. Some aren't even legal where they're used... but it still seems to work.
If it says "it works" in green letters, that element is supported.
*:not(br):after {
content: 'it works';
font-weight: bold;
padding: 5px;
color: green;
}
<a>Name: a</a> <br />
<abbr>Name: abbr</abbr> <br />
<address>Name: address</address> <br />
<area>Name: area</area> <br />
<article>Name: article</article> <br />
<aside>Name: aside</aside> <br />
<audio>Name: audio</audio> <br />
<b>Name: b</b> <br />
<base>Name: base</base> <br />
<bdo>Name: bdo</bdo> <br />
<blockquote>Name: blockquote</blockquote> <br />
<body>Name: body</body> <br />
<br>Name: br</br> <br />
<button>Name: button</button> <br />
<canvas>Name: canvas</canvas> <br />
<caption>Name: caption</caption> <br />
<cite>Name: cite</cite> <br />
<code>Name: code</code> <br />
<col>Name: col</col> <br />
<colgroup>Name: colgroup</colgroup> <br />
<command>Name: command</command> <br />
<datalist>Name: datalist</datalist> <br />
<dd>Name: dd</dd> <br />
<del>Name: del</del> <br />
<details>Name: details</details> <br />
<dfn>Name: dfn</dfn> <br />
<div>Name: div</div> <br />
<dl>Name: dl</dl> <br />
<dt>Name: dt</dt> <br />
<em>Name: em</em> <br />
<embed>Name: embed</embed> <br />
<eventsource>Name: eventsource</eventsource> <br />
<fieldset>Name: fieldset</fieldset> <br />
<figcaption>Name: figcaption</figcaption> <br />
<figure>Name: figure</figure> <br />
<footer>Name: footer</footer> <br />
<form>Name: form</form> <br />
<h1>Name: h1</h1> <br />
<h2>Name: h2</h2> <br />
<h3>Name: h3</h3> <br />
<h4>Name: h4</h4> <br />
<h5>Name: h5</h5> <br />
<h6>Name: h6</h6> <br />
<head>Name: head</head> <br />
<header>Name: header</header> <br />
<hgroup>Name: hgroup</hgroup> <br />
<hr>Name: hr</hr> <br />
<html>Name: html</html> <br />
<i>Name: i</i> <br />
<iframe>Name: iframe</iframe> <br />
<img>Name: img</img> <br />
<input>Name: input</input> <br />
<ins>Name: ins</ins> <br />
<kbd>Name: kbd</kbd> <br />
<keygen>Name: keygen</keygen> <br />
<label>Name: label</label> <br />
<legend>Name: legend</legend> <br />
<li>Name: li</li> <br />
<link>Name: link</link> <br />
<mark>Name: mark</mark> <br />
<map>Name: map</map> <br />
<menu>Name: menu</menu> <br />
<meta>Name: meta</meta> <br />
<meter>Name: meter</meter> <br />
<nav>Name: nav</nav> <br />
<noscript>Name: noscript</noscript> <br />
<object>Name: object</object> <br />
<ol>Name: ol</ol> <br />
<optgroup>Name: optgroup</optgroup> <br />
<option>Name: option</option> <br />
<output>Name: output</output> <br />
<p>Name: p</p> <br />
<param>Name: param</param> <br />
<pre>Name: pre</pre> <br />
<progress>Name: progress</progress> <br />
<q>Name: q</q> <br />
<ruby>Name: ruby</ruby> <br />
<rp>Name: rp</rp> <br />
<rt>Name: rt</rt> <br />
<samp>Name: samp</samp> <br />
<script type="application/json">Name: script</script> <br />
<section>Name: section</section> <br />
<select>Name: select</select> <br />
<small>Name: small</small> <br />
<source>Name: source</source> <br />
<span>Name: span</span> <br />
<strong>Name: strong</strong> <br />
<style>Name: style</style> <br />
<sub>Name: sub</sub> <br />
<summary>Name: summary</summary> <br />
<details>Name: details</details> <br />
<sup>Name: sup</sup> <br />
<table>Name: table</table> <br />
<tbody>Name: tbody</tbody> <br />
<td>Name: td</td> <br />
<textarea>Name: textarea</textarea> <br />
<tfoot>Name: tfoot</tfoot> <br />
<th>Name: th</th> <br />
<thead>Name: thead</thead> <br />
<time>Name: time</time> <br />
<title>Name: title</title> <br />
<tr>Name: tr</tr> <br />
<ul>Name: ul</ul> <br />
<var>Name: var</var> <br />
<video>Name: video</video> <br />
<wbr>Name: wbr</wbr> <br />