How to add a link and downloadable file to this code? - html

Hey all I am hoping you guys can help me? I am trying to edit this and need to be able to add a url when someone clicks the button. Also the ability to download a file. What would I add for this?
<div class="optin" data-lb="editable-optional">
<div class="shadow"></div>
<img src="img/books-small.png" class="minor-image" />
<p>Enter your email to download the guide</p>
<div>
<input id="header-button" type="submit" value="Free Instant Access »" onclick="javascript:return false"/>

Just use the download tag. You can add the image inside the a tag.
<div class="optin" data-lb="editable-optional">
<div class="shadow"></div>
<a href="img/books-small.png" download><img class="minor-
image"/></a>
<p>Enter your email to download the guide</p>
<div>
<input id="header-button" type="submit" value="Free Instant Access »" onclick="javascript:return false"/>

Using <div> s is not recommended by W3C standards.
Why don’ t you just use the hyperlink <a> tag:
Free Instant Access »
You can use CSS styles to make the hyperlink <a> look like a buttom
(taken from W3Schools):
a:link, a:visited {
background-color: #f44336;
color: white;
padding: 14px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a:hover, a:active {
background-color: red;
}

Related

How can I make this text and image not overlap

I know this looks very simple, but I have been trying to figure out a solution for an hour now. I have an "a" element with text and an image inside. The problem is that the image goes below the text, and I want them lined up.
a {
text-decoration: none;
color: #fff;
}
a:hover {
color: #ff5c33;
text-decoration: none;
cursor: pointer;
}
#nav-user-logo{
max-height: 16px;
}
<!-- Header right part -->
<div class="dropdown">
<a>
User123
<img src="Images/Icons/user.svg" id="nav-user-logo" alt='User123'>
</a>
<div class="dropdown-content user-dropdown-content" >
<a>AW Admin</a>
<a>Account Settings</a>
<a>Change Password</a>
<a>Logout</a>
</div>
</div>
I didn't have the issue myself but you can do
#nav-user-logo {
max-height: 1em;
display: inline;
}
to guarantee it is inline with the text.
By defect, any browser, with your css will display the image side by side as, I think, you want:
example with your code:
a {
text-decoration: none;
}
a:hover {
color: #ff5c33;
text-decoration: none;
cursor: pointer;
}
#nav-user-logo{
max-height: 16px;
}
<div class="dropdown">
<a>
User123
<img src="https://www.ajvs.com/redirect/5/Agilent_IMG300_UHV_R0343301_1,8926cf9ec9ce009a52f3ea8866b07f5f" id="nav-user-logo" alt='User123'>
</a>
<div class="dropdown-content user-dropdown-content">
<a>AW Admin</a>
<a>Account Settings</a>
<a>Change Password</a>
<a>Logout</a>
</div>
</div>
Probably, you have some kind of "reset" css sheet that is turning all your images as display:block It's quite common in many wordpress themes. You may need to overwrite these css adding img {display:inline-block} or similar rule. Calling to the id image or class to not break your whole theme.
Turns out the issue was something super simple. This code is in a header, on the right side, and the "a" element was too small to display the code and image side by side. I fixed it with the following:
<!-- Header right part -->
<div class="dropdown">
<a style="display:inline-block; width: 150px;">
User123
<img src="Images/Icons/user.svg" id="nav-user-logo" alt='User123'>
</a>
<div class="dropdown-content user-dropdown-content" >
<a>AW Admin</a>
<a>Account Settings</a>
<a>Change Password</a>
<a>Logout</a>
</div>
</div>

Icon color not changing when focusing on input

