Frontend
HTML, CSS and JavaScript - Having trouble with CSS? Post your question here. Find solutions & discuss stylesheets, hacks and techniques.
13,911 topics in this forum
-
Hi, I am working on an old and very bespoke website for a client of mine. We are adding a shopping cart to the website at the moment, but the client has asked for it to appear as a pop up. At the moment I am working on a test page here: http://www.mason-uk.co.uk/flexible-pipe-connectors2.asp The cart is roughly working ok (still ironing out a few minor glitches). You can see what I have at the very bottom of the page, that is the bit we want to appear as a pop up. Some products will have up to 40 variations, so it will need to be able to scroll. Ideally it will not be a full browser window. But my question is to you all; What type of pop up code would work be…
- 1 reply
- 2.6k views
-
Hi all, I am trying to change through images when scrolling, (and I understand that maybe the jquery is a bit messy but it seems to be working) but i would like: - to be able to have images of different heights and widths, not all the same size (as it is now). - vertically/horizontally centered. Here is a fiddle: https://jsfiddle.net/postcolonialboy/WTkqn/486/ Thanks! HTML: <div id="contentwrapper"> <div class="centreme"> <img src="https://picsum.photos/200/200?image=1" id="animation" /> <img class="hidden" src="https://picsum.photos/200/200?image=1" /> <img class="hidden" src="https://pi…
-
- 2 replies
- 2k views
-
-
My company (Kirkby Microwave) website was coded in XHTML, and had no errors on the W3C validator. It has been suggested that nobody uses XHTML, and I should switch to HTML 5. So I changed the bit at the top of the webpages to read <!DOCTYPE html > After making some minor changes, mainly removing the setting of the width inside the <img src> tag, I can get pages to almost validate. Some don't, but that is simply because I have not got around to fixing the errors. But the W3C validator is always complaining Warning: This document appears to be written in English. Consider adding lang="en" (or variant) to the html start tag. I can't seem t…
-
- 3 replies
- 1.8k views
-
-
Hi all, this is what i would like to do 1. when window size is < 1000, change any plain text url to a clickable one 2. when window size is > 1000, change any plain text url to a clickable one, replaced by the word "Link". I had a go but it seems to be failing somewhere! Anyone can shed some light? Thanks HTML <html> <head> <script src="https://code.jquery.com/jquery-3.1.0.js"></script> <script>$(document).ready(function() { function checkWidth() { var windowSize = $(window).width(); if (windowSize < 1000) { $('div').each(function(){ $(this).html( $(this).html().…
-
- 1 reply
- 1.7k views
-
-
Hey, I'm trying to replace some Flash animations (product rotations) with HTML/JS using the "convert to other document formats" command in Flash. This creates a series of images and flicks through them using JS. The page is here https://goo.gl/rjVykQ and when I inspect, it loads the images but doesn't play them. I'm not too good with JS - would be great if someone could take a look Flash seems to have messed up the JS as I'm getting this error when inspecting ventec.js:663 Uncaught TypeError: lib.gundrills is not a constructor at new lib.ventec (ventec.js:663) at handleComplete (ventec.php:61) at LoadQueue.a._dispatchEvent (preloadjs-0.6.1.min.j…
- 1 reply
- 2.6k views
- 1 follower
-
Hi all, I am using jquery to convert a google spreadsheet to JSON that produces a HTML table. I would like to: - hide one of the rows that has the phrase "E9" in it. - change the color of the phrase "C12" to red. I have tried many scripts, but to no avail! Here is the code I currently have. Thank you very much! <html> <head> <script src="https://code.jquery.com/jquery-3.1.0.js"></script> <script> //google spreadsheet var spData=null;function doData(a){spData=a.feed.entry}function drawCell(b,c,a){var d=$(a?"<th/>":"<td/>");b.append(d);d.append(c);return d}function drawRow…
- 2 replies
- 2.1k views
-
Hi all, I have developed a custom WordPress theme with HTML, CSS and jQuery. My issue is... I'm unable to position the sub nav drop-down content below the parent button. Also, they are only showing when I hover the mouse over the parent button, I would like them to stay open when clicked or touched (for mobile). How could I achieve this? HTML: <button class="hamburger">☰</button> <button class="cross">˟</button> <div class="menu"> <li> <a href="<?php echo home_url( '/' ); ?>">Home</a> </li> <li id=…
-
- 0 replies
- 1.9k views
- 1 follower
-
-
I am looking at ways of decreasing page weight without optimising images any more than I have to, I am mainly thinking about mobile devices on a poor 3G connection that will be more effected than a mobile device using a 4G connection or connected via Wi-Fi. What I am looking for is a cross browser solution, but at this stage I don't know what the problems are using a Lazy Loading solution and if the benefits would outweigh them. What are your experiences using a Lazy Load solution?
- 59 replies
- 9.2k views
- 2 followers
-
Good morning developers, I have built a HTML/CSS theme from scratch and I'm having issues with the mobile navigation. I have a separate nav for Mobile (<div class="menu">) and Desktop (<section id="nav">) size in my markup. The issue is... When I click the parent button (Products, About us, Contact) nothing happens. I would like the drop-downs to toggle. Also, this is affecting both my Mobile and Desktop navigation.
-
- 2 replies
- 1.5k views
- 1 follower
-
-
Hi, I'm trying to create a mobile hamburger nav, where the drop-downs toggle when the parent is clicked. I have tried writing the following script for the products <li> item: $( ".subnav" ).hide(); $( "#products" ).click(function() { $( ".subnav" ).slideToggle( "slow", function() { }); }); $( "#products" ).click(function() { $( ".subnav" ).slideToggle( "slow", function() { $( ".subnav" ).hide(); }); }); The drop-down is only showing for around half a second when clicked. Where am I going …
- 8 replies
- 1.8k views
- 1 follower
-
Hello, I was wondering why the drop down menus are displaying at the bottom of the hamburger menu. I would like them to be under the parent, sliding the rest of the hamburger down. http://www.regalgaming.co.uk/
-
- 0 replies
- 1.3k views
- 1 follower
-
-
Has anyone successfully installed reCAPTCHA on to their contact page to help stop the spam? According to the reCAPTCHA website at https://developers.google.com/recaptcha/ its 'easy to add, advanced security'. I have been trying to use V2 with the checkbox option, it is clearly shown what you need to do to call up reCAPTCHA, but come to the code that is needed within a php form it is lacking easy to understand instructions. After spending a day trying to get reCAPTCHA to work, I have given-up. What are the other ways of stopping spam without putting someone off from using a simple contact form? Is there something simple to be added?
- 19 replies
- 2.3k views
- 1 follower
-
Hi, I am struggling to figure out how to change the event to "click" rather than "hover" to display my dropdown options for mobile navigation. If anybody knows how I could do this, +rep for the help! http://www.regalgaming.co.uk
- 1 reply
- 1.4k views
- 1 follower
-
Hi. I am making some small changes to the html and custom.css files of the WHMCS secrion to more closely match the rest of my website. I have managed to do most of what I need but have created a bit of a problem which I have spent a couple of days trying to find the cause for. I will have a background image in the header (not currently uploaded) which has a black 50% opacity overlay. For some reason the overlay has stopped the mouseover action for the main menu to work, The cursor doesn't even change to a hand as you pass over the menu items. I have tried changing the z-index of the overlay with no effect. If I turn the overlay class off, the menu works perfectl…
-
- 3 replies
- 1.6k views
- 1 follower
-
-
Good morning, I am developing the new theme for http://www.regalgaming.co.uk and I have built a "hamburger" menu for mobile. I was wondering how I would add child drop-down links to the hamburger where they are click-downs not drop-downs on hover (for mobile). I currently have drop-downs for the desktop size. At the minute, i'm getting this rather than click-downs in-line with the parent.
-
- 0 replies
- 1.1k views
- 1 follower
-
-
I noticed that my reworked site didn't look right on my cell. I added a meta to correct this but it made it worse. What else can I do? Here's the meta tag I added: <meta name="viewport" content="width=device-width">
-
- 5 replies
- 1.5k views
-
-
Hi guys, We have an issue with our site when using mobiles. In portrait everything is working as expected but as soon as you switch to landscape then you can't click any of the items across the top. Also often it doesn't load the whole page/you can't scroll. Refreshing normally fixes this issue though. Site is https://www.bathroomtakeaway.co.uk/ Any thoughts you guys can offer would be appreciated. Tested on several android phones and tablets.
-
- 0 replies
- 1.4k views
- 1 follower
-
-
I have a div that I have the height set to 100%. It does not fill the container to 100%. What have I done wrong?
- 14 replies
- 2k views
-
Hello All, I am creating a log in page basically using this, https://codepen.io/colorlib/pen/rxddKy As you can see when you click register at the bottom it takes you to a different form, you can then come back to the login form from the register form. What I would like to do is on clicking "Not registered? Create an account" is set the form max width to 2600px And if you click "Already registered? Sign In" I would like to reset the Max Width to 360px I hope this makes sense? Any help would be great.
-
- 0 replies
- 1.3k views
-
-
I have tried many time but I got fail, There is a purple color in background in every pages and I want to use different image on every page which will be relevant to page title. visit here: http://tiny.cc/linkbuilding Please help me, I tried a few things, but I could not figure this. Is there a way to replace an image and make it the background of a particular page? I am hoping a positive reply Thanks
-
- 2 replies
- 1.3k views
-
-
I would like to reduce text size of about section description and I am not able to find how can i do that. When you visit my site: https://tinyurl.com/y7jum8tg you will see the content under about section and it has big font size whereas the whole body content is good. I did try to decrease is size from style.css but when i change its size so its size reduce but other body text size also reduce. I want that all the body content should have same size. I am hoping a positive reply
- 10 replies
- 1.6k views
-
Hi, I was wondering if anyone can help me, I am creating a page in which I have three images below each an explanation. Below the explanation I have added a "Learn More" button however I have been unable to align the buttons to the centre of each image. Below is the HTML and CSS that I am using. Can anyone advise me on the best way to do this? I have also added a screen shot of the images. <style> button { background-color: #ebebeb; } </style> <div class="container"> <div class="row"> <div class="col-lg-4"> <img src="Original.JPG" style="width: 400px; height: 400px; paddi…
-
- 4 replies
- 1.5k views
- 1 follower
-
-
I have about 3,000+ images that I need to create thumbnails for. Is there an easy way to do this? I have a very old version of PhotoShop if that helps.
- 2 replies
- 1.5k views
-
I have a form where there is an input box with an ID. However, the ID is altered each time the form is run. The format is q?:1_answer where ? is an incremental value (for example, 11739, then 11740). I want to submit an automated response to the input box but cannot change it's behaviour. So, I need a line of Javascript that will identify the current ID for that instance of the input box on that particular moment in time. Anyone any ideas?
-
- 2 replies
- 1.4k views
-
-
Hello, I am creating a basic html post form which posts the username/password entries through to another website (It's a basic html form for a client portal) I believe my code should work as I have practically replicated it from a existing portal I have created but it won't work. This is a link to the portal http://109.74.206.50/test.html Any would be great. AIDesigns
-
- 8 replies
- 1.8k views
-
-
I have a menu bar at the top of my page that is set to 800px. I need it to adjust to the amount of content that is in it. I know I have done this before but for the life of me i can't get it to work. If I set width:auto, it goes to the width of the page. I want it to fit just to the margin of the outer text within it. What could I be doing wrong?
- 24 replies
- 2.1k views
-
Hi all, Apologies but I am in desperate need to fix something by the end of the week. The developer of a website I have been project managing has gone AWOL. For the purpose of this post lets say the domain is www.joebloggs.com. The website is uploaded to our hosting provider, however you can’t access the main page by typing in www.joebloggs.com, you have to type in www.joebloggs.com/index.html - not very practical. How can I resolve this please? I know a little bit of code and can access the file manager to edit/create any files I may need. Any help you can offer would be greatly appreciated. Thank you.
-
- 1 reply
- 1.3k views
- 1 follower
-
-
Hi, I'm learning wordpress theme development using understrap (Wordpress boilerplate). https://github.com/understrap/understrap User's custom js code goes to src/js/custom-javascript.js It uses gulp to compile css/js. I don't know know much (really anything) about webpack/babel etc in terms of configuring them. What steps are needed so I can use es6 in this custom-javascript file and it would be transpiled to traditional js. I don't understand what most of the things in gulpfile do. Please help.
-
- 9 replies
- 1.5k views
- 1 follower
-
-
Hi Gang, Want to pick the brains of a front end if possible. I'm looking to create a filter where the range can be anything from 1-50 all the way to 1-31000. Input type range or number with min / max set seems the best approach but not sure which is easier to use or more "fitting" for this sort of thing, maybe range with stepping but then hitting 353 in a 31000 range would be a nightmare so would need to work out realistic stepping, or is there a better way? The range is for filtering places with a maximum capacity, idea is the visitor can filter out things too small. Any ideas or advice appreciated.
- 8 replies
- 1.5k views
-
Hi all, I’m working on a website and would like an animated background at the top of the home page, I've only ever worked on static sites so I don't know where to begin. I want to try and do it myself as I know HTML & CSS and I'm a very quick learner - all self taught. Although I'm thinking I may need to get a professional in for this. I'm very interested in hearing everyones advice and opinions on where I can go with this next... I've seen the particles.js which is awesome, I would like it to work similar but with this kind of design: http://prntscr.com/iyvqht (Please ignore the colours and design as its a very quick draft, just to show the layered sha…
-
- 0 replies
- 1.5k views
- 1 follower
-
-
Hi everyone, My dropdown multi-level menu at www.fobgfc.org doesn't work with touch devices. It doesn't drop down at all. Basically because it makes use of :hover. I'd like the functionality to behave like the menu on www.chipsteadfc.org.uk I will consider using jQuery. How's best to do this please? Cheers, Col
-
- 2 replies
- 1.5k views
- 1 follower
-
-
I am on the search for a jQuery or even vanillaJS-based plugin that can replicate similar functionality to that of the 'FIND WHAT MATTERS' section of this web HOMEPAGE . It is the 'team grid' section where there are rows of responsive images, and a dropdown container beneath each row that contains dymanic content dependent on which 'accordian item' or image was clicked on. You can see a screenshot here: https://monosnap.com/file/M8zQInDm6d3IQ84QOb49Y0JqSlA78F The grid is responsive, shrinking from 8 per row, to 3 per row on mobile and the dropdown expands beneath the row of the image, no matter the screen size. Does anyone know of any plugin that can achiev…
-
- 1 reply
- 1.7k views
- 1 follower
-
-
Hi guys, I'm having trouble positioning text around an image (or 3) inside a div. The text wants to hide behind the image when you resize the viewport/ browser window. I have used an absolute position for the 3 images so that they appear on top of each other rather than one after another. Any help would be much appreciated. I have uploaded the code to codepen here: https://codepen.io/Andy325i/post/css-positioning There is a live version here: http://worldclassphotographic.co.uk/andylanephotography/ Many thanks Andy
-
- 0 replies
- 1.4k views
-
-
Is there a way to make this run when it comes into view? Or more to the point when it reaches a designated amount of pixels prior to it being in view? <script> $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll >= 1000) { $(".animate").addClass("expand-images"); } }); </script> Thanks
- 3 replies
- 1.9k views
- 1 follower
-
I recently came across the perfecting feature: <link rel="dns-prefetch" href="//google-analytics.com"> <link rel="dns-prefetch" href="//www.google-analytics.com"> My take on this is that the above example would force Google Analytics to load up last, but does this really help? Where in the headers would the Prefetching need to go to be of some use?
- 7 replies
- 1.7k views
- 1 follower
-
I am curious as to the difference between the two and when one should be used over the other. Thanks.
- 13 replies
- 2.8k views
-
Hey everyone, I can't sort this out myself. Basically, I have implemented a CSS Accordion code on my website, which basically expands and shows content on hover and is based on ul and li elements. I'd like the content of one of the items to be visible without having to drag the mouse over it, however, so far I couldn't think of any way to do it and I wonder if anyone could help me out. That would be very much appreciated! HTML: <div class="accordion"> <ul class="a-ul"> <li class="a-li"> <div class="a-div"><a class="a-a" href="#"> <h2 class="a-h2">Heading 1</h2> <p class="a-p">Description here</p> </a>…
-
- 2 replies
- 1.6k views
- 1 follower
-
-
Hi Guys, I am project manager on one website and I am wonder what is best way of working for create a website ( not a simple website). 1st way - front end developer create all pages and than our external team of developers will "fit" back end to it or 2nd way do whole website with simple front end and than front end can be improved? Many thanks for any help and advice. R.
-
- 5 replies
- 2.2k views
- 1 follower
-
-
Hi, Calling for some advice/support to put forward a few ideas as to how to best achieve a design I'm working on. I have attached an image outlining a section in a design that has a (not skewed, but similar) wavy curved shape on the top and bottom. The site will have a fixed container grid of 1200px but the height of the content will be variable depending on the viewport width. To make things a little more tricky too, I would like to do this with a gradient. This would cause issues with doing a static image top and bottom and a gradient background for the main content. Could anyone post a few quick codepen ideas to point me in the right direction? Or link …
- 13 replies
- 3.4k views
- 1 follower
-
Hey, I've been making this site for some time now. The layout is "Last Updated: Thursday 18th February, 2010 | 13:39 GMT" But I have to keep changing it everytime I edit the page. Is there a way to make it do it automatically from the local time when saving a page? Thanks.
-
- 8 replies
- 37.8k views
- 1 follower
-
-
I have found a slideshow from the w3schools.com website, it comes with some Javascript to give the function of a left and right arrow and also indicator buttons that can be selected to display a required photo without using the left and right arrows. I also found more JavaScript (carousel) that animates the slideshow, but the indicator buttons do not update when the different photos are being displayed. Can someone please edit the code below and maybe give a brief description of what the code is doing. var slideIndex = 1; showDivs(slideIndex); function plusDivs(n) { showDivs(slideIndex += n); } function currentDiv(n) { showDivs(slideIndex = n); } func…
-
- 1 reply
- 1.8k views
- 1 follower
-
-
I'm having trouble with a slider on the left of my page. I want to have a button, the same as the other 2 you see at the top left of my page, at the bottom that stays in position on hover over, and slides out a white slider which will contain some text content. If you go to: http://www.timothy-clark.com/workcube2.php you'll notice that there is a white bar that runs down the whole side of the page. I've left this sticking out so you can see the slider work, but can you help me with creating the button and getting it to 'stick' to the bottom left (-74px) of the page. Cheers and merry Xmas!
-
- 4 replies
- 1.3k views
-
-
Hi, As the title suggests, there appear to be some 'minor' responsive issues on practically all devices that aren't a PC, especially on devices with a smaller screen size. First of all, the logo on the header nav bar looks rather crappy quality and weird, the navigation menu also seems all clunky and doesn't work all of the time from my experience anyway. Here's the link to my site: https://blacklabelhost.com Kind regards, Lewis.
-
- 7 replies
- 1.6k views
- 1 follower
-
-
I am looking for the ideal breakpoints and font size to enable the text to be readable on all devices. The breakpoints that I have at the moment are as follows: HTML <html lang="en"> <head> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link href="css/style.css" rel="stylesheet" type="text/css" media="all" /> </head> CSS html { font-size: 16px; font-family: 'Open Sans',sans-serif; } @media only screen and (max-width: 320px) { } @media only …
- 20 replies
- 4.5k views
- 1 follower
-
Issue:1 I am using juqeryui widgets to create section tags which contains data from an external json file I have attempted to style the data that is printed out however the text will appear on the right handside of the image for some entries while other ones pieces of text just filter down to the bottom of the page How do I go about fixing this issue? DisplayHoliday.css HolidayForm.html
-
- 0 replies
- 1.7k views
-
-
Hello all I am trying to use the jQuery plugin EasyAutocomplete, but I have run into an issue. I have the plugin working in test from a json file which is fine. What happens is when the user types in a search, the search list filters and the user can click on one of the dropdown enters and be taken to another page. This is working as intended. My issue is that I have a submit button and when the user selects there search term, the submit button does not do anything. You also cannot select a search term by typing in the input field and pressing enter to be taken to that page. I would like the user to be able to go to the next page by either typing in th…
-
- 1 reply
- 2.1k views
- 1 follower
-
-
I want to setup a solution to find answers by elimination. For instance, starting off with the most basic and obvious question. Then if the answer is yes the user will be moved on to the next question, or given an answer. And so forth. Some answers may have exceptions. I know the basics of forms and inputs, but I have never needed to make a form. And most importantly I don't know exactly how to setup the "if this, then that. Otherwise, this." part (the background logic). I would appreciate it if someone could share some leads. Thanks in advance guys, JDL
-
- 2 replies
- 1.4k views
-
-
When my pages load it takes a split second for the Google font ('Sniglet') to show up, and/as it quickly replaces the default font. This is ugly to see each time, and I'd love to stop it from happening. It appears to be more noticeable in Microsoft Edge. Edit: The advice on this page seems to have helped somewhat. I placed the following code in the top of my <head>. I'm not sure if I'm supposed to be using both the Link and the script, but it seems to have helped for now, although I'm still getting some occasional issues using Edge. <link href="https://fonts.googleapis.com/css?family=Sniglet" rel="stylesheet"> <script src="https://ajax.go…
- 23 replies
- 11.9k views
- 1 follower
-
I have an issue with a responsive menu that I have been working on One the screen size becomes 1024px the mobile menu button appears, the problem is that the menu does not appear as it should. Anyone know what the problem is? HTML with JavaScript <div class="container navigation group"> <div class="navigation-desktop" id="myNavigation"> <a href="index.html" class="active">Home</a> <a href="index.html">Item 1</a> <a href="index.html">Item 2</a> <a href="index.html">Item 3</a> <a href="javascript:void(0);" style="font-size:15px;" class="icon" onclick="myFunction()">☰</a> </div> </…
- 3 replies
- 1.7k views
- 2 followers
-
This is a noob question, but I don't know the answer or logic. (I'm trying to figure out why one type of page has fout (font flashing) and another type of page doesn't.) If I have a div inside of another div, should they appear to be so within Dreamweaver's UI? Please see this image: https://www.grantbarker.com/xda/html.png In the code, you can see that I have div searchbox inside of div social-container. However, in the main view above within Dreamweaver, the 2 divs are completely separate. I'm trying not to think too many things at once, but is this inherently wrong to begin with, or is it OK? Sorry for the noob hobbyist question. I'm trying to eli…
-
- 0 replies
- 1.3k views
-