Jump to content

DarkxPunk

Members
  • Posts

    465
  • Joined

  • Last visited

Everything posted by DarkxPunk

  1. Okay so I found a semi solution, but not a full solution… Here is the new code: function hideShowToggleAlt(l) { var element = l.parentNode.getElementsByClassName('hideShowContent'); element = element[0]; element.style.display = element.style.display == 'block' ? 'none' : 'block'; var input = l.getElementsByTagName('input'); input = input[0]; input.value = input.value == 'Hide' ? 'Show' : 'Hide'; } Why does it say object does not support this property or method? IE6 is a pain, but I guess this is what you gotta deal with to do the best backwards compatibility.
  2. Updated Post: Hello everyone, re tweaking this post to define a better goal. I want to build a cross platform, simple, backwards compatible HideShow toggle that mixes both modern methods and required outdated methods. This toggle will use both CSS tricks and JS as to give it the ability to be both modern and backwards compatible. If you are looking for the code so far please hit up the end of this post. Original Post: Hey there here is the code: function hideShowToggle(a) { var element = a.nextSibling; element = element.nextSibling; element.style.display = element.style.display == 'block' ? 'none' : 'block'; var input = a.childNodes; input = input[1]; input.value = input.value == 'Hide' ? 'Show' : 'Hide';} Works as a toggle in Safari, but when I try in IE6 it says I need to define an object. Please understand I am still in my infancy with JS, and I am trying to create a toggle that works from IE6 and up while still evolving using more modern methods (which I do not include in this post, but they are irrelevant to the JS) Thanks for any pointers. Michael
  3. You will notice I am using the proper code tags inside the spoiler tags… Now the reason…well I think it looks cleaner. Just me.
  4. Ah, well good to know for the future. Thanks.
  5. I checked the the working dir is correct, yet it still does not work the first example. Any other ideas?
  6. I have not done the testing yet, but I suppose that makes sense. What I don't understand is how :focus is set for all elements? Would it not have to be *:focus to be set for all elements? Thanks for any info, Michael
  7. Hi there, I am new to PHP, but have been playing with include for awhile. Today I can't get it to work the normal way I have always worked with it, here is my issue:
  8. Nope... Honestly its a static page for the most part with everything loaded using PHP... No odd css. Should I post the css?
  9. No, but it seems to be every div… Why IE and not any other browser? It's even only the newer IEs (9+ I did more checking).
  10. No open a tags, it happens any time I select a div too while using ie. No other browser. It is so confusing.
  11. Attached will be an image of this odd dotted line that appears on my site using IE. I have tested other sites, and other browsers with no issue. It only appears when I scroll down, and it stars where the original viewpoint ends... Any ideas? Thanks, Michael
  12. Thanks for that info, solved my problem.
  13. Hi everyone, So I got a container, and two divs inside. The inner divs are set to 50% each and inline-block. Now for some reason they do not stay side by side, but rather flow underneath. Like I can check the sizes and together they equal the parent div, so why the flowing underneath? Here is the HTML: And the CSS: Thanks for any help.
  14. Hi there, Here is a link to a video and the code outlining the trick: http://code.tutsplus.com/tutorials/quick-tip-multiple-borders-with-simple-css--net-12471 Now I think that is a great trick and thought I could use it for a instance on my site, but on an img rather than a div. I have toiled and tried and can't get it to work... Is it cause the img is inline? Now understand I am trying to do this with relative values which is possible (I have tested it with the div), so keep that in find. I have played with the display of the img, everything, and it does not want to add the second/third border. Here is one of my attempts: Thanks for any solutions or input.
  15. Hey everyone... So I am trying to create a site that has a header stuck to the top at 100% width and 50px height, a footer stuck at the bottom at 100% width and 50px height, and a div in between that fills up the remaining space. Now so far I got this: Now I can't seem to get the middle div to just fill in the space, no negative margins, padding, nothing seems to get it to fit... Any ideas? Also I would like it to be relative, not fixed. This is probably simple, but I can't seem to click. Thanks for any help.
  16. Hey there, I am self taught too so I know the feeling. So much so that I have disdain for templates "themes". Now with that it may be almost impossible to make this template have a sticky footer without completely rewriting allot. I don't know yet since I have not read the css... In the mean time while I look it over, the most important factor of making a sticky footer is three things. One, you need a container that holds all the content besides the footer. Two, you need a div that can push the footer down within the container. Three, you need to make the html/body with a height of 100%, probably most of the sticky footer code has how to do that with respect to IE. Now being a template its hard to edit the HTML framework but play around. I will look over your code and update you if you find nothing.
  17. I am not sure how to implement... And why can no one seem to address my imageObj displaying as undefined...
  18. Well the PHP is just pulling the file name... The JS is applying the path... I guess I could just have PHP do both... But still it does not solve the issue of imageObj showing undefined... ***Update*** I can't figure out how to get the PHP to add the path... I assume this line: echo 'imgArray['.$imgIdx.'] = "'.$img .'";'; adds the img file to the array... So should not echo 'imgArray['.$imgIdx.'] = "'. $dirPth+$img .'";'; add the path? (So confused) ***Update 2*** Going back and forth between PHP and JS is confusing *hurt brain* I fixed it: echo 'imgArray['.$imgIdx.'] = "'.$imgPth.''.$img .'";'; I added the variable $imgPth = 'images/slideshow/'; to get the proper path... ***Update 3*** Am I maybe mixing JQuery into my code?
  19. Yeah I got that working... So I think I figured out one issue, but my lack of understanding makes me unable to solve it... This one issue lies in the fact my array is not creating a proper array with the path included... I can't seem to figure out how to do it though... Also as I mentioned before, the imageObj comes up undefined and I can't figure out why either...
  20. So I am mixing some tutorials up to try and make a dynamic slideshow using AJAX... I got it to work just looping, but now I am trying to add buttons... I made all the changes, but still no luck... Here is everything: I keep getting imageObj as undefined... Anyway, thanks for any help.
  21. I agree with dsonesuk. If you make the #page_nav display: table-row and give it a height of 0 and a width of 100%, and than the #title display: table-cell. It works fine. Personally I think you could improve on the code using these suggestions so play around.
  22. I will keep playing with the layout... I probably will rewrite it again to try and clean up, and involve some of the suggestions you guys have made. I appreciate it. Once I make the changes I will post it here. In the mean time I have been attempting to apply this design (or at least elements), and have achieved good results. Sadly though because of IEs failure to support many basic features in earlier instalments of IE, I have run into odd issues... Specifically in this instance, for some reason my two divs are overlapping in IE8 and below. In my left div I have text and an image. In my right div, simply text. Now as I shrink the page the text (other than the headers) seems to resize correctly and wrap as required. But the image on the other hand just gets overlapped with the text, and even the headers do the same. I can't seem to understand why. Its almost like the header and image are being taken out of confinement of the div, and the div simply is only as wide as the text... Anyway, here is the code (Note: the reset has not changed) HTML: CSS: P.S. I am contemplating of adding IE comments to simply limit the width of the webpage for the troublesome browsers, but if a solution can be found...thats only more knowledge. Knowledge is good...
  23. I attempted it before I made the last post and all it did was clip all the content... When I zoom I want the box to grow too to fit the content zooming and just bring up scroll bars... Not clip my content.
×
×
  • Create New...