I have been trying a couple of methods here to make my font-awesome icon colored white as I focus on my input... but nothing seems to work.
My code looks like this:
HTML
<div id="container">
<form id="form">
<input type="password" placeholder="Code" required id="input">
<div class="icon"><i class="fas fa-user-secret"></i></div>
<hr>
<br>
<center>
<button id="submit" type="submit">Submit</button>
</center>
</form>
</div>
I've tried doing:
input:focus + .fas-fa-user-secret {
color: #fff;
}
input:focus + .fas {
color: #fff;
}
input:focus + .i {
color: #fff;
}
But none of the above CSS code works. Not even the text in the input is white, but whenever I remove the + and the rest it does work for input.
Any help on this is appreciated, looked at every thread about making icons a different color when focusing on input.
Thanks.
You need to use input:focus+.icon since you have your icon inside the .icon div.
input:focus+.icon {
color: #ff0000;
}
input:focus {
color: red;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer"
/>
<div id="container">
<form id="form">
<input type="password" placeholder="Code" required id="input">
<div class="icon"><i class="fas fa-user-secret"></i></div>
<hr>
<br>
<center>
<button id="submit" type="submit">Submit</button>
</center>
</form>
</div>
The problem is that you are using general sibling combinator, which select its siblings right after it, which is a <div>, not the icon.
input:focus + .fas-fa-user-secret {
color: #fff;
}
What you may want to do is set color: inherit to the icon, and then set desiring color for the div via this CSS selector and it will be fine
input:focus + div {
//your style
}

Why isn't my code passing the W3 validator?

I have to use codepen to write up a website and then get my code to pass the W3 validator. The problem is that, whichever way I try to check the code, it comes up with different error messages.
When I copy and paste the whole code into W3, it says that I need <DOCTYPE!> and the other things like that (that I'm not allowed to type into codepen, without getting an error message on that end).
However, when I go into debug mode and put the URL directly into W3, it comes up with a load of errors that don't exist- the code it specifies isn't anywhere in my code.
Has anyone else had issues getting codepen validated by w3?
edit: codepen is https://codepen.io/johng003/pen/rNjrrOb
:root{
font-family:"Montserrat", serif;}
body{
background-image:url("https://i.imgur.com/kfFhV7c.png");
}
#nav-bar{
position:fixed;
width:100%;
top:0px;
left:0px;
background-color: rgb(235, 52, 128);
padding:13px;
font-family:"Playfair Display", serif;
font-size: 18px;
z-index:98;
}
.nav-link{
margin: 0px 40px 10px 40px;}
.nav-link:link {
color: yellow;
background-color: transparent;
text-decoration: none;
}
.nav-link:visited {
color: white;
background-color: transparent;
text-decoration: none;
}
.nav-link:hover {
color: #F8B8E4;
background-color: transparent;
text-decoration: underline;
}
.header-img {
position:fixed;
left: 91%;
top:0%;
max-width: 9%;
min-width:7%;
height: auto;
z-index: 99;
}
h1{
position:relative;
left:40vw;
top: 25px;
font-size:40px;
color:rgb(235, 52, 128);
}
.offers:link {
color: rgb(235, 52, 128);
background-color: transparent;
text-decoration: underline;
}
.offers:visited {
color: purple;
background-color: transparent;
text-decoration: none;
}
.offers:hover {
color: purple;
background-color: transparent;
text-decoration: underline;
}
.donut-ignore{
font-size: 20px;
position:absolute;
top:75px;
left: 39vw;
}
h2{
color:rgb(235, 52, 128);
font-size: 25px;
}
.gallery-heading{
position:relative;
top: 15px;
}
.videointro{
font-size: 18px;
}
iframe{
border-width: 0px;
}
.donut-gallery{
display:flex;
flex-direction:row;
justify-content:space-around;
align-items:center;
flex-wrap:wrap;
}
#donut1, #donut2, #donut3, #donut4, #donut5, #donut6{
max-width:40vw;
clip-path:circle(45%)
}
#donut3{
max-height:300px;
}
#donut2{
max-height:465px;
}
#media (min-width: 400px){
#donut1, #donut2, #donut3, #donut4, #donut5, #donut6{
max-width:400px;
}
.flavours{
font-size:18px;
}
.largertext{
font-size: 18px;
}
.flavourlist{
font-size: 18px;
position:relative;
padding: 0px 0px 20px 0px;
}
.orderonline{
position: relative;
top:10px;
}
.instoreheader{position:relative;
top: 10px;}
<body>
<header id="header">
<nav id="nav-bar">
Donut Gallery
Order Online
Order In Store
</nav>
<img src="https://i.imgur.com/NK8Zbmn.png" alt="The store's logo; a black and white drawing of a donut" class="header-img">
</header>
<main>
<h1><em> Divine Donuts </em></h1>
<p class="donut-ignore"> Donut Ignore Our Fabulous <a target="_blank" href="https://www.donutdigest.com/blog/" class="offers"> Offers! </a> </p>
<article>
<h2 class="gallery-heading"> Donut Gallery </h2>
<p class="videointro"> This is how our divine donuts are made...</p>
<iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/DePRyZE5sn4" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br>
<div class="donut-gallery">
<img id="donut1" src="https://i.imgur.com/yueQzkr.jpg" alt="A dozen donuts with sprinkles" class="donutimage1">
<img id="donut2" src="https://i.imgur.com/QfhD5o4.jpg" alt="A tower of colourful donuts" class="donutimage2">
<img id="donut3" src="https://i.imgur.com/oXPlX3S.jpg" alt="A donut with galaxy mirror glaze" class="donutimage3">
<img id="donut4" src="https://i.imgur.com/guK5rGP.jpg" alt="Halloween themed dounuts" class="donutimage4">
<img id="donut5" src="https://i.imgur.com/ER3hBG4.jpg" alt="An oversized pink sprinkles donut" class="donutimage5">
<img id="donut6" src="https://i.imgur.com/HOzPDAg.jpg" alt="A donut with cookies and cream filling" class="donutimage6">
</div>
</article>
<section id="buyers">
<div class="flavours">
<p> <strong> Decide on next month's special flavour now:</strong> </p>
<form action="https://www.freecodecamp.com/email-submit">
<fieldset>
<legend> Choose the next flavour of the month</legend>
<label for="Banana-and-peanut-butter"> Banana and Peanut butter</label>
<input id="Banana-and-peanut-butter" value="Banana" type="radio" name="donut-type">
<button accesskey="b"> or press b </button>
<label for="Marshmallow-and-salted-caramel">Marshmallow-and-salted-caramel</label>
<input id="Marshmallow-and-salted-caramel" value="Marshmallow" type="radio" name="donut-type">
<button accesskey="m"> or press m </button>
<label for="Blueberry-and-apple">Blueberry-and-apple</label>
<input id="Blueberry-and-apple" value="blueberry" type="radio" name="donut-type">
<button accesskey="a"> or press a </button>
<button type="submit">Submit</button>
</fieldset>
</form>
<br>
<p class="largertext"> Our past flavours of the month were...</p>
<ul>
<li class="flavourlist"> April: Rainbow Surprise </li>
<li class="flavourlist"> March: Bubblegum and popping candy </li>
<li class="flavourlist"> February: Biscoff and Oreos </li>
</ul>
</div>
<div id="order-online">
<h2 class="orderonline"> Order bespoke creations online </h2>
<p class="largertext"> To make large or bespoke orders, please fill out the form below and one of our donut devotees will be in touch before the end of the day... </p>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<input type="text" placeholder="Name" required>
<input type="number" placeholder="Phone number" required>
<input id="email" name="email" type="email" placeholder="Email" required>
<input id="submit" type="submit" value="submit">
</form>
</div>
<br>
<div id="order-instore">
<h2 class="instoreheader"> Order in-Store </h2>
<p class="largertext"> To order in store, simply pop to our Antartica branch.
Opening times are 10AM-6PM 7 days a week. </p>
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBYVFRgWFhYYGBgYGBwcGhkYHBwYGR4cHCEcGRocGBwhIy4lHB8rIRkdJzgmKy8xNTU1GiQ7QDszPy40NTEBDAwMEA8QHxISHzQrJSUxNDQxNDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ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EWUQBhFlEAYRZRAGFqxNPOxzerStyhV8J8imuxM8i9gAFzJ1ERHkd1pdp6j6hXMf43earO/Zdq6OX6YRTRMRf4fw4VGF2aCCQBb0J7K/geHuY6SbNO3xSNY2/PNa/wDT+j/Nv3XYXNdPk3iVwYRZRYmphFlEAYRZRAGFyn4l0PeX3Y8cjSBIaQHTuZuRddZeTx/8x/8Ae76laQtZnfR1+J4im+kSHNJtl6g+WotK8+t+F8bfNa3anzW8LDKnopUy9wa0STos1qLmOLXCCPyQujwL+Yf7D9lnj/jb/b9ynv8AWCzgq8PwJqk3ho1P2HdelpUwxoa0QAudwDwO/v8AsF1Vh5ae4beOUYRZRZGhhFlEAUn8MoEQaNMg6jI3pHTopnh9I/8AjZ/6j82HsFaRAjVQoMYIY1rASTDQAJNybbkrYsogDCyiIGf/2Q==" alt="A map showing the location of our antartica branch">
</div>
</section>
</main>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>
Error #2: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.
You missing the <!DOCTYPE html> tag. it is not optional. It is required to tell the browser which version of HTML is used.
Error #1: Consider adding a lang attribute to the html start tag to declare the language of this document.
This mean that you should add as 2nd line a tag declaring the language of your website. This is helpful for search engines and screen-readers. As example: <html lang="en">
Error #3: Element head is missing a required instance of child element title.
Your <head></head> section is missing. Also part of the head-section is the <title> tag. There you are required to add a title that is also shown then inside the browser tab at the top.
Also part of the head content are meta data such as search tags. Also your links for external CSS, Scripts or libraries.
Last but not least, codepen is only a webbased site to see the result of soemthing or to share code snippets. Its not for fully programming a website. Its simliar to an IDE. If you want a fully working website then you should use an actual IDE such as Visual Studio Code as example.

