Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Frontend

HTML, CSS and JavaScript - Having trouble with CSS? Post your question here. Find solutions & discuss stylesheets, hacks and techniques.

  1. Started by mohamedyehia729,

    i want to show a green border to the input when be active or visited not black as shown ! that's the code https://codepen.io/Mohamedyehia94/pen/oNbeqWY

    • 1 reply
    • 1.2k views
  2. i try to set linear gradient but i don't know what's the wrong ! margin: 0; width: 100%; height: 590px; background:url(banner.jpg) linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)); background-size: cover; background-position: center center; background-repeat: no-repeat; position: absolute; top: 0;

    • 3 replies
    • 1.5k views
  3. Hi, I'm actually still figuring out how to actually make the transition for the picture. Here's the link to see the transition for the picture below: https://thirstrelief.org/

    • 1 reply
    • 1.5k views
  4. Hi, I'm completely new to this forum and website in general, but I'm planning on designing my own portfolio website and I found this restaurant website which uses incredibly interesting interactive design (see images attached below). The website is sketch.london. Does anyone have any idea on how to achieve this? Furthermore would it be possible to do this on a website design like sqaure space for example? I have no coding experience, but if anyone could help it, would be fantastic!

    • 2 replies
    • 1.4k views
  5. Hi! I'm looking for a date/time picker that is configurable for opening hours. The idea is to use it for reservations. But only withing business hours ofcourse. Anyone!

  6. Hi I am developing a web application, which displays articles. Now the interaction of this web app is quiet different on mobile and desktop devices. On the mobile app, you can swipe an article right or left and behind the article are buttons for liking and disliking the article. This buttons are only visible, if the article is swiped right or left. This behaviour is not desired on the desktop version. On the desktop version, you cant swipe the article and the buttons are positioned left of the article and always visible. Currently while a user logs in, I check (with javascript) if the device is a mobile device or a desktop and send this information in the r…

  7. Started by Zynck,

    I have searched Internet about my problem but I can't figure this out. Mostly problem people has with @font-face is just file paths. My problem is a font that is outside my domain happens to work well while ones that in my domain doesn't work. Well here's the fonts.css @font-face { font-family: "Cantarell"; src: url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.eot") format("embedded-opentype"); src: url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.woff") format("woff"), url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.otf") format("opentype"), url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.ttf") format("truetyp…

  8. Started by portia79,

    Hi I'm developing a site for someone and just sent them my progress. They've come back and said that the hero image does not display on their end. I'm confused as I've tested it on different browsers / devices and it does show. The path to the image seems correct. Does it display on yours? Is it possible that it wouldn't work when it's first accessed through a mobile device (different css due to breakpoints)? Please advise. Thank you

  9. Started by Chaz889,

    Hi guys, I am new to webdesign and new a little help. I have a menu with 3 links to different pages, is there a way when I hover my mouse over them, the font size increases? Thanks in advance, if I am not being clear, please tell me, I will try and word it better.

    • 5 replies
    • 16.7k views
  10. Hi, I'm creating a loading screen for a roleplay gaming server which can be seen here (Hit the space bar to mute/unmute the background music). As you can see from there I have two carousel elements. The cover background image slideshow, and the different texts below the emblem. They're conflicting with each other though causing the backgrounds to not all show and the text keep changing at different intervals rather than the set 3.5 seconds. It's the same code for both besides the background div class is .bg-slides and the text div class is .text-slides and the different timeouts. There is a number of different things online regarding carousel's and this issue, but I'…

  11. Started by And180y,

    First time posting so hopefully it is okay to ask for some help. Sorry for the long post. Due to it being a long time since I did anything for the web (think Frontpage days lol) and needing to convert a load of Excel stuff to the web I found it necessary to use a form builder. One of the calculation fields needed more work on it so I (foolishly, it seems)ended up on Fiverr. The guy couldn't fix the coding so I ended up with a completely different form which still didn't calculate correctly and looked hideous. Most of the issues in that form seemed to be down to the functions. (I thought if I could get them working I could figure out the design) but when I ran…

    • 0 replies
    • 1.7k views
  12. I used to create these things with no problem, but its been a while.. a long while... and I am having some issues with some pages I need to make that will lead into some zen carts. Zen carts...no problem... But this responsive junk is killing me! Can someone help me get it started or at least one and then I can do the rest? I have a background I need to use and mapped graphics on them as well....but need to make them accessible on any media source. Thanks!

    • 1 reply
    • 1.4k views
  13. I pass an array of strings to a function that turns them into an array of objects. For example array of birds names, array of dogs names. Is there any way I can check the name of the the array in that function, if it is called birds add a beak to the object, if it the dogs array add tail, for example. Thank for your help.

  14. Started by portia79,

    I'd like to create a calendar booking functionality for a website. The kind that you have when you book a place in a hotel. You open a calendar and choose the days you'd like to stay in. It shows you which ones are already booked, etc. then it'll take you to payment (which is a separate issue. I'm not asking about that). For a small website what would I need to start googling? Do I need a fully fledged database to keep track of the bookings? What kind of platforms would I need for this (for a small website), eg. firebase, or fully LAMP setup, specific js library? I understand the question is vague but I don't know where to start and which direction to go to. Thanks

  15. Why can't I just have the image image,png on my webpage and in the CSS use shape-outside: url(image.png) to give the shape? Is there something I am not getting?

  16. Is this possible? Can anyone recommend a good tutorial on this topic? Many thanks for your help.

  17. Thank you for your help.

  18. Started by 98sfsdf8,

    I have several modals, each with a different iframe with a different embedded youtube video. When someone closes out of the modal (either by clicking away, hitting ESC or closing it), I would like the youtube video in the modal to stop. I am not using bootstrap. Below is an example of just one of the modals in action. Any suggestions will help! Fiddle HTML <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <a href="#" class="button" data-modal="#modal2">Modal2</a> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. A…

  19. Started by GusGF,

    This site can’t be reached base13.local’s server IP address could not be found. I'm learning Wordpress and have been using Local by Freewheel to host my sites locally. A few months ago we started using npm & gulp to automatically regenerate a site after saving any changes, I'd like to say it's been easy but there has been many hiccups, but I got there in the end and it's been working fine. I know very little about these packages as this is not the purpose of the course I'm doing and I'd rather not get too distracted going off trying to learn other things. Today I am now getting the above error and have reached a dead end as to …

  20. Started by silentstep21,

    .group::after { content: ""; display: table; clear: both; } I just do not understand why the value of the display property is set to "table". Why?

  21. When should I use <article> and when <section>? There doesn't appear to me to be any difference. Thanks!

  22. Started by James Winfield,

    Hey I've made a new website, using npm for the first time - I use npm at work all the time, but never actually for a personal project until now, and I wanted to take advantage of ES6. However I get a 404 when I go to http://metlinebingo.co.uk/ - though the website works as expected if I go to http://metlinebingo.co.uk/src/ What have I done wrong? Or not done? I'm guessing it is something simple but Google hasn't come up with the answer yet... Thanks James

  23. Started by MartyBoi65,

    I am new to CSS Grid, so I haven't much experience. Which is why the question that follows. When trying to apply Grid Area to a 12 Column Grid, is there not a better way to do so without having to write, for instance(header), 12 times in the 'grid-template-areas' property within this CSS block? Or should I just use the ' grid-column' property? Thank you......

    • 1 reply
    • 1.4k views
  24. Started by portia79,

    Is there a tool to find out if any custom class or id in my css file is currently unused? I'm talking about the id/classes I've created, eg: .main-hero #technology #technology ul etc. I'm in the process of reorganising it but first would like to get rid of anything that is not used. Thank you

  25. Started by portia79,

    Hi Could you recommend a js/css library for a carousel that would slide divs? There's a wordpress plugin that I used. I liked it because it'd let you slide a whole div (not just images) so you could really have a slidershow of any elements. Now, the plugin is a bit big with lots of unnecessary (for me) functions so I thought I'd just use the jQuery library behind it and create something simpler. The jQuery library behind the plugin is OwlCarousel2. When I visited their github, the readme says that's dead and recommends using another library. When I visited their github issues page, it does not look like it's in active development either any more. I'm after somet…

  26. Started by silentstep21,

    Should we *always* use wrapper divs? And do you prefer using a wrapper div or the body element as a wrapper?

  27. Started by wrf01a,

    I use a background image slider to rotate between two background images. I works but there is one problem. When it switches between the two images, there is a point where the screen is white. Yes its only a spit second, but it would be nice if one image fades in as the other fades out. What can I do to fix this problem. $(document).ready(function(){ var imgArr = new Array( 'images/home/background_image_1.jpg', 'images/home/background_image_2.jpg' ); var preloadArr = new Array(); var i; /* preload images */ for(i=0; i < imgArr.length; i++){ preloadArr[i] = new Image(); preloadArr[i].src = imgArr[i]; } var currImg = 1; var intID = setInterv…

    • 2 replies
    • 1.5k views
  28. Started by portia79,

    Hi, I'd like to clean up/organise my css and I've got some questions. Is there a common practice or recommended way (because of eg. SEO or speed) or is it just a matter of personal preference as long as it follows some consistent logic? Apart from generic stuff, I've got sections that are specific to particular pages or components: eg. /* Product Page */ ..... /* About us */ ...... /* Main navigation */ /* Hero */ .... Two questions: 1. Should there be multiple media queries under each section above or one big media query including references to all those pages/components? 2. If, for example, there's some specific styling on fonts in …

  29. Hi, Not sure, if that's the right section of the forum for this question. Every few days I ask a client (a few people) to check an updated version of their website. The problem is that very often they see a cached version of the pages. They are not necessarily super tech-savvy and talking to them about cache, etc. is not great. I don't suppose there's a way of forcing some kind of hard reload on their devices initiated from my end? I was thinking that before each time I email them to check the website, I'd change the name of the stylesheet (...and images, if needed) to force the browser to load everything fresh. What do you think?

  30. Started by portia79,

    Hi I have been struggling with this responsive menu (link to code pen below). If anyone could help me with the following: https://codepen.io/m-herda/pen/OJyVraq 1. How do I make text-decoration: none; work on the li elements on small devices (once I've unfolded the menu by clicking the hamburger button). It's set on #main-menu li a but only affects li elements on bigger screens. 2. On a smaller screens, once you've unfolded the menu, the logo image on the left hand side gets pulled down to the vertical centre. a) I'd like the logo image to stay where it initially was (at the top) b) and the li items take the whole width of the visible screen so t…

  31. Started by jhmagic1,

    Hello, i am currently building a site from a template. I am looking for a way of having multiple images when a project is clicked on. The first attached file is how it currently looks when a project is clicked on I want to have the option to add more images relating to the project as in the second attached file. As you can see on the left are thumbnails that can be clicked on to enlarge other photos related to the project. Is this possible?

    • 15 replies
    • 1.7k views
  32. Started by portia79,

    Hello, I wonder if the following is possible. I would like to have a responsive background image starting from the top of the page (#header) until one of the nested divs (#top_module) including this div. So the first div without the background should be #middle_div. Due to the fact that it's a wordpress template, it's quite modular and the structure is as follows: <!DOCTYPE html> <html lang="en"> <head> <!-- Meta --> <meta charset="UTF-8" /> <title>My site</title> <!-- Styles --> <link rel="stylesheet" href="styles/index.processed.css"> </head> <body> <div id="header"> …

  33. <script src="js/script.js"></script> <script id="language" src="js/french.js"></script> <script> let x = document.getElementById("language"); // Inside french.js there is a console.log("French") and I get that in the console console.log(x.src); // "js/french.js" if (navigator.language === "en-GB") { x.src = "js/english.js"; }; console.log(navigator.language); // "en-GB" console.log(x.src); // "js/english.js" // Inside english.js there is a console.log("English") and I DO NOT get that in the console // ... so what am I doing wrong? 😞 // Thank …

  34. Started by portia79,

    Hi, In terms of starting a new project, so far I've been using Bootstrap. I want to start a new project not relying on it (want to do more flexbox/grid). Can anyone recommend some good practice html5/css starter template or framework (looked at html5 boilder plate but it looks like an overkill for my needs). What I'd like to have is: - responsive/mobile friendly - seo friendly - have build in sass I don't think I'm able to put it together from scratch myself. I've tried Cirrus but got stuck right at the beginning where (after running npm install / gulp compile/minify), I had no idea where to put index.html or what to do next. …

  35. Started by silly.questions,

    I bought the book. Wow it is old! Is there another website similar to CSS Zen Garden that is constantly being updated? Thanks for your help! p.s. How would one host such a website, one HTML file, offering to switch between multiple CSS files for that one HTML page?

  36. Started by silly.questions,

    Under the text "As she leaves the restaurant, Nguyen says she feels a burden has been lifted, but is still holding out hope for an official apology from Seoul." there is a black and white photo of a man, which upon scroll switches to a color photo. How did the designers achieve this? Thank you for your help. https://www.bbc.co.uk/news/extra/lhrjrs9z9a/vietnam-1968

  37. Started by Iago,

    Hello, I wonder why my media queries do not work on my homepage? I mainly use bootstrap for the layout. Does anybody have a clue? Thansk a lot. Here is the link: http://science-travel-com.stackstaging.com/ Cheers, Iago

    • 1 reply
    • 1.4k views
  38. OK so when I hover over an image I have it rotate 360 degrees in 1s. Say for example I take my cursor off at 0.5s. The image jumps back abruptly from 180 degrees to 0. Is there any way I can make it gradually go back from where it is to 0 degrees, without this abruptness? Thank you for your help.

  39. I know there are JS libraries out there but I want to use Vanilla JS. Has anyone found a good tutorial? I thought Dev Ed had one on YouTube but he seems to use external libraries. Thanks in advance for your help.

  40. Started by GaryNewport,

    I have a class that I am trying to adapt, but keep getting an undefined error. I am currently blind to the solution so am reaching out... <!DOCTYPE html> <html> <head> <style> .button { width: 40px; height: 40px; line-height: 40px; border: 1px solid #000; border-radius: 25px; font-family: "Comic Sans MS", cursive, sans-serif; text-align: center; margin: 0 1px 0 1px; float: left; } .button:hover { cursor: pointer; …

    • 3 replies
    • 1.7k views
  41. Good morning. I have problem with flex container. Basically the width for mobile users is shorter than desktop users. I tried use align commands and position of content/text but if i change position and add width to content then its not centered anymore for mobile users. Just for desktop. Whatever im trying to align on desktop then it won't be align for mobile users. Is there a way to go around it? Thanks. Here is my HTML AND CSS CODES HTML <div class="add-to-cart-btn pa"><a href="/collections/something-here" class="" aria-label="Select options" rel="nofollow"><i class="icon-options-vertical icons"><…

    • 0 replies
    • 1.5k views
  42. Hi - please excuse my ignorance but really need some advice - apologies if this is a really basic question, but I have a small desktop app that I want to be able to store on a webserver and allow users to run it on the web server (which is accessible to anyone on the Internet). So they wouldn't run it on their local machine. So I don't want them downloading the app - just to be able to run it. I also want users' access to this app (in terms of how many hours or days) they can access it for) controlled by a payment mechanism - i.e. they can run the app as many times as they want but within a 24 hour period which is based on them paying a set amount via Paypal etc before th…

  43. I looked on the Internet for an explanation, but I am still a relative beginner and couldn't understand the jargon. What, in simple, lay terms, are frameworks (such as React.js, Angular.js, and Vue.js) and what are libraries (such as Node.js and jQuery)? Why are they so important? Should I learn more than just one of those?

  44. Started by sash_oo7,

    hello friends, I was following a tutorial on how to make a simple toggle animation stop but somehow its not working as i see in the video the animation mmust stop in the middle but instead it jerks back to full size and when i clcik start again the animation starts from where it stopped here is the jsfidddle any help will be appreciated

    • 0 replies
    • 1.5k views
  45. how to input a text below of ''radio-image'' without misaling. Hi Guys. I've tryed many forms to do it, but i can't do it. I just need to put a text below of five images, like: "1 - so angry", "2 - bad", etc. But when i put a broken line "<br>" my layout misalign, because i need to put two images on the same line and in my .css i have: display: inline-block. Example of i need: (in attachment) when i put <p> </p> it broke two lines and misalign everything. I need 2 images by line. My code in html is: <fieldset class="radio-image"> <label for="1 - so angry"> …

    • 0 replies
    • 1.4k views
  46. I want to create a form with lets say about 200 text fields that will input only numbers. Upon hitting submit, the data will be sent to the backend, it will be calculated and a good PDF of it will be created like in tabular format and given to the user. Since the data is lot, I will have to make some sort of backup and database system so that if the person filling the data loses power mid away, it won't all be lost. Which is the best language and database do you recommend for hundreds of columns? Learning it won't be an issue.

    • 5 replies
    • 1.7k views
  47. I am not entirely sure whether the JavaScript engine is the same thing as the JavaScript interpreter. Apparently, Chrome's JS engine is V8.

  48. Started by i.caie,

    I have an issue that my main navigation allows smooth scrolling but when i try and add the same function to the button links on the page it makes the nave highlight go off. I am really new to this and wonder if its as straight forward to add div tag elements to create the same effect. I have tried adding new js but it then makes the nav go weird as to where it lands on the page. HTML CODE <ul id="mainNav"> <a href="#home"> <img src="im/logo-top-right.png" alt="sub small logo"></a> <li class="active"><a href="#home">HOME</a></li> <li><a href="#about">ABOUT US</a></li> …

  49. This article urges people not to use var in JavaScript and instead use const and let for declaring variables. What do you think about that? https://levelup.gitconnected.com/stop-using-var-to-declare-variables-in-javascript-6c0caec16f43

  50. Why do some developers put the <script> tag in the <head> while others in the <body>? Which is preferable or recommended? Is there a difference at all?

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.