Everything posted by hallonpaj
-
What is wrong with the javascript code?
Here you can see it on codepen: https://codepen.io/kodfrukten/pen/ZERegqo
-
What is wrong with the javascript code?
Im trying to get the menu open and close but it doesnt work. I did follow a tutorial on youtube.. Im a beginner and not good at javascript.. Here is the code for the whole site: <!DOCTYPE html> <html> <head> <title>My site</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * { box-sizing: border-box; } .row::after { content: ""; clear: both; display: table; } body { margin: 0px; padding: 0px; color: black; text-align: center; background-color: white; background-image: url(''); background-repeat: no-repeat; background-attachment: fixed; background-size: cover; font-family: ; } h2 { font-size: 25px; } p { font-size: 20px; } .navbar { display: flex; justify-content:space-between; align-items: center; background-color: black; color: white; } .brand-title { font-size: 1.5rem; margin: .5rem; } .navbar-links ul { margin: 0; padding: 0; display: flex; } .navbar-links li { list-style: none; } .navbar-links li a { text-decoration: none; color: white; padding: 1rem; display: block; } .navbar-links li:hover { background-color: #555; } .toggle-button { position: absolute; top: .75rem; right: 1rem; display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 21px; } .toggle-button .bar { height: 3px; width: 100%; background-color: white; border-radius: 10px; } @media (max-width: 700px) { .toggle-button { display: flex; } .navbar-links { display: none; width: 100%; } .navbar { flex-direction: column; align-items: flex-start; } .navbar-links ul { width: 100%; flex-direction: column; } .navbar-links li { text-align: center; } .navbar-links li a { padding: .5rem 1rem; } .navbar-links.active { display: flex; } </style> </head> <body> <nav class="navbar"> <div class="brand-title">Brand Name</div> <a href="#" class="toggle-button"> <span class="bar"></span> <span class="bar"></span> <span class="bar"></span> </a> <div class="navbar-links"> <ul> <li><a href="#news">Kontakt</a></li> <li><a href="#contact">Nyheter</a></li> <li><a href="#about">Om</a></li> </ul> </div> </nav> <script> const toggleButton = document.getElementsByClassName(’.toggle-button')[0] const navbarLinks = document.getElementsByClassName(’.navbar-links')[0] toggleButton.addEventListener('click', () => { navbarLinks.classlist.toggle('active) }) </script> </body> </html>
-
create blog
Well I had a blog there, downloaded a plugin that over 500 000 people had downloaded and then my blog broke down. I lost everything so I will not use Wordpress again.
-
create blog
Hi I want to create a blog to have on my website, but what do I need to learn to do that? It doesn´t need to have a comments function, but I want to have categories and date. I also want to have a search function.
-
take away margin from header?
thank you that did work.
-
take away margin from header?
I made a website but on top of the header and on the sides it is an white margin. How do I make the header to go all the way to the sides and to the top of the page? I can´t see that I have a margin on the header in the css file..
-
Client wants powerpoint embedded
make the powerpoint to a video.
-
put text on image?
I found a solution so ignore what I wrote.
-
put text on image?
In the html or in the css? If a write the background code in css it is not responsive.. In the html I have done it like this: <div class="col-12 right"> <div class="main"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla mollis turpis euismod nulla facilisis, volutpat convallis lectus aliquam. Aliquam varius urna aliquet viverra consequat.</p> </div> </div> If I add the backgrund picture like this nothing happens. <div class="col-12 right"> <div class="main"> <p style="background-image: url('picture.jpg');">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla mollis turpis euismod nulla facilisis, volutpat convallis lectus aliquam. Aliquam varius urna aliquet viverra consequat.</p> </div> </div>
-
put text on image?
Hi Im wondering how I can put text over an image with html and css? That also responsive.
-
combine 2 and 3 columns on one site?
Hi Im a beginner at webdesign and I have a problem. I want to make a website that have both 2 "columns" and 3 "columns" in it (in one page). It should also be responsive. I have tried with articles and columns and it doesn´t work. It works on the computer but not in a mobile phone.. so its not responsive. How can I make a website with both 2 and 3 columns? and sorry for my english, Im from Sweden.
-
Remove border from website?
Hi I´m a making a website and using CSS float layout and I have a problem. On every side of the website I have a white border, I want it to fill the whole page.. What should I do?