Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Day

  1. Well just incase anyone is interested, I thought about it more and changed my approach. To reiterate, the goal was to change specific lines of code with something else based on which subdomain your on. so for example: on www.example.com show "WWW Heading" on sub1.example.com show "Sub 1 Heading" on sub2.example.com show "Sub 2 Heading" the 3 ways I could think of for doing this were: Option 1: create an array for the original string and one for each sub domain: var original = [ 'WWW Heading', 'img/www/img.png'];var sub1 = [ 'Sub 1 Heading', 'img/sub1/img.png']
  2. Hey all, Is there anything wrong with using a string for a object property name/key? for example: var swaps = { 'this' : 'that' } My goal is to create an object containing code that needs to be swapped based on certain conditions and I'd like to avoid having to loop through 2 arrays or objects to find the swap with a matching index. Thanks in advance!
  3. So I've never made retina images or any images that have more than one size, but when I forgot what size favicons were I looked it up and found pages saying to make multi-layered or multi-resolution favicons. I read a few tutorials and most mention using an online tool. That's great, but I'd like to understand more then just how to upload an image to a website and download my .ico file. Can anyone explain how to make multi-layered favicons with Photoshop? Do I just have each size on a separate layer? Do the layers need to follow a specific naming convention? Is this the same way retina images
  4. Oh I didn't test it (I should have) I just assumed I was doing something wrong when it got color coded as a regular expression.
  5. I'm trying to create an equation and would prefer not to split it into different variables. Is there a way to divide twice on the same line and avoid created a regular expression? example: var eq = (5/5)/(5+5); Thanks,
  6. If your looking for a hobby and enjoy coding then PHP/SQL may be the way to go, but if your aim is to get a career than the quickest route is to learn HTML and CSS as Ingolme mentioned. But these skills alone will make it hard to compete in the workforce unless you learn how to design in Photoshop as well.If you really dedicate a solid year to learning HTML, CSS, Photoshop, and best practices, I would then look for a job as a web designer at big corporation. Where I'm from in the states, small agencies will pay web designers $25-$45k/year, but at the big company I work for, they start web desi
  7. Awesome! Thank you. I didn't realize I could use 'this' here. I already had some other functions, activate() and deactivate() for another part that I am reusing. This is what I ended up with: for (i=0; i<_fsMenuItems.length; i++) { _fsMenuItems[i].onclick = activateMenuItem;}function activateMenuItem() { for (i=0; i<_fsMenuItems.length; i++) { deactivate(_fsMenuItems[i]); } activate(this);}
  8. I'm adding onclick events to an array of elements and each one should get the .active class after being clicked. I've got 2 ways to make it work, but can someone help me to understand the difference between the 2? And also let me know if there is a better option? for (i=0; i<_fsMenuItems.length; i++) { // Option 1 (function(index) { _fsMenuItems[index].onclick = function() { _fsMenuItems[index].className += ' active'; } })(i); // Option 2 _fsMenuItems[i].onclick = (function(index) { return function(){ _fsMenuItems[index].className += ' active'; }; })(i);} Thank you!
  9. I'm glad my curiosity led me to open up this thread. Hadien and justsomeguy, you made something that seemed so complicated very simple and easy to understand. Thank you.
  10. While it wouldn't actually watermark your images or stop people from saving the images without the water mark on them, it is possible to place the watermark over top the image by making the following changes: $blog_query = " SELECT blog_id, blog_picture_url, blog_title, blog_message, blog_created_date, blog_edited_date, blog_userid FROM blog ORDER BY blog_id DESC LIMIT 5 "; $blog_result = $mysqli->query($blog_query); // If bigger than 0 if ($blog_result->num_rows > 0) { echo "<div class='home_blog_wrapper'>"; // Wrapper echo "<div class=
  11. it looks like the images are already centered in their parent div: "ch-info".
  12. This is true for all web technologies, but take the time to really understand the vocabulary. It helps to better follow any tutorials/explanations and helps when trying to search for answers/resources or ask for help.
  13. Or if you want to keep your js and styles separate. After you get the value you can add a class such as 'greenRow' with a transition property and then remove the class. The transition will create the effect but only in browsers that support it.
  14. What he said ^But on another note. That Twitter logo goes against Twitter's brand guidelines.Might be worth looking in to: https://about.twitter.com/press/brand-assets
  15. I don't have much to contribute without seeing the code first, but just wanted to point out how true a statement this is. Nothing is over the top when you're learning. I held myself back for a while because I always felt like everything I tried was the wrong/hard way (over the top) and it was very discouraging. The only way I was able to finally start excelling was to just make things work however I could, then go back later and see if there was a better way. The more solutions you can come up with, the better you'll be at problem solving.
  16. Can you send a link to your page or attach your html/css?
  17. What specifically are you trying to center? I only see an image of a diamond under the header.
  18. http://w3schools.invisionzone.com/index.php?showtopic=49103&view=&hl=&fromsearch=1
  19. Are any of the styles working? Is the table nested inside another element that could be overiding the class styles?
  20. I have a script that is using cloneNode to add fieldsets to a form. After I use cloneNode, I'm attempting to search through the new node's children to change id attributes, however nextSibling is returning an empty text node instead of the fieldset.After the first one is cloned, the and I clone the second, nextSibling begins to return a fieldset. Im not sure why the first one won't work.Can anyone offer some insight?
  21. I'm unsure what having 2 backgrounds has to do with max and min dimensions. Can you explain a little more what it is you're trying to do?
  22. I have no idea what your question is
  23. Try replacing your link styles with this: #carousel ul li a.slider_title { background: rgba(0,0,0,.7); color: #fec700; text-align: center; font: normal 13px Oswald; display: inline-block; padding: 3px 0;} I changed the background to rgba(0,0,0,.7) which sets the red, green, and blue values to 0 which is black and then sets the alpha (opacity) to .7 (70%). I added display inline-block to make the background expand around the text's box model instead of just highlighting the text. Lastly I added some padding to give a little breathing room on top and bottom of the text and to take
  24. I think you need to upload it first then post the url
  • Create New...