RE: Help me with my new website!
May 8, 2018 at 11:03 pm
(This post was last modified: May 8, 2018 at 11:06 pm by bennyboy.)
(May 7, 2018 at 4:21 am)FlatAssembler Wrote: I guess you don't see the formatting because I wasn't using web safe fonts.
By the way, do you have an idea how to make popups in a relatively positioned container without using inline CSS and inline JavaScript? I have made them here, the code doesn't look nice, the popups aren't correctly positioned after you refresh the page in Firefox (I don't know why, they apparently are before you refresh the page), and they aren't correctly positioned at all in Internet Explorer 6 (I don't know why, it otherwise appears to support the directives I was using):
http://flatassembler.000webhostapp.com/I...esian.html
Code:<span onmouseenter="this.children[1].style.display='block';this.children[1].style.top=this.getBoundingClientRect().top-45;" onmouseleave="this.children[1].style.display='none'">
<span>*romk</span>
<span style="display:none;position:absolute;background:black;color:#EEEEEE;width:120px;text-align:center;font-size:12px;font-family:Verdana;opacity:0.9;">Compare Lithuanian "ranka" (hand).</span>
</span>
(hand)-*lima (hand/five)<br/>
1) IE6 is dead. Let it die, and move on. Nobody has it except you, and nobody should.
2) I don't know exactly what you are trying to do. When I do popups, I have them centered right in the middle of the screen. Using auto margins should work fine.
As for your code, try the following, as I find it simpler:
1) Give your object a unique ID.
2) Use jQuery with the "#" prefix on the object name, and the built-in hide() or show() methods.
3) Keep your script separate from the objects. It's much easier to look at the beginning of a page's markup than to sift through many objects trying to read individual code.
I anticipate that you won't want to use unnecessary bandwidth for jQuery. The script is only about 100k, and gets cached, so you really shouldn't worry about it. Just worry about making coding easier for yourself.