How do I transfer the style code to my external css file? I think using .gamelist won't work because of the <form> or <input> stuff. I know that I can just leave the style in the html file but I like everything to be as neat and organized as possible.
Here's the html code:
<div id="sidebar">
<p class="gamelist">
<FORM>
<input type="image" src="images/mariosadv.jpg" border="2" style="border:2px solid black;max-width:150px;" value="Enter Protected Area" onClick="passWord()">
</FORM>
<FORM>
<input type="image" src="images/mariosadv2.jpg" border="2" style="border:2px solid black;max-width:150px;" value="Enter Protected Area" onClick="passWord()">
</FORM>
</div>
Here's my simple Javascript function:
function passWord() {
var testV = 1;
var pass1 = prompt('Please Enter Your Password',' ');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1.toLowerCase() == "letmein") {
alert('You Got it Right!');
window.open('mariosadv.html');
break;
}
testV+=1;
var pass1 =
prompt('Access Denied - Password Incorrect, Please Try Again.','Password');
}
if (pass1.toLowerCase()!="password" & testV ==3)
history.go(-1);
return " ";
}
Here's the css I tried:
.gamelist img {
display: block;
border: 2px solid black;
width:150px;
margin: 5px 0px 5px 0px;
}
This is what I have with Javascript https://i.sstatic.net/RThLl.jpg
And this is what I want but without the Javascript https://i.sstatic.net/ZBcTI.jpg
If any additional information is needed please ask before rejecting my question. Thanks.
gamelist inputas your CSS selector