An Image Button navigate to another site html/css

This is my code:
HTML:
<a href="index2.html">
<input type="image" class="button" value="">
</a>
CSS:
.button {
background:url(example.jpg) no-repeat;
cursor:-webkit-grab;
border: none;
}
What should happen is that it display an image and when I click on, it will navigate to another this site index2.html. It worked with another image but it had an annoying border but after I changed the image it doesn't work any more.
You do not need an input type button, simply use img...
html:
<a href="index2.html">
<img src="example.jpg" />
</a>
css:
a img {
border: none;
cursor: grab;
}

How to change the styles of the following links?

Here i have some code from my website I'm making. I'm having trouble styling the links within css. I'm not sure why they won't change. Also the reason I've used class is because i have this code repeated 4 times (don't worry about why :P) Btw I've also tried putting the 'a' infront of .profileLinks that didnt work either :(
Here is the external CSS style sheet
#trends .profileLinks a:link{
color:#0000FF;
text-decoration:none;
background: transparent;
}
#trends .profileLinks a:visited {
text-decoration: none;
color: #0000FF;
background: transparent;
}
And here is the Html Code
<div id="trends">
<h1> Trends... </h1>
<img src="logo.png" alt="Profile Image" height="59" width="68">
<a class="profileLinks" href="#" title="User's Profile Name"> Mark Fonacier </a>
<a class= "commentLinks" onClick ="javascript:ShowHide('HiddenDiv')" href="javascript:;" ><i>Comment</i></a>
<br/>
<p>
PostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPost
</p>
<a onClick ="javascript:ShowHide('HiddenDiv')" href="javascript:;" ><i>Comment</i></a>
<div class="mid" id="HiddenDiv" style="DISPLAY: none" >
<form method="post" action="">
<textarea name="comments" cols="60" rows="2" placeholder="Enter your comments here..." maxlength="1000">
</textarea>
<input type="submit" value="Submit" />
</form>
</div>
<br/>
This selector,
#trends .profileLinks a:link
will only work for child <a> tags of elements with a class of profileLinks, whereas your <a> are the elements with the class applied to it. Change it like so:
#trends a.profileLinks:link
Same goes for the other rule.
Do you have any other stylesheet overridden to yours?
Try this
#trends .profileLinks a:link {
color:#0000FF !important;
text-decoration:none;
background: transparent;
}
Hey try this one Just defined color to all links. Change the link color to your desire one.