Jump to content

Sunamena

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by Sunamena

  1. Sunamena

    Diagonal border

    Hello. I want a diagonal border. Starting from HERE HERE \ CONTENT / TO HERE TO HERE So the math: Top: 0% (first here) 100% (second here) Bottom: 10% (first to here) 90% (second to here). In short i want to achieve this. SHORT HTML <div id="ONE"> CONTENT </div> <div id="TWO"> CONTENT </div> SHORT CSS #ONE { width: 100%; border: 2px solid black; } #TWO { width: 80%; margin:auto; } So, i want div ONE to have a diagonal line towards div TWO. I have been trying and looking on Google, but did not find a solution to this problem. Thanks in advance. =D
  2. There are no form elements involved. It is a hyperlink ( <a href="meerInfo.php?zoekertjesid=<?php echo $zoekertjesid; ?>">Meer info</a> ). When someone clicks it, the variable $zoekertjesid should be added to the $_SESSION['zoekertjesid']. The page where you are directed to, gives product specifications. The Session starts like this: <?php session_start(); include "dbconnectie.php"; if(!empty($_SESSION["gebruikersid"])){ // TEST echo "Welkom " . $_SESSION["gebruikersnaam"] . "<br>"; // TEST echo "<a href='afmelden.php'>Afmelden</a>"; } else { header("Location: error.php"); } $maakZoekertjesID = $_SERVER['QUERY_STRING']; $_SESSION['zoekertjesid'] = preg_replace("/[^0-9,.]/", "", $maakZoekertjesID); ?> The green text is how i currently put the "zoekertjesid" into the $_SESSION. This works, but when completing this form: <h5>Doe een bod</h5> <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p> <label for="bod">Uw bod: </label> <input type="number" name="bod"> </p> <p> <input type="submit" value="Verzenden" name="submit"> </p> </form> <?php /* if(isset($_POST["submit"])) { $sql = "INSERT INTO gastenboek (zoekertjesid, gebruikersid, bod, datum) VALUES (:zoekertjesid, :gebruikersid, :bod, :datum)"; $stmt = $db -> prepare($sql); $stmt -> bindParam(':zoekertjesid', $zoekertjesidbod, PDO::PARAM_STR); $stmt -> bindParam(':gebruikersid', $gebruikersidbod, PDO::PARAM_STR); $stmt -> bindParam(':bod', $bod, PDO::PARAM_STR); $stmt -> bindParam(':datum', $datum, PDO::PARAM_STR); $zoekertjesidbod = $_SESSION['zoekertjesid']; $gebruikersidbod = $_SESSION['gebruikersid']; $bod = htmlentities($_POST['bod']); $datum = date("Y-m-d"); $stmt -> execute(); } */ It gives errors (since it updates the URL, and the zoekertjesid, thus not finding your product) I hope my question is now a little more clear =D And thankyou so much for always supporting and helping me and other people on this forum! =D I think you would be a great teacher.
  3. Greetings all, What i want to achieve is the following: - Visitors are browsing products. Each product has an unique ID. - When a visitor wants more info on a product, he or she clicks on it and sees more information about the product. The ID of the product must be saved in the SESSION. I did this as shown below. I used part of the URL (since the ID is a number, i cut all the non number characters). This worked perfectly fine, untill i use a form (this one: <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> ) on that page. Idealy i would love to have an onclick:<?php $_SESSION['zoekertjesid'] = $zoekertjesid ?>, which i would then implement in my foreach code. I tried this, but all it did was making my SESSION ID and the content i received that of the last ID generated (because the on click is done AFTER the foreach is completely finished. I would apreciate it very much if i can get some advise here. Below you can see the relevant code (i left out the parts of the pages that i deemed irrelevant). Page "zoeken" foreach ($result as $row) { // Declareren van variabelen, dit gaat mijn werk wat vergemakkelijken $zoekertjesid = $row['zoekertjesid']; $gebruikersid = $row['gebruikersid']; $titel = $row['titel']; $omschrijving = $row['omschrijving']; $rubriek = $row['rubriek']; $prijs = $row['prijs']; $aantalAfbeeldingen = $row['aantalAfbeeldingen']; ?> <div class="productdetails"> <h2 class="titel"><?php echo $titel ?></h2> <div> <img src="images/<?php echo $zoekertjesid; ?>/thumbs/thumb_<?php echo $zoekertjesid; ?>_1.jpg"> <h5>Omschrijving</h5> <p><?php echo $omschrijving ?></p> <h5>Vraagprijs</h5> <p><?php echo $prijs ?> EUR</p> <p> <a href="meerInfo.php?zoekertjesid=<?php echo $zoekertjesid; ?>">Meer info</a> </p> </div> </div> <?php } Page "meerinfo" <?php session_start(); include "dbconnectie.php"; if(!empty($_SESSION["gebruikersid"])){ // TEST echo "Welkom " . $_SESSION["gebruikersnaam"] . "<br>"; // TEST echo "<a href='afmelden.php'>Afmelden</a>"; } else { header("Location: error.php"); } // TEST print_r($_SERVER); // TEST echo "<br><br><br>" . $_SERVER['QUERY_STRING']; $maakZoekertjesID = $_SERVER['QUERY_STRING']; $_SESSION['zoekertjesid'] = preg_replace("/[^0-9,.]/", "", $maakZoekertjesID); //TEST echo "<br><br><br>". $_SESSION['zoekertjesid']; ?>
  4. Hello everyone. Thanks in advance for helping me again. It is very much apreciated. This is what i have: And this is what i want to achieve: It is a <li> element. How do i make the background color/gradient start 10% after rge background image? Same for the border. Thankyou very much =D
  5. I am following a Business Management Course and it are general tasks for everyone (wether your going to open a shop, or start as a webdevelopper, the tasks are the same, making it a little hard for webdevelopment). I have found an alternative. I have looked at how many websites existed from year to year, and how many internet users are out there. I know the average household will not spend anything on web development. We have an entire list with what the average household spended on videogames, even creating applications. And purchasing Go-Karts. Long story short. Total money spend on webdeveloppers / households = what i needed. But the alternative will suffice . Thanks anyway =D
  6. An exact number, or a well tought gues by you webdeveloppers for the following: how much money does an average household spend on Webdeveloppers. Here is an example: Year How much the average household spend on bread 2012 900 2013 912 2014 922 2015 936 As to see if the demand for webdeveloppers is increasing or decreasing. Thankyou
  7. Greetings, Question 1: I want a width of example: 70% on my viewport, resizing will not alter the wiidth. I tried 70vw, but this did not do the trick. How can i achieve this? Question 2: When my screen gets smaller, I want to change the % used on certain DIV widths, how can I achieve this? Thanks in advance =D
  8. Hello, I am tasked to look at how much the average person spends on a webdevelopper. And this for the last few months. Can someone give me exact numbers, or information based on their personal experiences. Thanks in advance! =D
  9. Thankyou very much! This solved my problem =D
  10. I placed a few orderd lists inside another orderd list to have a nested structure. On my screen, i have what i was going for and it works perfectly and works user friendly. However, HTML validator says I have a few errors (only on my nested list). I have cut down the code to sayd code. So how should i solve this problem? Is this an error inside the validator itself? Since it seems to be working perfectly. Kind regards =D Code:
  11. I understand now. I now receive all of the data, and my biggest problem is solved. How wonderfull! New question: Can i make certain text bold in the message? (i tried <b></b> but it didn't work. Problem still existing: How to check with PHP if the "akkoord" checkbox is checked? Problem still existing: I can't find how to assign the senders e-mail adress as the sender. mail($myemail, $meetnaam, $message); Where do i fit in $email in that function? I always seem to get an error whenever i do so. Thanks in advance =D And thanks again for your beuatifull explaination! =D
  12. Hello everyone! This is my very first PHP document, and i must admit, i have no experience or knowledge about PHP, i looked at an example and tryd to connect the dots to create this one. It works better than expected, but I do encounter a few issues, where I would very much like to have some advise with. Problem 1: The data from the form gets mailed to me, but even though everything in the form is filled in, I would only receive the "E-mail: INPUT@HOTMAIL.COM" The rest of the data like: "Meetnaam: " Were blank, as if the data did not exist. The form did check correctly wether this information was provided, but seems not to provide so in the e-mail send to me. Problem 2: $meetnaam should be the subject of the e-mail. Problem 3: $email should also be the e-mail adress asigned to the sender, as such, I can easily reply. Problem 4: The checkbox, $akkoord, should be checked, if not, an error should be displayed, I do not know how to do this. Your help with this problem is very much apreciated! Once again: I am new to this, so try to be very specific (if you would even be so kind, type it out and put the update in bold text) =D This is the PHP and HTML code I used respectively: PHP HTML
  13. Like this example (they use a background for this but I wonder if there is a more apropiate way to do this. http://hetperspectief.net/index.html
  14. Hey there. I was wondering if this is possible. This is what i want to achieve on my page (within a div or within a body). first 15%: color:gray center 70%: color:white last 15%: color:gray Is this possible? How can one achieve this? Thanks in advance =D
  15. I want a very simple click button. When clicking on button One (in the example below i used a list element, not sure if this is the correct code to use for this)., Div "one" should be "display : block; " and Div "two" should be "display : none; " and vice-versa. Having no Javascript experience yet, but needing this small part of code (if it is in fact JavaScript), can anyone or help me with this? Kind regards =D <div id="wrapper"> <nav class="buttons"> <ul> <li>ONE</li> <li><TWO</li> </ul> </nav> <div id="one"> <p>TEXT</p> </div> <div id="two"> <p>TEXT</p> </div> </div>
  16. I don't know how to do this and maybe you guys know how to do this. I want to have the following: <p> Hello, I am an Example. </p> When someone hovers over Example, it has a box appearing on top of it (just like <abbr> would, but <abbr> should be used for words like: AFK, LOL, HTML,...). So how do I make that happen and how do i style the box correctly? This is what I have in mind for the box: CSS width:100px; height:auto; background-color:rgba(255,255,255,0.8); border:2px solid rgba(0,0,0,0.8); border-radius:15px; padding:5px; So how do I make that box appear? (it should appear next to your mouse cursor) Thanks in advance =D
  17. In this topic they suggested to let them all float to the left or right within a parent division: http://w3schools.invisionzone.com/index.php?showtopic=44996
  18. 1. Thanks, I have learned something new =3 2. I have removed the margin =3 3. When i try to add a border, and give a % number, it does not show any borders. Either way, my lessons webdesign started again =D We will go deeper this half year on positioning elements and DIVs =3 But this forum has realy been a big help in my learning proces =D
  19. Hey, I have been googeling, and trying to achieve this with Div's: 1 2 3 4 5 But instead i get: 1 2 3 4 5 What am I doing wrong? HTML code (i do have images, but i left out that part of the code) <div id="navbar"> <div id="work"> <img ...> </div> <div id="about"> <img ...> </div> <div id="foto"> <img ...> </div> <div id="language"> <img ...> </div> <div id="contact"> <img ...> </div> </div> CSS code #navbar {width:100%; background-color:rgba(255,255,255,0); } #work {width:15%; float:left; } #about {margin-left:15%; width:15%; } #foto {margin-left:30%; width:40%; } #language {margin-left:70%; width:15%; } #contact {margin-left:85%; width:15%; } Thanks in advance =D
  20. HTML <div id="wrapper"> <div id="leftone"> CONTENT </div> <div id="rightone"> CONTENT </div> </div> CSS #wrapper {width:100%; } #leftone {width:50%; } #rightone {width:50%; float:right; } I think that is what you are looking for?
  21. Sunamena

    Random

    I want to include something random by using php. How do i do this? I am very new to php. I will use it to display a random image, each has it's own unique url. Example: Hello, your lucky color is X. X is randomly chosen from a list and could be: Red Orange Green Blue Red Pink How would i do this? Thanks in advance =D
  22. Hello! I am quite new to CSS, and have learned much the past months, but I still have some things that trouble me and i struggle to find a sollution. I do work with div tags. Problem 1: At the right, you can see "New Comics" with an unorderd list consisting of two items at this moment. The date is "float: right". it shows good on my screen, and any other medium to large screen resolution, but once it gets to small, the date gets ON the border line. I tried: min-width:300px Result: It jumped UNDER the content that should be on the left of it. URL: http://www.nimblefeather.com/index.php Problem 2: The images here are floating right and left respectively. Again, on my screen, or any other large screen, there is no visible problem, but once you start resizing the screen, the text does no longer fit into the div's. I tried: min-width. Result: No visible change. URL: http://www.nimblefeather.com/comics.php Problem 3: When resizing the width of the comic images gets adjusted, but the height does not, resulting in well, a weird image. The height should also change accordingly. In addition, on smaller screens the word (heading1) Chapters sometimes sticks out of it's Div. How would this be solvable? URL: http://www.nimblefeather.com/comics/drawingshady/thefutureofsumarnya/chptr1.php Question: Is it possible to make the website appaer like on my screen on other resolutions as well? By simply "resizing it" to their resolution (example: My resolution: 800 x 600, and visitor X resolution 400 x 300, to let the CSS resize the page to 50%, including text and images,...?) Thanks in advance =D
  23. Hello everyone! How can I use HTML and CSS to have one image as a background for my body? It should not repeat, it should just be over the entire screen. Kind regards, Sunamena
  24. Greetings all, I have some issues with this HTML. HTML: <!doctype html> <head> <title>Untitled</title> </head> <body> <ul class="headerul"> <li><a href="#top">CANVAS</a></li> <li><a href="#top">kijk online</a></li> <li><a href="#top">programmagids</a></li> <ul class="floatright"> <li><a href="#top">delen</a></li> <li><a href="#top">zoeken</a></li> </ul> </ul> </body> </html> Error code from w3C validator (): Error: Element ul not allowed as child of element ul in this context. (Suppressing further errors from this subtree.) From line 15, column 3; to line 15, column 25 a></li>↩ <ul class="floatright">↩ < Contexts in which element ul may be used: Where flow content is expected. Content model for element ul: Zero or more li and script-supporting elements. What I am trying to do: http://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal_black_right So how to solve this problem? Part of what was requested was to use only propper HTML, with this validator not showing any errors. And those two items should be floating right. In addition, inline style is not allowed. Is it possible to solve this? Or to create a table for this? Thanks in Advance!
×
×
  • Create New...