Jump to content

Funce

Moderator
  • Posts

    602
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Funce

  1. Given that you have a background, you should be able to use the "background-repeat" style to create a tiled effect. Replace the class selector, with whatever is applicable. .background { background-repeat: repeat; }
  2. What issues are you having with this code?
  3. At the bottom of that page there is a button that says "Report Error" If you click that and include what you have written here, you'll have a much greater chance at reaching the w3Schools developers.
  4. You won't be able to get it with inline styling but you can create a custom class that will do so for you. @media print { .pagebreak { clear: both; min-height: 1px; page-break-after: always; } } If you then add the pagebreak class to a <div> like class (not <span>) you'll then get a pagebreak immediately after the content its attached to. (this may be empty if desired as shown below) <div class="pagebreak"></div>
  5. Apologies, I must've seen this on my phone and so it dismisses it from my unreads so I didn't see it when I got to my PC. A tooltip to me is a hint given when hovered or otherwise interacted with. Be it via the subject itself or an info icon. The method in which the information is delivered should be somewhat unobtrusive, but past that anything goes for a tooltip. The built in tooltip features for browsers may not be consistent enough for some.
  6. On the my attachments, you can see the thread they're attached to. If you edit the posts with the files in, at the bottom of the posting window, you can delete the attachment. A little of a roundabout way, sure, but I don't know any others.
  7. Funce

    Mega Menu

    Try to use the code block feature of the forum to format it nicely, colour it, and to avoid it getting eaten by the formatter. If you could edit your previous post. Adding an additional dropdown shouldn't be too bad. Just add another dropdown set after your previous <div class="dropdown"> and it'll also be in the navbar. <div class="dropdown"> <button class="dropbtn">New</button> <div class="dropdown-content"> <div class="row"> <div class="column"> <h3>Another 1</h3> <a href="#">Link 1</a> <a href="#">Link 2</a> <a href="#">Link 3</a> </div> <div class="column"> <h3>Another 2</h3> <a href="#">Link 1</a> <a href="#">Link 2</a> <a href="#">Link 3</a> </div> <div class="column"> <h3>Another 3</h3> <a href="#">Link 1</a> <a href="#">Link 2</a> <a href="#">Link 3</a> </div> </div> </div> </div> Unless you're after a sub-dropdown menu, as in a dropdown inside a dropdown. Then it gets trickier.
  8. Well for one, # is an id selector, not a class selector. You'll need a '.classname' for that.
  9. The JavaScript compiler thinks your concatenating a string with a number, not performing addition. Input always returns a string, regardless of the type attribute. You'll need to typecast the price variable to a number by using any of the following. parseInt(price) - If you know its going to be a whole number (which I don't think that's guaranteed). Errors on text. parseFloat(price) - If you know it can be a non-whole number. Errors on text. Number(price) - This assigns integer or float based on the input. NaN on text. As an aside The onchange event fires when the input loses focus while it has a different value. In addition to onchange, you could add onkeyup to get an output as you type.
  10. Do you know how to use lists? If so I think you might get a lot of mileage out of the string method .split https://www.w3schools.com/python/ref_string_split.asp
  11. A lot of your tags aren't matching up, its screwing up my auto-styler. I ran your code through the HTML checker, and... well, you should see for yourself. From what I could see though, you could benefit from having a look at this tutorial here through. https://www.w3schools.com/css/css_positioning.asp Using position:relative on your container, and position:absolute with top:0 and right:0 on your sidebar/box should give you something close to what you're after.
  12. That would be because attributes aren't supposed to be surrounded in quotes. Only their values. Also, the bgcolor attribute on your body is old, and should be replaced with background-color in your styling/css. Try this on for size <!DOCTYPE html> <html> <head> <title>HTML page</title> </head> <body style="color: pink; background-color: black"> <h1>Testing</h1> <h5>Heading 5</h5> <p title="Dummy text"> Lorem Ipsum Dolor Sit Amet. </p> </body> </html> May I suggest looking into a code editor? I personally use Visual Studio Code
  13. Funce

    Mega Menu

    Post some code, and lets see where you've gone astray.
  14. If you want to include files that also include files, you need to use a relative to root path. Otherwise, the context of your files will change. index.php at /myproject/ works fine, because you have /myproject/inc/ps.db_con.php, but when you go into inc/script.myinformation.php the link would instead need to be ps.db_con.php because they're in the same directory. Your relative to root path you've suggested above is incorrect, as the HTML style paths only works when you have a server to check the root against. Because this is the server processing, we have no such luxury. My solution I use is as follows. <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/relativeToRoot/path/to/file.php"; In your case it would be <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/myproject/inc/ps.db_con.php";
  15. Funce

    PHP question

    Was there a printing issue with this question? This HTML very shaky. It seems like a trick question. Does the validity of the HTML matter in your question?
  16. Your Javascript may be running too early, before the page is loaded. Try an onload event handler. Use AddEventListener in your code like as follows. window.addEventListener('load', function (e) { //Run the code here }); Disclaimer: Untested, so may require tweaking.
  17. This question is pretty vague, but in terms of technical details, all of this can fall under form handling. Try having a look at the link below. PHP Form Handling It's just an extra field on any given signup page. Signup Form Example The real tricky bit will be how you then manage to style your profile page layouts corresponding to the choice. Do you import a different stylesheet? Is your styles inserted inline? (not advised) Does your JavaScript do a small AJAX request to find out what styling is used, or do you generate it server-side? If you have any other questions, do not hesitate to ask.
  18. Font-size: inherit, only works if you've defined a font size earlier in the document. Because you don't, it doesn't do any different from the default, which is 13.3333px (on Chrome) You'll need to set the font-size on your <body> tag for inherit to work. Set it to 16 to start with.
  19. Funce

    Centering buttons

    If you add text-align: center; to your tab class and remove the float: left from tab button, then you should get the output you want.
  20. Oh yeah, target selectors!
  21. You have a few ways to do this, but the easiest way is to use the <table> and corresponding tags. Take a look at this tutorial. https://www.w3schools.com/html/html_tables.asp If you add <img> tags instead of text, and style appropriately, you should get something similar to the PDF you've attached.
  22. Oh, now I see what's up. Your table cells have extra long words with no spaces in them. I suggest you add a few spaces or you can try using td { word-break: break-all; }
  23. This looks a little sparse, but if you're using JavaScript, you should be able to create an AJAX request and send off the request. This tutorial will give you a good overview on how to create an AJAX request, and to respond based on the data returned. https://www.w3schools.com/xml/ajax_intro.asp
  24. You could try a variation of this tutorial. You'd need a bit of Javascript to get it as you describe. https://www.w3schools.com/howto/howto_js_tabs.asp
×
×
  • Create New...