VirtualMV/CSS/HelpDesk - Interactive
From WikiEducator
Overview
This page can be used in a group situation to discuss problems that can occur when coding. The problem is presented and after discussion a potential solution can be revealed.
Instructions
On this page you can post some JavaScript code that you are having trouble with.
- Please keep the code "simple" concentrating on the problem ... not a lot of code with a "small" problem.
- Post a tweet including the #vmvwiki tag so that we know there is a problem waiting to be solved.
- Paste the following wiki code when you edit, and put your code where shown.
{{vmv:Source|<source lang="javascript">
Code in here
</source>}}
Problem 1: A style doesn't want to be applied
You have created the following web page
<head> <title>Style sheet example 01</title> <style> bkcolour {color:red}; </style> </head> <body> <h1 class = "bkcolour">This text is in red</h1> </body>
however, the text remains black!.
Solution |
---|
Solution, in CSS a class selector is a name preceded by a full stop (“.”), so the style needs a full-stop before it (".bkcolor")
.bkcolour {color:red}; |
Problem 2: A style doesn't want to be applied in an innerHTML
You have created the following web page
h1 { color: #FF0000; }; h5 { color: #0000FF; };
however, the text remains black!.
Solution |
---|
Solution, check that the css object doesn't have a ";" at he end of each line - bizzare!
e.g. h1 { color: #FF0000; } h5 { color: #0000FF; } |
References
virtualMV | Superquick wiki guide | Please give me some feedback |
VirtualMV/CSS/HelpDesk - Interactive. (2024). In WikiEducator/VirtualMV wiki. Retrieved November 21, 2024, from http:https://wikieducator.org/VirtualMV/CSS/HelpDesk_-_Interactive (zotero)
|