Jump to content

Search the Community

Showing results for tags 'class'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. I am working with an HTML5 template that supports youtube video backgrounds in a DIV. When I scale the browser window to see how the responsivnes behaves, I notice that the videos crop left/right, top/bottom, depending on the aspect ratio of the DIV. For my purposes, I would need the videos only crop on the right and top only, so that the bottom left is always visible. As I am not a pro I have been doing a lot of trial and error on this, but cannot get it working. I actually need to have two classes available. One where the video scales from the bottom left and one where it
  2. BACKGROUND: Many moons ago it was suggested that I create a CRON job that would read into a MySQL table the results of a method call to a Matomo API call and thereby speed up the rendering of data for visitors to the Grammar Captive website. I have since come to learn that this technique is called data translation. The following code creates a class object that when inserted into a foreach loop is suppose to fill the properties of the object for further manipulation. Unfortunately it does perform the intended task. THE CLASS class TranslateMatomoAction { public $mysqli_obj; p
  3. I have a challenge to solve regarding PDO and executing prepared statements inside a class. The way I made the script now is giving an error as output, though the outcome required is okay. The error type is: Fatal error: Uncaught ArgumentCountError: Too few arguments to function fruit_stock::get_fruit(), 0 passed in Could it be the error is caused because PHP requires that the execute() part should be defined or something like that? I really dont get what to do with it or with $stmt . . This are the scripts and the table so you can test it yourself. I'm curio
  4. BACKGROUND: I am creating a custom class for use with PHPMailer that will hopefully eliminate redundancy in its application and even facilitate my use of the class. One of my questions deals with inheritance and the other has to do with scope. My current use of PHPMailer is quite simple. It consists of a folder containing four files: three of these are PHP class definitions and one of them is an autoloader. PHPMailer is called in the following manner: require_once '../../../PHPMailerAutoload.php'; $mail = new PHPMailer; Once the instance $mail has been created I have access to
  5. BACKGROUND: I am in the process of writing a class that will match and update rows in a MySQL data base. The field that contains the values against which a match is to be discovered must be indefinite. The values that it can contain are either 0 or 1 as defined by an ENUM field type. I know both the desired field and value before the matching routine commences. I want the UPDATE routine to set the value of the field to its opposite: 0 => 1 or 1 => 0. CURRENT STATE OF THE CODE: <?php class VeriFirm { private $mysqli_obj; private $username; private $email; priva
  6. I'm quite new to coding, and have big trouble understanding the logic in even the supposedly easiest languages to learn. However, what is the functional differences between .class and #id? Is there situations where only either of them can be used? I can't see any difference by reading the W3 pages about them (respectively https://www.w3schools.com/cssref/sel_class.asp and https://www.w3schools.com/cssref/sel_id.asp).
  7. https://www.w3schools.com/w3css/w3css_sidebar.asp Hello. I'm researching the above page as a starting point, and ive also googled and found there is no "CLASS" version of the getElementById command. basically, I want to do a full table, but a number of rows (by criteria) will be given a class name. what i am after is a way to "hide" or remove those selected rows from the table. but if i press a button, the rows will re-emerge & show themselves into the table - NOT as a separate / distinct table, but seamless into the same table. has anyone got a W3CSS (javascript) command/pr
  8. <?php /* * DB Class * This class is used for database related (connect, insert, update, and delete) operations * @author CodexWorld.com * @url http://www.codexworld.com * @license http://www.codexworld.com/license */ class DB{ private $dbHost = "..."; private $dbUsername = "..."; private $dbPassword = "..."; private $dbName = "..."; public function __construct(){ if(!$this->db){ // Connect to the database $conn = new mysqli($this->dbHost, $this->dbUsername, $this->dbPassword, $this->dbName);
  9. Hello! Is there any way I can add a specific class to svg tag? I try to do that: .svgclass{ stroke: lightblue; stroke-width: 2px; display:inline-block; position:absolute; z-index:1; right: 0px; top: 10px; margin:0px 0px 0px 0px; padding:0px 0px 0px 0px; height:80px; width:1px; } And in the body: <svg class="svgclass"><line x1="0" y1="0" x2="0" y2="80" /></svg> This is not work... (And the svg style is set good, cause when I remove the class from the svg, and change in the css file to svg its all great..) Thanks! (:
  10. Can anyone sight an example to demonstrate the use of Responsive Class and Responsive Grids of W3 CSS? It would be great to understand, if the piece of code shows how to use them together.
  11. Please consider the following code and answer the question. Please do not omit your reasons for answering as you did. CODE SYNOPSIS: This handy piece of code places a constraint on the number of words that can be placed in a selected <textarea> element. In addition, it displays the current status of the selected element as one enters text. This code, less the iterative aspect, has been tested for one <textarea> element, but I wish now to expand it to include many <textarea> elements. In order to do this I created a mixed associative array (see below) whose data I us
  12. My code doesnt work the way I want it. The goal is a gradient background. I made an external style sheet. Like this: .grad{ height: 1020px; width: 1900px; /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#feffff+0,ddf1f9+35,a0d8ef+100;Blue+3D+%2318 */ background: #feffff; /* Old browsers */ background: -moz-linear-gradient(top, #feffff 0%, #ddf1f9 35%, #a0d8ef 100%); /* FF3.6-15 */ background: -webkit-linear-gradient(top, #feffff 0%,#ddf1f9 35%,#a0d8ef 100%); /* Chrome10-25,Safari5.1-6 */ background: linear-gradien
  13. I love what w3schools is doing with the SQL tutorial - good stuff. I noticed that one of the most fundamental elements of w3schools (the "Try it now" button) goes missing about half-way through the SQL Tutorial. May I ask why? I teach sql at a local community colleg. I have gone through several textbooks with mixed results, and I am always keeping my eyes open for new ways to teach. I would love to incorporate w3schools SQL tutorial into my class; do you have a db dump available for download of the tables you use? One of my lessons will be having students figuring out how to get the data
  14. I was wondering if javascript or jquery could change the look of a CSS class in a function called by a onclick(). For example I have a #first and also a .unclicked and .clicked. And i have a input type="button" id="first" class="unclicked" onclick="function()". function(){ change class from unclicked to clicked on first then some other code } Inside the function how do i change the class from unclicked to clicked. I know you haft to use the document.getid(first).style, but I'm not sure how to get the function to change it.
  15. hello, i am learning PHP, but when i read the next section PHP exception, i do not understand about "class", "public" and why it is used "extends", i hope you can help me solve the problem!!!, Thank you. So i am trying to learn English, if i have misspelled i hope you forgive!!!
  16. Hello, I have a master div ID element which contains smaller class elements (boxes) which are currently set to float left. I would like these class elements to be centred within my master div and remain centred when the windowm scales. There also needs to be a space between the class elements (boxes) and there are two class elements positioned next to each other. My master div ID element which encapsulates the smaller classes has the following CSS #master { border: none; width: 100%; height:auto; margin-top: 0; margin-right: auto; margin-
  17. In trying to make a "talkbubble" styled div- box change colors completely upon being clicked, I ran into a problem of getting the :before pseudo element that I'm using (to shape the arrow for the talkbubble) to actually change colors with the rest of the element. My script is http://jsfiddle.net/petiteco24601/3xuuq2fx/. When I couldn't get it to work, I did some research and it seems what/how to control pseudo-elements is a question that most web developers seem shaky about. For the most part, a lot of what I found was basically saying that there's no way to really force javascript on a pseud
  18. I have created a calendar for my golf league and wish to color code the days that we play with a specific color and other events different colors. We play on a thursday so I would like to color code all thurdays "green" My question is, what would be the best and most professional way to do this? Would creating an external css file and giving each Thursday the same ID or class name? Would a Class designation be better? Would the following coding example be appropriate? Any help would be greatly appreciated Thank you CSS file: .thursday { bgcolor: green; } HTML file:
  19. Hello once again, i will do this one short, since i feel stupid asking about it, but its a must since i cannot remember, and might be a rookie question -.-'... anyhow, here is my css: .chat_div_bottom_global_friend_list_button a:hover { text-decoration:none; color:#CDCDCD; background-color:#900; } .chat_div_bottom_global_friend_list_button a:link,a:visited,a:active { text-decoration:none; color:#CDCDCD; } here is my html: <span class='chat_div_bottom_global_chat_rooms_button'> Chat Room (Public)</span> <span class='chat_div_bottom_global_friend_list_button
  20. Hello Internet. Back for another question. I am using CSS styling to make an image larger during a hover event. I have made the code work for IE but Safari does not like it. Actually what Safari is doing is once you click on the image it will show the original image AND the hover image together and separated. The desired effect is that once you hover over an image it will increase the image size. Please help... Here is my CSS code:.thumbnail{position: relative;}/*CSS for enlarged image*/.thumbnail span{position: relative;padding: 0px; left:0px; border: 0px solid #000000;visibility: hidden; col
  21. This question is specific to named CSS selectors. There is probably an obvious answer to this question, so I apologize ahead of time. If I wanted to apply a property to a bunch elements I would use a class; could I also use an id to give individual properties to any of those elements? Basically, can a single element have a class and an id? Can there be multiple classes? If so, is this proper html to do it this way, for all the main doctypes?I'm just confused, because I don't think I've ever seen any examples whilst learning, in which an element has a class and an id. Are there any other method
  22. Hellooo.. :DCould you please tell me the difference between id and class?I think that it is the same..Take a look ! Using ID : <!DOCTYPE html><html><head><style>#center{text-align:center;}</style></head> <body><h1 id="center">Center-aligned heading</h1><p id="center">Center-aligned paragraph.</p> </body></html> Using Class : <!DOCTYPE html><html><head><style>.center{text-align:center;}</style></head> <body><h1 class="center">Center-aligned heading</h1><p c
  23. terryds

    About classes

    Hey, everyone.. :DI want to ask something about classes..Can you tell me the difference between p class, span class, and other classes?Thx before
  24. I have 2 questions. First one is most important! I attach the php, and the css files here for you (Hello dsonesuk ) to look and maybe help me with this. I may know how to do this, but then i might need to change it all and do it all from a a beginning again. So i would like a fast change advise for this problem. Anyway here it goes: I have the class called "sidboxes" wich are located to the right of the container(browser). And in that class 3 classes - the classes are called sidbox1, 2, and 3 for each of the 3 boxes. So i have now as you can see in the css an position:absolute. When i minimize
  25. ckrudelux

    parent::

    <?phpclass test { private $messages = array(); public function addMessage($message){ $this->message[] = $message; } public function getMessages(){ return $this->messages; } } class test2 extends test{ public function getMessages(){ $this->addMessage("Last message."); return parent::getMessages(); }} $test2 = new test2();$test2->addMessage("Hello World");print_r($test2->getMessages()); In my world of understanding this should return an array with 2 entries but I get an empty array back, anyone know what's wrong? What the code does is what class test2 overwr
×
×
  • Create New...