w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Stretch to fill
  • in menu
  • The smartest thing to do is make them (the a's) display: block, but then they still don't fill your entire li, because the li contains padding. Remove the padding from the lis. Only give them a size if you need, and apply all the other markup, especially padding, to the a elements themselves.

    Categories : HTML

    CSS Make div to fill its parent but not to stretch it
    Without changing the layout, and without fixing any static width. the solution is simple. #mainCont { position: relative; } #fillParent { position: absolute; } take a look here: http://jsfiddle.net/aAXNm/8/

    Categories : HTML

    Stretch ExpandableListView to fill screen vertically
    Changing the height attribute on the list does not help because it only tells the listview how much screen space it may occupy. The individual items your list is displaying are not affected by this, as they will still follow their own layout rules on how to use available space in the listview. To solve your issue, you might want to look into extending BaseExpandableListAdapter. You can define a custom layout for the listview items, in your case you'd probably just make the item views a bit bigger so they take up more space. You'll find detailed tutorials on how to do this all over the net. However, using this approach (with a static list size of 5 items), you'll eventually run into the same issue again on devices with larger screens. Your custom list may now look like you want it to on

    Categories : Android

    Stretch image to fill available width / height (separately)
    This might be what you are looking for... TransformedBitmap Here is a static method I made in an ImageUtility class. public static TransformedBitmap GetScaledBitmapImageSprite(BitmapSource src, double x_scale, double y_scale) { return (new TransformedBitmap(src, new ScaleTransform(x_scale, y_scale))); { The x_scale and y_scale are doubles in the form of: desired_width / original_width Maybe a little different than what you are looking for but I think it can get you started on the right track. You can store your TransformedBitmap in memory and apply new transforms through: TransformedBitmap x = new TransformedBitmap(); x.Transform = new ScaleTransform(x,y);

    Categories : C#

    Making an unordered list stretch horizontally so as to always fill up a div
    Try this ul { padding:0; margin:0; white-space:nowrap; } li { width: 100%; list-style-type:none; display:inline-block; } or ul { width: 100%; display: table; table-layout: fixed; } ul li { display: table-cell; width: auto; text-align: center; }

    Categories : CSS

    Why is the fill of an Ellipse not applied when the Stretch property is set inside a VisualBrush?
    I'm not sure what you're using the ViewBox for in your above example, but I think some of the strange behaviour you're seeing is a result of not setting the size on the root element for your VisualBrush. In the documentation for VisualBrush.Visual, there's a paragraph that mentions sizing (added emphasis): When you define a new Visual for a VisualBrush and that Visual is a UIElement (such as a panel or control), the layout system runs on the UIElement and its child elements when the AutoLayoutContent property is set to true. However, the root UIElement is essentially isolated from the rest of the system; styles, storyboards, and external layout dictated by the parent where the brush is applied cannot permeate this boundary. Therefore, you should explicitly specify the si

    Categories : Wpf

    How can I make a TextArea stretch to fill the content, expanding the parent in the process?
    Awaiting a better, i use this hacky solution. lookup the vertical scrollbar of the textarea. make it transparent listen to its visible property when the scrollbar become visible i add a row to the textarea. The code: import javafx.application.Application; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.collections.ObservableList; import javafx.geometry.Orientation; import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.ScrollBar; import javafx.scene.control.TextArea; import javafx.scene.layout.AnchorPane; import javafx.stage.Stage; public class GrowGrowTextArea extends Application { public static void main(String[] args) { launch(args); } @Override public

    Categories : Java

    How do I change this html code to make my tumblr background not repeat and fill the entire page?
    You can make it not repeat via background-repeat:no-repeat; but you can't make it fill the whole page, at last you can resize the background via background-size: 0px 0px; here you go! body { color: #1a1a1a; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-image: url('http://www.totallylayouts.com/backgrounds/hipster/triangle_in_the_woods.jpg') background-repeat:no-repeat; background-size:1920px 1080px;

    Categories : HTML

    Javascript API - calling nokia.maps.map.Display with zoomLevel causes map container div to fill entire page
    Some sort of combination of either: percentages with position absolute such as width:100%; height:90%; left: 0; top: 1em; position: absolute; fixed pixel size on the height e.g. width:600px; height:600px; In other words something like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="X-UA-Compatible" content="IE=7; IE=EmulateIE9" /> <title>Map with a DIV</title> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script language="j

    Categories : Javascript

    Stretch child div height to fill parent that has dynamic height
    The solution is to use display: table-cell to bring those elements inline instead of using display: inline-block or float: left. div#container { padding:20px; background:#F1F1F1 } .content { width:150px; background:#ddd; padding:10px; display:table-cell; vertical-align:top; } .text { font-family: 12px Tahoma, Geneva, sans-serif; color:#555; } Working Fiddle

    Categories : CSS

    Adding JavaScript Code to A Single Page in Joomla (Google Remarketing Code)
    You could use a module which allows to run custom code in it. There are several solutions to this in the JED: http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-modules

    Categories : Javascript

    How to Make My Web Page Stretch to Fit All Browsers?
    Here's some code I wrote a while ago to make a <video> a full screen background: // Resize the video elements so that we don't get any borders due to aspect ratio function resizeVideo() { if ($(window).height() > $(window).width() * 0.5425) { // Which dimension is bigger dependant on aspect ratio (16:9) $("video").removeAttr("height").removeAttr("width").width("auto").height("100%"); } else { $("video").removeAttr("height").removeAttr("width").width("100%").height("auto"); } }; // Add the resize function to the window resize event but put it on a short timer as to not call it too often var resizeTimer; $(window).resize(function () { clearTimeout(resizeTimer); resizeTimer = setTimeout(resizeVideo, 150); });

    Categories : Javascript

    Javascript stretch image according to a map?
    You could use the HTML5 canvas feature along Java-script to do image manipulation. Altogh it will be processor intensive, mainly if you want to do animation, you can do it. Some tutorial for the canvas element of HTML5 with Java-script, probably you are interested more on the drawImage(image,x,y) method. http://www.w3schools.com/html/html5_canvas.asp And references http://www.w3schools.com/tags/ref_canvas.asp You could then get draw the parts you want scaled, but giving it near non noticeable artifacts effects like you want is really difficult.

    Categories : Javascript

    how to stretch unordered lists with scrollbar to the bottom of the page
    The key to this is to use position:absolute with top:0;bottom:0 to ensure that the lists exactly fill up the remaining window height. FIDDLE Note: I have removed the markup/css connected with tables. (This reduces a lot of the markup and css) The javascript in the fiddle has nothing to do with the layout - it's just to create the dummy lists' content

    Categories : HTML

    Make footer stretch bottom of page without using body tag
    this is a bit of a hack, but you can use jQuery like this: var t = $("#rt-debug").offset().top; var ih = window.innerHeight; $("#rt-debug").css('height',ih-t + "px"); here's a jsfiddle: http://jsfiddle.net/tLNCW/

    Categories : HTML

    How to stretch a div vertically to the footer, and stretch to fit content?
    Try this layout and see if it works for you. http://jsfiddle.net/TCdsK/14/ I have updated the fiddle to make the layout something similar to what you have, http://jsfiddle.net/TCdsK/16/ hope this helps edit: Make sure all the columns are of the same height http://jsfiddle.net/TCdsK/21

    Categories : Javascript

    How to add javascript code in every page?
    The easiest solution: install the Google analytics plugin and put the tracking key UA-42279086-1 in its configuration. A slightly more involved solution: paste the <script> tag into the template you are using.

    Categories : PHP

    Add code examples on your page with Javascript
    I tried this using jsfiddle: HTML <textarea id="code"></textarea> JavaScript $(document).ready(function() { var string_eng = ''; string_eng += '<b>Year Bonus</b> - bonus for each year</br></br>'; $("#code").html(string_eng); }); Output (contained in textarea) <b>Year Bonus</b> - bonus for each year</br></br> Try it here: http://jsfiddle.net/UH53y/ It does not omit values held within tags, however if you were expecting the <b></b> tags to render as bold within the textarea, or the <br /> tags to render as line breaks, this wont happen either. textarea does not support formatting. See this question for more information: HTML : How to retain formatting in textarea?

    Categories : Javascript

    JavaScript code sent Date to PHP page Not working
    You're concatenting it wrong. The & must be within quotes. and you're also missing the concat operator (+) at places Yours : data: "ch=" + dropdown&"ch2=" + dropdown2&"ch3=" + dropdown3 Correct : data: "ch=" + dropdown + "&ch2=" + dropdown2 + "&ch3=" + dropdown3 And dropdown, dropdown2, dropdown3 values won't work the way they are. It must be selected from the element, like this : data: "ch=" + $("#dropdown").val()+"&ch2=" + $("#dropdown2").val()+"&ch3=" + $("#dropdown3").val() And remove the onclick to use jQuery's click : $("input[type=button]").on("click", function dynamic_Select() { $.ajax({ type: "GET", url: 'att-filt.php', data: "ch=" + dropdown + "&ch2=" + dropdown2 + "&ch3=" + dropdown3, dataType: "h

    Categories : Javascript

    How to set up javascript/jquery code for whole site or one page or some of both?
    Just put a quick check for that element in your JS file. Example, the element only on one page: <span id="coolSpan">span stuff</span> JS: if ($("#coolSpan").length) { //element exists, bind the handler $("#coolSpan").click(function() { console.log("I exist!"); }); }

    Categories : Jquery

    Get file path in ASP page from code behind to javascript
    Add a hidden field to your aspx page. <asp:HiddenField ID="hfrecordID" runat="server" /> And assign the recodId to it in the ItemDataBound event and use it in the aspx page. <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function ViewCheck(filename) { var targetfile = "Allegati/" + <%= hfrecordID.value %> + filename; var openWnd = radopen(targetfile, "RadWindowDetails"); } </script> protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem editedItem = e.Item as GridEditableItem; hfrecordID= editedItem.GetDataKeyValue("TransazioneID").T

    Categories : C#

    How to inject javascript code that uses php variables into php page
    Assign PHP variable's value to java script variable : <script type="text/javascript"> var json{ "id":<?php echo $id;?>, "user" : "<?php echo $user;?>" }; </script> Change this line from your code : $.post('full.php', {msgg: msg, from: json.id, to: json.user} Now you'll have separate js file like: function send(e){ if(e.keyCode == 13 && !e.shiftKey){ $(document).ready(function(){ //Get the input data using the post method when Push into mysql is clicked .. we pull it using the id fields of ID, Name and Email respectively... //Get values of the input fields and store it into the variables. var msg=$("#reply").val(); clear(); //here you start PHP->> //here we put the PHP Variables ^^^^^^^^^///\ //use the $.post() m

    Categories : PHP

    Page doest not work good in JavaScript code with form
    Please see the demo here there are several mistakes in this line div_new = div_new+"<form name='"+name+"' onsubmit="+ return refresh(name, url, document.forms[name][name].value , '', '', 'refresh'); +" method='post' style='display:inline;'>"; Use this code function chat(mem_id) { count++; var div_new = "<div style='position:absolute; width:200px; bottom:0px; left:10px;'>"; div_new = div_new+"<div style='width:100%; background-color:green;'>top "+ mem_id +" - "+count+"</div>"; div_new = div_new+"<div style='width:100%; height:300px; background-color:pink;'>bottom // refresh_chat"+ mem_id +" "; var name = "send_chat_"+mem_id; var url = "send_chat.php"; div_new = div_new+"<form name='"+name+"' onsubmit="return ref

    Categories : Javascript

    How to hidden javascript code in Blogger from inspect page element?
    Impossible at all. You've sent a script element to the client. The inspector is running in the same scope with the same permissions as your script. You can obfuscate it (if you really need to).

    Categories : Javascript

    How to the same page specific code for multiple pages using javascript routes?
    I changed to method route.add so it also accepts an array as url parameter. var route = { _routes: {}, // The routes will be stored here add: function(url, action) { if( typeof url === 'string' ) { // if url isn't an array, convert it to an array url = [url]; } for (var i=0; i<url.length; i++) { // loop over the array elements this._routes[url[i]] = action; } }, run: function() { jQuery.each(this._routes, function(pattern) { if (location.href.match(pattern)) { // "this" points to the function to be executed this(); } }); } } // array as url parameter route.add(['002.html','003.html'], function() { alert('Hello there!'); }); // array as url parameter route.add(['products.html','services.html'], functio

    Categories : Javascript

    How to use breakpoints in Javascript code in .ASPX page of Visual Studio 2008
    If you put a debugger; statement and you're using IE, the browser will throw a "Script Debugging" error and prompt you for a debugging tool, you can select VS 2008 from the list. Make sure to have the "Disable Script Debugging" options in IE unchecked. Alternatively, you can use "Debug > Attach To Process" and attach the debugger to your browser processes, after that you can put a regular break point from visual studio on your javascript code and it will work.

    Categories : C#

    Javascript Stuck on Error Alert for Validation Code unless Page is Reloaded
    I was assigning the variables incorrectly. While is works in most cases it did not allow me to pull the data again after running a validation check for some reason. I changed them to be attr('data-presid'), instead of data('presid'). So, by changing the variables to the following it works fine now: var pres_id = $(this).attr('data-presid'); var ref_id = $(this).attr('data-refid'); var ref2_id = $(this).attr('data-ref2id'); var apt_id = $(this).attr('data-aptid'); var ins_id = $(this).attr('data-insid'); var offer_id = $(this).attr('data-offerid'); var offer2_id = $(this).attr('data-offer2id'); var ins_txt_id = $(this).attr('data-instxtid'); var brg_id = $(this).attr('data-brgid'); var entity_id = $(this).attr('data-entityid');

    Categories : Javascript

    Automatically fire a JavaScript code after loading a page in Google Chrome
    You should write this as a userscript and run it with something like tampermonkey

    Categories : Javascript

    get full html source code of page through ajax request through javascript
    data = "" url = "http://www.example.com/page.html" var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); xhr.onreadystatechange = function() { if (xhr.readyState == 4){ data = xhr.responseText } } xhr.send(); function process(){ url = "http://www.example.com/page.html" var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); xhr.onreadystatechange = function() { if (xhr.readyState == 4){ alert(xhr.responseText) } } xhr.send(); } this is how i run script from the address bar.. I do it all the time.. i create a bookmark like this javascript:script=document.createElement('script');script.src='http://10.0.0.11/clear.js';document.getElementsByTagName('head')[0].appendChild(script); void(sss=1); then i host the js file on my comp

    Categories : Javascript

    How do I make my banner image stretch to fit the width of the page if the page width exceeds image width?
    Add: background-size: cover; This ensures that the image will cover the entire area, in your case the image will almost always retain its height until the width of the banner becomes greater than the original width of the image, then it will start to expand in size to fit the width. It won't look perfect if someone expands their browser to this size but not much will at this width anyway. http://www.css3.info/preview/background-size/

    Categories : CSS

    Fill an HTML page with data
    Put the text from the HTML in a string, apply a regular expression to the string. String s = html.toString(); String replaceWith = "Put something in this string"; source.replaceAll("%@", replaceWith); If you want to replace with different values, you can use Pattern/Matcher String s = html.toString(); Pattern p = Pattern.compile("%@"); Matcher m = p.matcher(s); while (m.find()) { // Find each match in turn; // Process your findings here; }

    Categories : Android

    Fill an iframed form from an outside page
    Assuming the iframe src is in the same domain you can do this: function setZipInIframe(zip){ //load the input iframe and set a value getIframeDocument().getElementById('txtZipCode').value = zip; } function getIframeDocument(){ var iframe = document.getElementById("ifrId"); //contentDocument because IE8 doesn't support contentWindow return (iframe.contentDocument || iframe.contentWindow.document); }

    Categories : Javascript

    Fill login form from another page
    It's not possible to send the input directly into another form, but it should be possible (depending how the 2nd site handles login) to send the form directly from you to the original login form's action page. Your form would should send the same inputs as the original form, and have the same action (websitepath/home.xhtml), with the full URL for the action. Also - Autofill a form of another website and send it

    Categories : HTML

    Are there anyways to fill a structure with shorter code?
    Well, while not fewer instructions, at least fewer keystrokes and somewhat easier to read: #define FILL(a, b) features.a.b = GetAttribute(node,#a,#b,HexValue) FILL(x, Read); FILL(x, Write); FILL(x, address); FILL(x, value); FILL(y, Read); FILL(y, Write); FILL(y, address); FILL(y, value); #undef FILL

    Categories : C++

    SQL: how to fill all empty code fields
    I think what you might be looking for is a "select for update" type query. This can be done similar to the following: UPDATE SOME_DB.SOME_TABLE A SET CODE = (SELECT SOME_CODE_FIELD FROM SOME_OTHER_DB.SOME_OTHER_TABLE B WHERE A.KEY = B.KEY) WHERE CODE IS NOT NULL OR CODE = ""; This will update table A with the code value from table B, if it has one, for all rows on table A with a null code. If table B has no code value, I believe the subselect will return null (provided the code column in table B is nullable) and the value of that code on table A will remain null.

    Categories : SQL

    cleanest way to insert javascript code in html (inside javascript code)
    You have to append the result to the DOM. add this line at the end. $('body').append(anchor_element); You can ofcourse replace 'body' with any other selector as you like. $(function(){ var href = 'http://testing123.com'; var label = 'Anchor label'; var anchor_element = '<a href="' + href + '">' + label + '</a>'; $('body').append(anchor_element); // add the element to <body> }); working jsFiddle

    Categories : Javascript

    Scrollbars is added, but elements does not fill the page
    You want to add margin: 0; to your body. It's already 100% wide, and the margin pushes the width beyond the space available on screen. This causes a vertical scrollbar, and that, in turn, causes a horizontal scrollbar.

    Categories : HTML

    Open page with html form and then pre-fill it
    It looks like you can specify an email address in the URL for gmail: https://accounts.google.com/ServiceLoginAuth?Email=email@example.com

    Categories : Javascript

    can i fill two tables in method in Entity Code?
    SaveChanges does all of this for you when it sees that both are new and that they are related. It also uses the model’s mappings to figure out which is the dependent entity and needs the foreign key . With this information, it executes the database inserts in the correct order. Note:if you create context using DbFirst approach for exist database its automatically generate the model as well. but code first approach if you have any constrain you should define the model using override following method. protected virtual void OnModelCreating( DbModelBuilder modelBuilder ) then you can save your entities with same transaction.if any failure automatically rollback the transaction itself. Using(MyContext db = new MyContext()) { try { var tbl1

    Categories : C#

    One column floated to the left and other fill the rest of page
    a simple trick using margin .sidebar{ position: absolute; left: 0; top: 0; width: 325px; } .container{ margin-left: 325px; } a quick example http://jsfiddle.net/s8nFX/1/

    Categories : CSS



    © Copyright 2017 w3hello.com Publishing Limited. All rights reserved.