Jump to content

vmars316

Members
  • Content Count

    431
  • Joined

  • Last visited

Everything posted by vmars316

  1. Thanks, .Table {/* wrapper */ min-height:100%; text-align: center; margin: 0 auto; padding:0; background: #FF0000 ; } Hmm... Sorry , I have to ask , did you test my whole code ? I am confused . On Chrome what it does is make a red line at the bottom , just below id="Row3Cell1" . And the rest of the page is blank . I want to fill up the whole visible screen . You are saying I can use vh to fill up the whole visible page ? Thanks
  2. How to tell which <p> 'id=' has focus ? Hello & Thanks , The problem with 'document.activeElement.tagname' is that for p element it returns 'BODY' . But I want to know which p has focus . Pls, How can this be done ? Here is the prototype function I was working on . <!DOCTYPE html> <html> <title>Which Element Has Focus</title> <!-- --> <body onload="documentURL()" onclick="myFunction()" > <p>Click anywhere in the document to display the active element.</p> <input type="text" value="An input field"> <button>A
  3. Ouch ! Been there done that , it doesn't help . body { font-family: Comic Sans MS; height: 100%; margin: 0 auto; padding:0; } html { height: 100%; margin: 0 auto; padding:0; border: 0; } .Table {/* wrapper */ min-height:100%; text-align: center; margin: 0 auto; padding:0; } As a matter of fact I tried min-height:100% ; in Body , Html and Table . None of it works ! I must be cancelling it out in ot
  4. Come on people give me a hand . Here is my current code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MyStory.html</title> <!-- file:///C:/Users/vmars/Desktop/myPrograms/HeyBuddy/~~Hey-Buddy-WIP/MyStory.html https://www.dummies.com/web-design-development/css3/using-the-div-tag-to-create-tables/ https://www.freeformatter.com/html-validator.html <a href="https://developer.mozilla.org/en
  5. Sorry I don't understand what you are saying : Do I use min-height: 100% or not ? And where should I put it ? Thanks
  6. Hmm... When I remove the 'min-Height' and have just: body { font-family:Sans-serif; height: 100%; margin: 0 auto; padding:0; } html { height: 100%; margin: 0 auto; padding:0; border: 0; } .Table /* wrapper */ { text-align: center; margin: 0 auto; padding:0; } It still doesn't work . What do I need to do now ? Thanks
  7. Hello & Thanks, Can't get this working: body { font-family:Sans-serif; height: 100%; min-height: 100%; margin: 0 auto; padding:0; } html { height: 100%; min-height: 100%; margin: 0 auto; padding:0; border: 0; } .Table /* wrapper */ { text-align: center; height: 100%; min-height: 100%; margin: 0 auto; padding:0; margin: 0 auto; padding:0; } Here is full code
  8. Hmm... When I changed the listener to window.addEventListener("keydown", onPress_ENTER, false); and your change function onPress_ENTER(event){ All works perfectly ! I am thinking that 'keyup' was too late to cancel . Is that correct ? Thanks
  9. Do your mean like this ? window.addEventListener("keyup", onPress_ENTER, false); } </script> <script> function onPress_ENTER(event){ var keyPressed = event.keyCode || event.which; //if ENTER is pressed if(keyPressed==13) { // alert('enter pressed'); event.preventDefault(); stopImmediatePropagation(); } else { return false; } } Thanks
  10. Hello & Thanks. Not working as I expected : Intercepts enter-key pressed , but doesn't prevent : event.preventDefault(); stopImmediatePropagation(); Here is mini code : window.addEventListener("keyup", onPress_ENTER, false); } </script> <script> function onPress_ENTER(){ var keyPressed = event.keyCode || event.which; //if ENTER is pressed if(keyPressed==13) { // alert('enter pressed'); event.preventDefault(); stopImmediatePropaga
  11. Thanks , That 'SavePageAs' is working fine now . If I hit the enter-key all looks well until I save the page . The 'saved page' shows that for each time the I hit the enter-key , a '<div>plus text</div> 'is created . See below: </div> <!-- <div class="Cell" --> <div id="Row2Cell2"> <p contenteditable="" id="p_ah">Article Heading</p> <p contenteditable="" id="p_tgh">Text Paragraph</p> <p contenteditable="true" i
  12. Well I'm almost there , not getting any 'console errors', but setAttribute are not working : address_id.setAttribute("href", useThisURL); address_id.setAttribute("download", useThisURL); I think these are the problem areas with the complete code below these: <br><a id="address_id" >Save Page As: </a> and: <script> function savePageAs() { var showMe = "nuttin happened?"; var useThisURL = prompt("If FileName is ok, Click OK , Else Change it:", document_URL) if (useThisURL != nul
  13. Thanks, I was hoping to just force the saveas dialog . So that the user could chose to change the filename . I suppose that I could Prompt the user 1st with the name (document.URL;) and give them the option to change it or not. Then download the page . Think I'll give that a shot. Thanks
  14. Thanks, I was hoping it would be this easy: <!DOCTYPE html> <html> <body> <p>just a paragraph <p> <a href="" download=""> Save This Page As </a> </body> </html> It is, if I'm talking with the server , which I don't want to do . I want to do it locally . Will I need to supply the name of "This Page" ? Or is there an abbreviated version ? Thanks
  15. Hello & Thanks , I would like an Html5 button to Trigger a 'Download File prompt ' for all browsers . Rather than clicking on for example [Browser Customize and Control ] , then clicking [More tools] [Save Page As] etc.. I searched, but nothing related came up . How can this be accomplished ? Thanks for your help !
  16. Thanks , That did it . I did use DevTools but didn't interpret it as anything wrong . I am checking out overflow here: https://www.w3schools.com/cssref/pr_pos_overflow.asp As always. Thanks
  17. Ah... That worked great for between Row1 and Row2 . But between Row2 and Row3 there is still a space . I tried variations of vertical-align: top; and vertical-align: bottom; and margin-bottom: 1001em; and margin-bottom: -1000em; but no go yet . Thanks <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>3-Rows-3-Cols.html</title> <!-- file:///C:/Users/vmars/Desktop/myPrograms/HeyBuddy/~~H
  18. Hello & Thanks, How to eliminate verticle space between Divs ? I have tried gazillions of solutions but none of them work . Thanks for your help ! <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>3-Rows-3-Cols.html</title> <!-- file:///C:/Users/vmars/Desktop/myPrograms/HeyBuddy/~~Hey-Buddy-WIP/3-Rows-3-Cols.html https://www.dummies.com/web-design-development/css3/using-the-div-tag-to-create-tabl
  19. Thanks , Sorry , I am getting hung up on the term 'anchor ' . Is this the anchor? : var p_bn = document.createElement("li"); Thanks
  20. Hi dsonesuk ; Using your var inner_parent = content.getElementsByTagName('ul')[0] It's not working for me . I must have coded it wrong. With the code below I expected to get two "New Link" s . But only got 1 . Pls , tell me what is my mistake ? Thanks <script contenteditable=""> function createNewButton() { // alert("function createNewButton()"); var p_bn = document.createElement("li"); p_bn.innerHTML = ButtonParagraph; p_bn.setAttribute('contenteditable', 'true'); p_bn.setAttribute("id","li_De
  21. Ah... finally , I got it: However , still 1 problem left: // var content = document.getElementById('ul'); // var content = document.getElementById('nav-01.ul'); var content = document.getElementById('nav-01'); content.appendChild(p_bn); The content.appendChild(p_bn); only works for var content = document.getElementById('nav-01'); . Which puts it AFTER <ul></ul> . But I want it to be put within <ul> as an appendChild . Pls , How can I put the child within <ul> ? Here is the whole mini-mini code" <
  22. Thanks dsonesuk : Oops , I forgot all about : https://www.freeformatter.com/html-validator.html I would like to try that later . Right now my mind set is on 1st working it out with <p> . I put a new example here: http://vmars.us/ShowMe/Html-MasterWIP-Mini-Debug.html Pls , take a look at the source . So there is something I would like to add within each created <p> element . And that is its id="p_ah" and id="p_tgh" elements repectively . I tried: p_tgh.setAttribute("contenteditable", "true" , "id="p_tgh""); But its a no go .
  23. Hi Funce , Those are all cleared up the link below . Kindly go to : http://vmars.us/ShowMe/Html-MasterWIP-Mini.html Try clicking on the [Add New Text Area] Button . Note that the 1st 'Text Paragraph' is Grey , all subsequent 'Text Paragraph's are black . I want them all to be Grey . Pls , how can I correct that ? Thanks for your help !
  24. Here is page code minified . What is troubling me , is that the style settings for ArticleHeading(#p_ah) & TextHeading(p_tgh) are not working . Here is the working page online: Pls, show me how to fix this . http://vmars.us/ShowMe/Html-MasterWIP-Mini.html Thanks for your help ! <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Master-WIP-Mini.html</title> <style> body {margin:0; padding:0; font-family: Sans-Serif; line-height: 1.5em; } #header
  25. I am thinking the reason I haven't received any replies is that this Post is too long . So I am working on a miniature version of this . I'll be back .
×
×
  • Create New...