Jump to content

dsonesuk

Members
  • Posts

    11,072
  • Joined

  • Last visited

  • Days Won

    104

Everything posted by dsonesuk

  1. well yeah, left, right, top etc would give the same result, because cover fills the whole parent container, BUT! if you used 'contain' instead the result would represent what you used for portrait align left or right, landscape top or bottom.
  2. first of all, NEVER use spaces in file names, use alternative of hyphen '-' or underscore '_', as in practise-css.html oor practise_css.html. secondary, this should be done on web server, WAMP for example not your computer filesystem. I would imagine the problem is you have no content in body, so the height is 0, so the background image has no area to show. Try setting body and html elements to min-height: 100vh;
  3. Are you confusing key sort (ksort with C,B,A), with value sort (asort 35,37,43)?.
  4. You must know some server language such as php to upload the file in the first place? You can get the date in format of '20210630_' and add to start of filename that is gathered by the server language.
  5. Might want to consider adding timestamp to filename, they should then be in order they where added
  6. There's a position: right; Now! is there? must be short-code property for position: absolute; on right? maybe? have to look it up! just can't keep up with all these new properties they come out with.
  7. Yes! Because this empty($_POST['name']) empty($_POST['email']) empty($_POST['phone']) empty($_POST['message']) IS WRONG! Its structure does not make sense, they return true or false, ok! Now what? They require a if condition to check each is true ie 'empty' if so, return error message and return false to stop going any further. That is what my example showed, if you set any of these to = ""; $_POST['name'] = "fff"; $_POST['email'] = "AA"; $_POST['phone'] = "123"; $_POST['message'] = "WTH"; Empty Error message would show otherwise 'all fields filled' will show.
  8. You are not checking name, email etc, for a specific value of true or false, and then return false only if any of the field are empty. example: <?php $_POST['button'] = "Submit"; $_POST['name'] = "fff"; $_POST['email'] = "AA"; $_POST['phone'] = "123"; $_POST['message'] = "WTH"; if (isset($_POST['button'])) { if (empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message'])) { echo "You gotta fill in required fields of name, email, phone and message"; return FALSE; } else { /* optional, just for testing */ echo "all fields filled"; } } ?>
  9. dsonesuk

    Megamenu

    Hi che, why are calling me suk? uk is the country of UK, Are you a bit odd?
  10. dsonesuk

    Megamenu

    Somewhere I don't know where, cus you can't identify the problem element with a picture, a element type or css property is forcing it to do exactly that!.
  11. min-width: is wrong that value will never work and if you haven't bothered to remove any width properties that restrict the width from being responsive, surprise surprise, still won't work.
  12. ??? thats what it does? I suggest you use an array to store values, with an extra storage of currentcount, use that to check if zero or above. If you look through database field it will return to original value each time. You can also set a default value of 0.
  13. No! that was a figure from out of the air. You mentioned a fixed width that you used before, use that if you like, its not my decision.
  14. If whateverCount > 0, then subtract 1
  15. You wanted a long menu text to not wrap and make the menu text container adjust to width of text content. That is exactly what you get! YOU CANNOT USE A FIXED WIDTH, THAT IS WHY WE REMOVED IT AND REPLACED WITH MIN-WIDTH. Your code still uses IN several places I might add, a fixed width, with overflow: hidden; So if text extends beyond fixed width, the text will be clipped by using overflow: hidden. That is NOT! issue with my css, the issue is fixed width is still used. FIXED WIDTH(width: 250px;) BAD. MIN WIDTH (min-width: 250px;) GOOD! and seriously, do you really need the font size and weight to be that humongous.
  16. dsonesuk

    <option>

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option Tag omission The start tag is mandatory. The end tag is optional if this element is immediately followed by another <option> element or an <optgroup>, or if the parent element has no more content.
  17. The user can enter whatever, But! what is shown that matches, for selection is predefined
  18. You can't delete absolute links, that is how WordPress works, they are all stored in the database. AND! it works fine, i can see my css, and it does works! Try Ctrl+F5, to reload cached files of browser.
  19. I just used there code to add white-space: property as part of styling. .dropdown-menu, represents the actual element the class name is attached to, .dropdown-menu * represents with space the child elements and with * any child element tag type within parent class .dropdown-menu. Just add to style.css or additional styling box that wordpress uses, ideally you would be using a child theme to separate from original theme thus avoid css being overwritten when theme updates.
  20. OH dear! wordpress, uses absolute path links, everyone will now know where to hack your site! were doomed, doomed i tell you. Right! NOW that we have something to work with! .dropdown-menu, .dropdown-menu * { white-space: nowrap !important; } Just imagine how much time and posts would have been saved
  21. What about a datalist or select dropdown of keywords that will sublist using datalist to the keyword selected.
  22. I suggest use table or nested table to achieve the layout you want! I don't know if outlook ignores br tags, i do know its very strict on specific html tags and css styling it will allow. just hint https://medium.com/email-design/outlook-rendering-issues-5-tips-to-ensure-your-emails-display-properly-9520b2456166
  23. <!DOCTYPE html> <html> <head> <style> table, td { border: 1px solid black; } </style> </head> <body> <p>Click the button to return the number of tr elements in the table.</p> <form id="myform" class="one-filled-all-required"> <table id="myTable"> <tr> <td> <select name="select1_1"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <select name="select1_2"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <input name="input1_1" type="text" value=""> </td> </tr> <tr> <td> <select name="select1_1"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <select name="select1_2"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <input name="input1_1" type="text" value=""> </td> </tr> </table> </form> <br> <form id="myform" class="one-filled-all-required"> <table id="myTable"> <tr> <td> <select name="select1_1"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <select name="select1_2"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <input name="input1_1" type="text" value=""> </td> </tr> <tr> <td> <select name="select1_1"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <select name="select1_2"> <option selected value="">default</option> <option value="1">option #1</option> <option value="2">option #2</option> </select> </td> <td> <input name="input1_1" type="text" value=""> </td> </tr> </table> </form> <br> <script> var y = document.querySelectorAll('.one-filled-all-required'); if(y.length){ var vOneAllFilledclassLength = y.length; for(i=0;i<vOneAllFilledclassLength;i++){ console.log(y[i].querySelector('table').rows.length); var vTableRowsCount = y[i].querySelector('table').rows; for(j=0;j<vTableRowsCount.length;j++){ //vTableRowsCount[j].id="row_"+[j]; console.log(vTableRowsCount[j].querySelectorAll('input, select').length+" xxxx") var inputNumb = vTableRowsCount[j].querySelectorAll('input,select'); for(k=0;k<inputNumb.length;k++){ if(inputNumb[k].type=="select-one"){ inputNumb[k].addEventListener("change", function(){ highlightEmpty(this);}, false); } if(inputNumb[k].nodeName.toLowerCase()=="input"){ inputNumb[k].addEventListener("blur", function(){ highlightEmpty(this);}, false); } }//for }//for console.log(y[i].elements.length); }//for console.log('required found'); }else{ console.log('required NOT found'); } function highlightEmpty(elem){ var thisRow = elem.parentElement.parentElement; var inputNumb = thisRow.querySelectorAll('input,select'); for(k=0;k<inputNumb.length;k++){ inputNumb[k].removeAttribute('style'); if(inputNumb[k].value == "" ){ inputNumb[k].style.borderColor="red"; } } } </script> </body> </html> Is this similar to what you are trying to achieve?
×
×
  • Create New...