Jump to content

dsonesuk

Members
  • Content Count

    10,421
  • Joined

  • Last visited

  • Days Won

    64

dsonesuk last won the day on November 16

dsonesuk had the most liked content!

Community Reputation

874 Excellent

About dsonesuk

  • Rank
    w3schools Guru
  • Birthday July 15

Recent Profile Visitors

99,511 profile views
  1. You hve two options use br tag, or wrap city in span and style it as a block element.
  2. Class hidden-sm, means hide if small mobile, so it does what it says on the box.
  3. Depends if those styling are set somewhere else with reference to id or class name, which would give them a higher precedence over these stylings.
  4. $display= overwrites the prev output, you need to append to prev output with $display.=
  5. I'm sure I've seen that same answer before, but I can't in the life of me remember where? Wait! I found it! https://stackoverflow.com/questions/17555682/height-100-or-min-height-100-for-html-and-body-elements
  6. Without someone posting the full explanation for you to copy you fail miserably! It has nothing to do with database directly its sending data from one page to another, usually from form either visually through url querystring using get or hidden using post to the server.
  7. Ok! Lets leave unanswered until code or link is supplied, because if the code is exactly as tutorial it should work! So its more likely you have an error in the code or conflict somewhere for it to not work.
  8. I can't specify the part to solve your problem because you HAVEN'T SUPPLIED WHAT YOU HAVE USED IN YOUR CODE.
  9. The first line always reset it on every reload, you only need that to happen when it has not already been set and is empty. Also the JavaScript code needs to below any element it references as the page is rendered from top to bottom, the jS code is executed before the elements it is referencing even exist producing undefined error. You are overthinking this, all you need do is set localStorage.fontsize=1; or localstorage.fontsize=2; and so on... On click event it should increment a variable on each click then reset if greater than 3 the use if conditions n++; if(n > 3){ n=1; } localStorage.fontsize=n; if (localStorage.fontsize==1){ document.getElementById("a").style.fontSize = "20px"; } // and so on... On load you should see if fontsize exists else set to defalut if (localStorage.fontsize) { if (localStorage.fontsize==1){ document.getElementById("a").style.fontSize = "20px"; } // and so on... else { localstorage.fontsize=1; }
  10. Localstorage will do that. First you set a default value if localstorage does not currently store any value related to chosen font size, else load localstorage value and make the chosen font-size active on page load or refresh. Then set onclick event to make selected fontsize active then at same set localstorage to store currently selected font-size also.
  11. The use of form .elements collection will select ALL form elements whatever type. https://www.w3schools.com/jsref/coll_form_elements.asp
  12. Press F12, this will bring web development tools, select elements tab, select inspect to select area containing background, the element tab should highlight the element you selected, along with css pane which should show you css applied, the css file it comes from and the line it is on. It should show the background color used with the colour next to it within tiny box, by clicking that it becomes a colour picker, so as you move your pointer around, adjust colour slider the background colour on website on that element changes to.
  13. dsonesuk

    full page tabs

    Depending how you make the selected tab active? you should use event such as 'click' to store the value of "Contact", which at the same time clearing ANY current pages using "active" class and then a 'active' class to the element with id "Contact", All the others should be hidden by default so the active class will make makes it visible, you would at first check if webstorage is empty, then set first i.e id "Home" as having class "active".
×
×
  • Create New...