Jump to content

Sunamena

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by Sunamena

  1. Hello, I want to have something like the WHERE command. A user types something, for example: "peer". I want a WHERE that also includes "Peer" and "PeEr" and "apeer" and "Peert. Is this by any chance possible? Thanks in advance =D
  2. :voor is an INT. I do use Try and Catch, but i left that out of the code (i wanted to focus on the part that did not work). =D And dsonesuk: Yes i did, i did it once to much =D And the previous one had to be a fetchAll =D This problem has been solved. Thanks all =D
  3. Hello there, I think you want to know how your site looks on different resolutions? In Chrome, you can press F12 (followed by Ctr+Shift+M) to watch any site in a different resolution (you can even simulate certain handheld devices).
  4. I think you want to use an IFrame. <iframe src="http://villordsutch.tumblr.com/"></iframe> Tutorial: https://www.w3schools.com/tags/tag_iframe.asp
  5. Thankyou everyone. I got things working now =D Uploading files was new to me =D You all deserve a cookie!
  6. Hello everyone, this is what i want to achieve: When someone looks in his or her Inbox, (s)he can see all messages directer to him or her. This is my code (the part which is needed for my question ;)): $sql = "SELECT * FROM berichten WHERE voor = :voor ORDER BY berichtid"; $stmt = $db -> prepare($sql); $stmt -> bindParam(':voor', $voor, PDO::PARAM_INT); $voor = $_SESSION["userID"]; $stmt -> execute(); $result = $stmt -> fetch(PDO::FETCH_NUM); $numberInResult = count($result)-1; // THIS IS TO CHECK MY RESULTS print_r($result); echo "<br><br><br>"; echo "<br><br><br>"; echo $numberInResult; // Number in results is 5. (Which is incorrect, the test person has 7 messages. The table does have 6 rows, which is why the result is 5, atleast i think. for ($i = 0; $i < $numberInResult; $i++) { ?> <div class="inbox-row"> <div class="inbox-data"> <?php echo $result["1"]; ?> </div><!-- --><div class="inbox-data"> <?php echo $result["2"]; ?> </div><!-- --><div class="inbox-data"> <?php echo $result["5"]; ?> </div><!-- --><div class="inbox-data"> Verwijderen </div> </div> // And i get to see 5 times the first message send to me. // Which should be 7 different messages send to me. // I also tried to use <?php echo $result["1"][$i]; ?> , this resulted in only having a single part of the String (which was something i learned thanks to this =D) So I would like to know the following: How to SELECT ALL the messages IN that table that are directed at ME? I want multiple columns selected, and echo'ed. I would love to thank anyone who answers this question in Advance =D
  7. Hello everyone i have a few PHP questions. First one: How can I say that for each image in a specified folder, it has to place that image? I have 10 images in the gallery folder (tomorow it can be 12). How do i tell my code to place an <img src="filename"> for each image? Second question: When displaying something that a user posted (example: guestbook). How can i allow ENTERS to be displayed when getting the data from the database? It always skips the enters. Third question: How exactly can i allow users to upload a file to a certain folder (must be a jpg file). The name of the image will be modified, and it should be resized to 200 kilobyte. Fourth question: Can i change certain parts of the text i get from the database (example: ":)" and change it to something differently? Say: "<img src="smily.png>"? Thanks in advance for the answers =D
  8. Sunamena

    Is this a long?

    Hello everyone. I want to create a system where people can post things. Like on this forum. But i am wondering. Should i save long text messages as one big and long string. Or should i use a different method? If you suggest a different method a link to a tutorial would be a big help n.n Thanks in advance kind mis or mister
  9. To answer the question: yes, that is certainly possible. How to do it: Depends on your HTML and CSS. Providing us this information would be very helpfull. Have you tried validating your CSS?
  10. Sunamena

    HR border image

    All i want is a simple border image as my HR. HTML should be: <hr> Simple enough CSS should be: ? Quite simple: ONE image as a SINGLE line, 100% height, and repeating horizontally.. This should not be quite difficult to do. But no matter what i try, the CSS is always doing things that i do not want it to do. So how would your CSS look like in order to achieve this task? I give you my sincere gratitude in advance!
  11. Sunamena

    side nav sliding

    It sounds like you want a drop down menu. You can find a tutorial here: https://www.w3schools.com/css/css_dropdowns.asp
  12. There is no CSS for a screen larger than 470 pixels if i see this correctly. You are also working with inline css and obsolete table sub tags such as border="0" cellspacing="0" cellpadding="0". CSS gets read like this: Use inline CSS Else Use the css in the head Else Use the css in the linked file. Maybe that is what is creating the conflict?
  13. I think Javascript or PHP is required to do the trick. I found the following solution on the internet: This is PHP code. So your page should be page.php Source: http://stackoverflow.com/questions/33581188/hide-audio-url-in-php
  14. Hello, Try to use a CSS file to style. Using inline CSS ( style="" ) will make editing your website hard, and will make it even harder to build one. One CSS file can be aplied to multiple webpages. As to solve your problem, why not consider using a Flex box? http://www.w3schools.com/css/css3_flexbox.asp
  15. Try something like this: CSS figure width:96%; margin:2%; figure img width: 100% display: block figure figcaption Same as figure img Adjust a little to your liking with colors borders and such. Also when using time you might want to consider using the html time tag. http://www.w3schools.com/tags/att_time_datetime.asp
  16. Well, it seems that the mistake was on my part. Thanks for the link =D
  17. If i am not mistaken: ul.topnav li:not(:first-child) {display: none;} not(:first-child) should be deleted. Not sure if the li before the :not should be deleted. Try that out =D
  18. You can also apply multiple classes like this <div class="cute-border nomobile"> </div> The cute-border can give a cute border, and can be reused (like another div, ...). The nomobile class is one i tend to use to say: display: none; When it is on a mobile device. While the validators are good, they are not perfect, they sometimes see errors which arent errors. Such as *::selection
  19. Technically you can. But most of the time you will only use three different styles and use width: xxx%, so it adjust to the screen width.
  20. Firstly: Consider the use of meta-tags in the <head> section. These are quite essential: <meta name="description" content="THIS TEXT WILL DESCRIBE THIS PAGE"> Search engines use this as. " TITLE DESCRIPTION " Next result... <meta name="viewport" content="width=device-width"> This makes the website easily adaptable to smaller devices, but a little more is required. As to the <body> Consider using <nav> instead of <div id="nav">. <nav> <main> and <footer> are new in HTML5. Consider changing "<p>Email Address: yourboijimbo@boi.com</p>" To "<p>Email Address: <a href="mailto:yourboijimbo@boi.com">yourboijimbo@boi.com</a></p>" This makes it possible to mail this person directly by using a mail program. Same for the telephone number. <a href="tel:+32NUMBER">... Note that +32 is a country code. This makes it possible to call by using Skype, or by using your smartphone. For your CSS: try using mobile first design. CREATE CSS FOR MOBILE @media (min-width: 680px) and (max-width: 999px) { CUSTOM CSS FOR TABLET (you can change min and max width to your liking) } @media (min-width: 1000px) { CUSTOM CSS FOR DESKTOP } Note that the Mobile CSS will always work (but can be changed thanks to screen size). Example: my mobile design says: width:100%, background-color: red. And my desktop CSS says: width:80%. Because the 80% is at a lowwer place, it will overwrite the 100%. But this code only applies when the screen has a width of 1000px or more. So on a smaller device, width will be 100%. The background-color will be red (in this example), regardless of screen width. #copyright { position: relative; left: 70%; bottom: 50px; font-size: 1em; font-size: 1vw; } Your font-size will be 1vw. The em will be overwritten (you can only have one font-size), so the 1 em is obsolete. Your #socialmedia has a position: ; and top: ; And do not contain numbers. It is also a good idea to validate your HTML and CSS. They are not perfect but may help you see some small errors. CSS validator example: https://jigsaw.w3.org/css-validator/ HTML validator example: https://validator.w3.org/ I hope this helps you in a way. =D
  21. There is no need for three seperate CSS files. It can all fit into one file And with a Mobile First design, you can reuse or modify content. Small example: a { color: green; } a:hover { color: red; } div, main, aside { display: inline-block; box-sizing: border-box; } .container { width: 100% } main { width: 100%; border-bottom: 2px solid black; } aside { width: 100%; } /* TABLET VIEW */ @media (min-width: 680px) and (max-width: 999px) { main { width: 70%; border-bottom: none; } aside { width: 30%; border-left: 2px solid black; } } @media (min-width: 1000px) { .container { width: 80%; margin: auto; } } ------------------------- As for a smartphone navigation, it is better to create a Desktop first navigation, and then use Smartphone nav CSS. Remember: CSS gets read from top to bottom. a { color: red; } a { color: blue } Will result in a blue color. Since the second will override the first.
  22. First of all i would strongly suggest using a single CSS file and try to work Mobile First. This means: First write your CSS for your Mobile Viewport. Then for tablets Then for desktops This makes it easier (as for example your color for certain div tags and a tags will be the same, width most likely varies) EXAMPLE: CSS code mobile @media (min-width: 680px) and (max-width: 999px) { CSS code tablet } @media (min-width: 1000px) { CSS code desktop } I have noticed that the device-width of iPhone 6 is 375px, and of iPhone 6 Plus is 414px. Both are larger than your max width, so it would give the Tablet view. Try right clicking and look at your code (or in short: F12) in Chrome, the settings applied might hint which stylesheet got applied. Off topic: Try to use <meta name="description" content="DESCRIPTION OF THIS PAGE"> This will be the description given under the title of your page when you appear on a search engine. And it boosts your SEO I hope this helps =D
  23. Sunamena

    Diagonal border

    Skew did not do the trick for me (since it did not seem to be responsive). And i did not try SVG. However, i managed to do it with this background: header { background: linear-gradient(130deg, rgba(0,0,0,0) 93%,rgba(0,0,0,1) 93%,rgba(0,0,0,1), rgba(0,0,0,1) 93.25%,rgba(0,0,0,0) 93.25%, rgba(0,0,0,1) 150%), linear-gradient(50deg, rgba(0,0,0,0) 6.75%,rgba(0,0,0,1) 6.75%,rgba(0,0,0,1) 7%,rgba(0,0,0,0) 7%); /* background: right -> and left <- */ But i can not seem to figure out how to fill the gap between the two lines as white (rgba(255,255,255,0.8)) Can anyone here help me? =D If it is to much effort, i can probably simply use a background image =P
  24. That works! Thankyou very much! =D
  25. How to make a number, in this case: 1500123.26441 to be displayed as 1.500.123,26 by using php? Code: echo $number; I did not realy know how to google this question, so i thought to ask it here. Thanks in advance =D
×
×
  • Create New...