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 dpuk44,

    I am trying to change the colors of my map, but not sure how to do this. <script src="https://maps.googleapis.com/maps/api/js"></script> <script> function initialize() { var mapCanvas = document.getElementById('map-canvas'); var mapOptions = { center: new google.maps.LatLng(52.409703, -1.974159), zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(mapCanvas, mapOptions) } google.maps.event.addDomListener(window, 'load', initialize); </script>

  2. Had to do a very quick frontend build on a temp site, There's an odd bug that only appears occasionally in Chrome, and it's the sticky header that is sometimes positioned underneath the content. It has a z-index of 10, none of the content that has positioning is has a higher z-index than this. The strangest thing is that it only appears occasionally and not everytime, like 5-10% of the time, which makes testing very difficult. I tried removing the 3d transform on it but the bug still persists. It seems it is some kind of rendering issue but It's critical I find out the cause because we cannot launch with a bug like this for obvious reasons. http://wasabi…

  3. Hi, I have a strange problem which I hope someone can help me with. On my site I have 4 links in the navigation bar along the top of the page. The 3 links to bookmarks within the same page work perfectly. However, if I try to link to a new page the link doesn't work. It shows up in the browser preview but just won't operated (it's the link called "removals" at http://www.aasltd.uk.com/index.html). Can anyone advise the cause of the problem and a possible fix, please? I presume this is a css problem but I'm not entirely sure. many thanks, Ritchie.

  4. I have a css menu that uses an external style sheet. I also have an external style sheet for the site itself. The css menu uses an unordered list. The problem is that I cannot create any other unordered lists on a page as they don't show up. I have been unable to find what is in the css menu style sheet that is causing this. Below are links to both style sheets and an example html page if that would help. http://www.karaoke-tutor.com/m/mobi-style-320.css http://www.karaoke-tutor.com/m/mobile-menu.css http://www.karaoke-tutor.com/m/example.html

    • 4 replies
    • 1.1k views
  5. Javascript is a huge and awesome (and complicated, of cause) programing language! But nobody can know all part of js very well. I need to understand for myself what part of vanilla js every front-end developer and js programmer should know for getting a decent salary? scope closure loop promises http Rest websockets angular node.js When i started go deeper in closure i understood how much awesome affects i can make with vanilla js. If i miss something? Please add the missing part to this list. I will be very greatful if someone can point me to the most used task in javascript that front-end devs everyday working with. Thank you in advance!

  6. Started by avenge the rage,

    Hello guys. I am looking for some help. I am building a website for the first time (using both code and dreamweaver) and having a bit of trouble implementing facebook, twitter and instagram onto the site. I have put the code up that facebook says (trying to sort this one first) and nothing is happening. Is this due to trying to view the site offline rather than online, and only works when the site is live? Hope you can help Thanks ATR

  7. Started by silentstep21,

    If one wants to be a front-end developer, what should one need to learn most of all, in addition to mastering HTML, CSS, and JavaScript? And how much of the rest -- back-end coding and graphic design -- does one need to have a grasp of? Thanks.

  8. Started by Tayken,

    Hello, I have this code: http://jsfiddle.net/e7qnhxce I have a problem: when I mouse over the div button,I whant that the background-color of #main change color. Sorry for my bad english. Regards, Tayken.

    • 14 replies
    • 2.3k views
  9. Started by CreativeSheep,

    I've got a dilemma, when you tap on mobile the paper pile image should pop up, apparently there is a z-index issue. When you inspect element on the paper pile which is .imgbox using Chrome, it selects #inner instead, it's parent. All widths above 1024 have no problems. I'm at a loss, what could be the problem ?

  10. Started by silentstep21,

    What does everyone think of Udacity's Nanodegree? Has anyone enrolled and what are your views about it? I already have two courses going on, so I can't enroll right now to a third one, but I may consider joining in the future if it's worth it. https://www.udacity.com/nanodegree?gclid=CM-sy8md4MQCFSHLtAod9AwAmQ

  11. Hi folks, I am working on a site and seem to be having a major issue with IE and z-index. If you visit this website and click the "Rewards Store" down the left hand column, it has a lightbox popup that creates an overlay but I cannot get the overlay to go behind the login box popup. www.allfix.co.uk Any assistance would be much appreciated.

    • 1 reply
    • 1.6k views
  12. Started by fleur,

    In this post Lindsey sent awesome script for loop. And it works perfect. I always play with this script when i try to use loop. Now i go deeper in js and i see that when i try to use this script with split function i see the different result. Maybe i should convert array members in real object? Please, provide me advice what's the different between array members and object like id or class and how i should implement split array result into loop? jsfiddle <div id="random">Hello world</div> <span id="result"></span> .red { color:red; } jQuery(document).ready(function ($) { var splitText = $('#random').text().split(""); /* …

  13. Started by teodora,

    Share your preferred methods & tips

  14. Started by James Winfield,

    Hello I'm trying to make a second expanding menu in the bottom-left hand corner, however when I click on the icon in the bottom-left corner, it is still controlling the menu in the top-left corner. What do I need to change to get this working? My brain has kind of frozen and I think a more experienced eye may spot what I need to do. Thanks again. James

    • 2 replies
    • 1k views
  15. Started by Kobraz,

    Hi. I want to have a calendar like a wheel or circle - in javascript/php/css. Anyone that know about a step-by-step guide or a code ready to use? I think about the year as a sircle. I plan to use the calendar to contain events that happens every year, so i dont need weekdays - only date, month and maybe hours. This is something like what i have in mind: https://www.google.no/search?q=%C3%A5rshjul&source=lnms&tbm=isch&sa=X&ei=xlcaVfKHI4GzsAHJpIKAAQ&ved=0CAcQ_AUoAQ&biw=1920&bih=945#tbm=isch&q=circular+calendar&imgdii=_&imgrc=LU5WBAg2LcZfuM%253A%3B3aLgu8LsjA5y-M%3Bhttp%253A%252F%252Ffoulab.org%252Fdata%252Feb1eddb116dee…

    • 0 replies
    • 4.1k views
  16. Started by teodora,

    Happy Monday everyone I have a small issue with .wrapAll on window resize. Hope someone can let me know where I am going wrong What I need to do is: - wrap different number of items in a container div, for example wrap 2 items on screen resolution smaller than 480px, wrap 4 items on resolution smaller than 600, etc. and update them on window resize so the right number of items are wrapped, if that makes sense? Here is my code: HTML <div class="my-item"></div> <div class="my-item"></div> <div class="my-item"></div> <div class="my-item"></div> <div class="my-item"></div> <div class="my-item…

  17. Started by fleur,

    I tried to make array of text values and then change one word in text on another. I wanted to change word "my" on "yours" but failed. Please, point me on mistake in this code. Thank you a lot! <div class="price">This is my price</div> <div class="price">This is my price</div> <div class="price">This is his price</div> <button id="button">Try it</button> (function(){ var data = []; $('.price').each(function() { var this = $(this).text(); data.push({ this; }); }); function array() { var txt = $('.price').html(); for(var i = 0; i < data.length; i++) …

  18. Started by Vulcan,

    Does any one have any good explanations for creating responsive websites from scratch for beginners. I know about media queries. I am just confused with em's, rem's, % (mostly), etc. Can someone help me with the maths? I am trying to teach myself this and I just cannot get my head around what those do. Also if I did go into frameworks which is the easiest to pick up out of Bootstrap or Foundation?

  19. im creating a responsive website and using Jquery SlickNav, is there a way to add an extra li element to the menu but only when SlickNav is active?

    • 0 replies
    • 1.3k views
  20. Started by dpuk44,

    I store the users data in a variable via a form. I then perform calculation and print back to the screen. How do I get this to print back without page reload? <input type="text" id="inpt"> <input type="submit" value="Calculate" id="submit" onclick="calculate()"> <script> function calculate() { var input = document.getElementById("inpt").value; var rate = 10; var result = input * rate document.write(result); } </script>

  21. Hello guys and girls, I am a pentester and i recently opened http://webpentesting.com/ where me and my team test websites for security vulnerabilities for free. Our service is for free, it's a security audit for your website and we will make a report at each ending of the audit with the vulnerabilities found ( top 10 OWASP vulnerabilities) Who is interested in, please visit http://webpentesting.com/ and leave us your contact details and we will contact you soon.

  22. Started by Aeneas,

    Hello you all! I'm designing my first WP theme ever and I just bumped into some problems with my sidebar. Take a look: http://zarkopef.se/tesa/# By some reason the sidebar places itself in the middle of the site, and not in the top where I want it to be. What should I do in order to place it correct? I also have some problems with the width, I would like to have it wider but when I try to do so, the sidebar is moved to the bottom.

  23. Started by CreativeSheep,

    I know the CSS property: image rendering is not widely adapted by most browser including up to present versions. Pixelated and crisp-edges are the only two values which are compatible with current browser, IE you must use a vendor prefix and another property. My question is; is there a noticeable difference between the browsers default smooth interpolation and pixelated specifically ? I have image-rendering set to pixelated for an image, maybe there is a slight increase in quality, over the default or auto !

  24. Something random has started happening the last few days on one of my sites. The paragraph goes outside of the div, until I right-click and open the designer-tool in Chrome. When I do the paragraph jumps into the right place without me changing anything. :S Same goes with some links in paragraphs, they clump together with the text beside it. Then when I open the designer-tool they go into their right place. So I'm very confused as of what causes this and how I fix it. Anyone else knows?

    • 6 replies
    • 2.1k views
  25. Started by teodora,

    This should be pretty basic, but I can't seem to get it right I am trying to sum multiple dynamic values and output the total for each parent div. My html is as the example below: <div class="parent"> <ul> <li><span class="count">0</span></li> <li><span class="count">1</span></li> <li><span class="count">4</span></li> <li><span class="count">0</span></li> </ul> <span class="total">0</span> </div> <div class="parent"> <ul> <li><span class="count">1</span&…

  26. Started by dpuk44,

    Having issue with the menu alignment. When reducing the browser size the menu shifts below the logo before it collapses for mobile view. How can I change when the menu collapses in Bootstrap? http://www.allportautos.co.uk/

    • 0 replies
    • 1.1k views
  27. Started by Mrrobbyt,

    I started my first bit of coding yesterday, trying out code academy to get some basics before paying for my treehouse course. Iv done some reading up and as a complete beginner I've decided in HTML and CSS. I came across XHTML, html4 and html5. I am about to purchase some books and was just wondering if I'm on the right track. Can someone confirm if I'm right in going for HTML and CSS or any of the others I mention. Thanks.

  28. Started by Charly,

    Good evening, I was wondering if someone could help me. I am trying to get my submenu li spacing to be even but I cannot see what is causing the problem. Can anyone see what I am missing. Website address is here. Thanks in advance :-)

    • 4 replies
    • 1.3k views
  29. I'd like to run the specs of a very simple app by the members please, simply put can this be done,'properly' and 'efficiently' just built as a responsive website? In short we need to be able to provide our sales people, with a clickable icon on their phone, opening as an app, allowing them to input a prospective customers name, email address, and choose a product they are interested in and click submit only. At this point: 1 email is sent to the prospective customer with details of the product, URL link and the unique coupon code each of our sales people has, for the customer to input at checkout for a discount. (Internally this number will then allow us to track whose…

    • 1 reply
    • 1.1k views
  30. Hi folks I'm working on a site for a local youth football club. I'm using a stock theme on Joomla and would really love to incorporate some of the designs seen on Tympanus / Codrops such as the Split Layout, Minimal Form Interface and Elastic Content Slider. However I try though, I can't get them to work without messing up my existing site layout. Whilst the code has been helpfully provided on the Codrops / Blueprint site, there are no instructional articles and my attempts at adding these to my site have proved disastrous. Can anyone tell me if it is possible to add these components (e.g. as modules or articles) to an existing Joomla site and how I may go ab…

    • 1 reply
    • 3.7k views
  31. Hi Been trying to work this out for ages. But its now clearly in 2 camps. mywebsite.com - font awesome icons show www.mywebsite.com - font awesome icons aren't showing The main head links reads <link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> is there a problem there? Anyone come across this one?

  32. Started by AndyDesigns,

    Hi all, I'm working with this script: http://jqueryui.com/accordion/#hoverintent However, I need all the tabs to be closed on page load, at the moment the first tab is open by default, I am testing it here: http://agtdesigns.co.uk/ashboats/sample-page/ Also I want the tabs to auto-close once mouse moves away from accordion. Any help would be greatly appreciated.

    • 0 replies
    • 1.4k views
  33. I have a paralax scrolling website but the menu doesn't collapse on smaller screens / phones, so the content is sitting behind the purple menu.http://www.turningworm.co.uk/focus7/web/paralax/index.html Any ideas on how to fix this?

    • 3 replies
    • 1.8k views
  34. Started by CreativeSheep,

    W3C lists you can use the mask as a short-hand property. Neither of the listed properties are working in Chrome 41.x ? mask:url("<path with image>") luminance; -webkit-mask: -------------------------------------

    • 7 replies
    • 1.1k views
  35. Hello all, I have a bit of a problem. I have a side nav bar coded in jquery but whenever I click on any of the sub links, (drop down) menus my menu doesn't match that when I click on the top level of my nav bar: Here's the code: if(result == 'news-and-events') { $('#zz13_RootAspMenu li:nth-child(2)').hide(); $('#zz13_RootAspMenu li:nth-child(3)').hide(); $('#zz13_RootAspMenu li:nth-child(4)').hide(); $('#zz13_RootAspMenu li:nth-child(5)').hide(); $('#zz13_RootAspMenu li:nth-child(6)').hide(); if ( $("#zz13_RootAspMenu li > ul li:nth-child(1)").is(":visible")) { // L…

  36. Hello all, I'm currently designing a side nav bar that expands to display six different nav sub menus. When I click on the parent nav bars it works fine, however whenever I click on the sub menus the menu should display the same level but it doesn't, instead, it displays the sub menu of the item I have clicked. As you can see from the code below the 'result' variable holds the 'news-and-events' from the URL, and the 'sub_menu' variable also holds the 'news-and-events', the only difference is the sub_menu variable is stored from another URL where the 'news-and-events' is stored in a different location. For example the 'result' variable reads the top level UR…

    • 0 replies
    • 1.4k views
  37. Hello all, I'm trying to get the last two sections of a pathname using jquery's exec function. For example: http:/localhost/sites/testsite/page I can retrieve the last item by using : var path = window.location.pathname; var result = /[^/]*$/.exec(pathname)[0]; And then displaying 'page' by printing the variable result. I've tried using: var path = window.location.pathname; var result = /[^/]*$/.exec(pathname)[1]; I've tried different combinations and of this but none of them seem to work. Can anyone help?

    • 1 reply
    • 1.1k views
  38. Started by Dredd2000,

    Hello again, I've designed a jquery menu using nested ul lists. This is in share point so the classes are all the same name, (including ul tags and li tags, so I can't change these names which is really frustrating. Anyway here's the code <ul id='zz13_RootAspMenu'> <li class='static'> menu text <ul class='static'> <li class='static'> Sub menu text </li> </ul> </li> </ul> I've tried a couple of ways to toggle the sub menu text here they are: [code] $('#zz13_RootAspMenu…

  39. In general lines , to be brief , I don´t manage to align some boxes of text built with <article> Below a basic unit , witness class is an unsuccesfull attempt to center such thing. Align to the right as such elements are it hurts the layout. Would please suggest me something else ? Thank you so much. .witness { text-align: center; } <div class="witness"> <article class="content_bg1 pad__1"> <div class="container"> <div class="row"> <div class="grid_6"> <div class="block1"> content .............. </div> </div> </div> </div> </div> </article> </div> </section>

  40. Started by JrBuds,

    I am trying to divert the page domain,co,uk/news.html to domain,co,uk/news I thought it would be simple but cannot figure it out. Any advise would be awesome, thanks.

    • 1 reply
    • 1k views
  41. Hello all, I'm using the :nth-child element to style a nested list here's the order of the list: <div id ='sideNavBox'> <ul id="zz13_RootAspMenu"> <li class='static'> <a>menu text</a> </li> ......... ......... <li class='static'> <ul class='static'> <li class='static'> sub menu text </li> </ul> </li> </ul> The list was generated using Sharepoint so the class and id names are a bit odd, (and I can't change them either). I'm using jquery to dynamically change the colour of a header text for every link, however, the nth-child seems to effect not only the …

    • 3 replies
    • 1.2k views
  42. Started by CreativeSheep,

    Creating a screen size for every width is insane. Like many, I prefer to keep it to three image sizes, that and for my sanity. The problem is, I need a interpolater that if say in my situation, I have an image designed for 320px and the width gets changed to 480px, 160px difference the interpolater can fill in the missing space, intelligently ?

  43. Started by CreativeSheep,

    I've run into an issue with multiple background images. When I turn off the second background-image, the first background-image is shown, or vise versa, how come I can't have multiple background-images successfully, what is going wrong ? #element { position:relative; background-image:url() // FIRST / TOP background-image:url() // SECOND / BOTTOM background-repeat:no-repeat/repeat //etc

  44. Started by abeer,

    Hi there, i am facing problem with my success message bar. here is <div class="message">Successfully added .</div> <input id="Button1" type="button" value="add" class="frmButton" /> here is javascript... <script> $(document).ready(function(){ $("#Button1").click(function(event){ $(".message").show(); $(".message").fadeOut(2500); }); }); </script> and here is the css .message { display: none; margin: 0 0 13px; padding: 10px; border: solid 1px #bd8; } Its working fine ... after clicking add button a message appears and dissolve after 1 or 2 sec . but form not subm…

  45. I wondered if anyone here has any experience with using Compass with the Sass CSS precompiler. It keeps lagging my computer when trying to watch a file with compass watch file.scss So, I've done a lot of digging behind the scenes to try and get to the bottom of why Compass keeps lagging when I try to watch a project. I've updated everything I can think of to try and get to the latest versions of Ruby, Sass and Compass. Sass does not lag but Compass totally consumes my CPU and RAM when I watch a file. Sass Version: Sass 3.4.13 Compass Version: 1.0.3 Ruby Version: 2.2.1p85 [i386-mingw32] Windows Version: Windows [6.1.7601] These are all the…

  46. Started by CreativeSheep,

    This site doesn't have the widths for MS Surface 2/3 and the Blackberry passport, anyone know their widths ?

  47. Hello, Looking for some guidance in what would be a best practise to make a web page with fast page transitions. Ive looked into it a little and ive seen a plugin called smoothstate which looks good for it and I have also seen an example done with Angular JS. But I am not sure whats best to use for this sort of web page. ill show you an example of what I mean: http://weblinc.github.io/jquery.smoothState.js/ these do it very well.

  48. Hello all, I'm designing a website using Sharepoint 2013 and I've designed a snippet of jquery to display a menu when then user hovers over a side menu, (which in turn contains a sub menu within one of its links). This works fine but unfortunately when the user clicks on other links on the menu the same sub menu is activated. If you've worked with Sharepoint before you will know that it generates its own code, (including div tags, which are all the same). Here's the code: $(document).ready(function () { $('#zz13_RootAspMenu > li > a').mouseover(function() { $('#zz13_RootAspMenu li ul').slideDown(); }) $('#zz13_RootAspMenu > li > a'…

    • 2 replies
    • 1.1k views
  49. Started by dpuk44,

    I have a containing div that holds a background image. Within this I have another div containing text which I want to center horizontally and vertically. I have played around for a while and am not getting the result I want. I can center the text using text-align: center to the container div, but if I add a padding-top to this div the background image starts to zoom in. Any ideas? <div class="header-background-image" style='background-image: url(<?php header_image(); ?>)'> <div class="container"> <?php dynamic_sidebar( 'home-page-banner' ); ?> </div> </div> header-background-image .header-background-image { padding…

  50. I've recently started teaching myself Javascript. I'd thought I'd see how object orientated prorgamming is handled in Javascript and as a result have written up this simple player creation and am just wondering whether I'm approaching this correctly? /** * Player Constructor */ function Player() { this.username; this.password; } /** * Player Username Setter * * @[member="param"] username * The Username to be set */ Player.prototype.setPlayerUsername = function(username) { // Check undefinied if(typeof username != 'undefined') { // Set Player Username this.username = username; …

    • 1 reply
    • 1.3k views

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.