Jump to content


Member Since 07 Dec 2011
Offline Last Active Feb 17 2017 07:42 AM

#268226 Middling the title

Posted by DarkxPunk on 08 September 2013 - 04:32 AM

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. :D

#257352 Redirecting website to an new tab without hyperlink

Posted by DarkxPunk on 04 January 2013 - 03:17 AM

I will give you this one freebie but learn js!
<!doctype html><html>	<head>		<title>NewTab</title>		<style>#newTab {				margin: 0 auto;				border: 1px solid #000000;				padding: 25px;				width: 50px;				height: 50px;				background: red;				color: #ffffff;			}		</style>		<script>			function newTab() {				window.open(				'about:blank','_blank'				);			}		</script>	</head>	<body>		<div id="newTab" onclick="newTab()">NewTab</div>	</body></html>
the on click can be used on most any element. You can also put the js in the body, but put it before your button.

#257304 Redirecting website to an new tab without hyperlink

Posted by DarkxPunk on 03 January 2013 - 02:12 AM

window.open( 'https://support.wwf.org.uk/earth_hour/index.php?type=individual', '_blank' // <- This is what makes it open in a new window.);That's js, use it in a function and call it onclick of any image, div, word, etc.

#256024 Help with positioning

Posted by DarkxPunk on 09 December 2012 - 02:45 AM

<html><header><title>Blah</title><style>body {font-family: "Mona Lisa Solid ITC TT","Modern No. 20",Garamond,Gabriola,serif;font-size: 1.4em;}#Tabs {width: 903px;display: block;margin-right: auto;margin-left: auto;overflow: hidden;}#Tabs ul {padding: 0px;list-style-type: none;}#Tabs ul li a {float: left;margin-top: 0px;display: inline-block;margin-right: 5px;line-height: 1em;padding-left: 10px;background: #f6f6f6;border: 1px solid #ccc;border-bottom: 0px;-moz-border-radius-topleft: 4px;border-top-left-radius: 4px;-moz-border-radius-topright: 4px;border-top-right-radius: 4px;width: 150px;height: 50px;color: #000000;text-decoration: none;font-style: italic;}#Tabs ul li a:hover {text-decoration: underline;}#content {background-image: url(images/bg_image_med.jpg);background-repeat: none;border: 1px solid #000000;height: 500px;width: 900px;margin-left: auto;margin-right: auto;}#Content_Area {padding: 15px;overflow: hidden;width: 620px;height: 500px;}p { padding: 15px; }</style></header>	<body bgcolor="#EDEDED"><div id="header"><p><span id="title"> AVA </span><br> my challenge for the 2013 year is to record one original song or musical piece per month.</p></div><div id="Tabs"><ul><li><a href="Challenge.html">This month's song</a></li><li><a href="Compositions.html">Compositions </a></li><li><a href="Covers.html">Covers </a></li><li><a href="hire.html">Hire AVA to sing </a></li></ul></div><div id="content"><div id="Content_Area"><p>...the text...</p></div><div id="followbox">links to RSS feeds, etc., here</div></div></body></html>

#254654 AdChoice Ads

Posted by DarkxPunk on 13 November 2012 - 09:41 AM

I use ad blockers so I never noticed this but damn... Yeah switch your ad service guys!

#253758 Creating own template for website

Posted by DarkxPunk on 27 October 2012 - 07:51 AM

Best way is a little simple PHP. This was what introduced me to php, and if your going to get heavy into coding learn PHP and js, etc.Create a HTML file with your nav bar, and in place of your navbar in the pages put <?php include"nav.html";?> all your pages must now be labeled as .phpGood luck

#249397 overflow?

Posted by DarkxPunk on 24 August 2012 - 02:28 AM

Change width:auto; to a width or min-width in px. I don't know why, but that fixed the problem. I'm sure someone knows and will post the explanation shortly.

Auto fits it to the screen size. You collapse the screen space the nav compensates.

#248363 Getting an invisible margin to go away...

Posted by DarkxPunk on 09 August 2012 - 04:41 AM

Give the header the same height as the other divs so 141px. Fixed it for me.

#229903 Side Menu

Posted by DarkxPunk on 11 January 2012 - 05:11 AM

I wanna help but I don't understand what you want. Can you describe it saying horizontal or vertical menus, or do a image of how you want it to look..?

#229609 Opinions On My Local Zeitgeist Chapter Website

Posted by DarkxPunk on 07 January 2012 - 10:02 AM

Just looking for comments of all sorts. Coding redundancies, spelling errors, bad layout, unclear buttons, etc.I am open to all critiques.http://www.beta.zeitgeist-toronto.com/Quick background on me. Been a amateur coder/scripter for about 3 years and have really been upping the ante since about 6 months now finally diving head first into JavaScript and hoping to start understanding php and databasing so I can start making dynamic content.Thanks in advance for your critiques.

#229388 Toggle Function Not Working With Img Element

Posted by DarkxPunk on 04 January 2012 - 04:15 PM

Hey everyone! Happy new year! So I have been working with this toggle function:variable == '' ? '' : ''In simple variable is what your toggling, then you have a parameter and if (if = ?) the second parameter is false (which you want it to be) it will do else (else = :) the third parameter.Now it works 99% of the time and I am having trouble when I use the img element.This is my code, any help? HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>Map</title><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><script type="text/javascript" src="js/buttons.js"></script></head><body><h2>Street View</h2><hr /><a onclick="oiseMap(this)">Interactive Map</a><div class="oiseMap"><img src="http://zeitgeist-toronto.wikispaces.com/file/view/map_oise.png/208416866/map_oise.png" width="700" /></body></html>
function oiseMap(a) {var element = a.nextSibling;while (element.className != 'oiseMap') {element = element.nextSibling;} element.innerHTML = element.innerHTML == '<img src=\"http://zeitgeist-toronto.wikispaces.com/file/view/map_oise.png/208416866/map_oise.png\" width=\"700\" />' ? '<iframe width=\"700\" height=\"500\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"http://maps.google.ca/maps/ms?msa=0&amp;msid=203146017338240958552.0004b3ca872d9d4e63b8a&amp;ie=UTF8&amp;t=h&amp;vpsrc=6&amp;ll=43.668411,-79.398692&amp;spn=0.002014,0.00375&amp;z=18&amp;iwloc=0004b3ca89be3700fc4f5&amp;output=embed\"></iframe><br /><small>View <a href=\"http://maps.google.ca/maps/ms?msa=0&amp;msid=203146017338240958552.0004b3ca872d9d4e63b8a&amp;ie=UTF8&amp;t=h&amp;vpsrc=6&amp;ll=43.668411,-79.398692&amp;spn=0.002014,0.00375&amp;z=18&amp;iwloc=0004b3ca89be3700fc4f5&amp;source=embed\" style=\"color:#0000FF;text-align:left\">OISE</a> in a larger map</small>' : '<img src=\"http://zeitgeist-toronto.wikispaces.com/file/view/map_oise.png/208416866/map_oise.png\" width=\"700\" />';}
My goal is to have the map switch from the iFrame to the image and back, the flip flop. It does not work. It always reloads the iframe... Any ideas? Thanks!

#229097 Hide A Div Without Declairing The Id

Posted by DarkxPunk on 24 December 2011 - 06:39 PM

This my be impossible but it does not hurt to try. Is it possible to hide a div without declairing its id. The purpose I see for this is so I can use one function multiple times within a single page. My idea is something along these lines. You have a button say: Show. When you click Show it looks for the div that follows it and sets it to display=none; so: Clicking Show will show<div><a onclick="hideshow()">Show</a></div>This div below<div>Content to Show</div> and if I click show it will hide the content. The key is the function must look for the following div and hide it using display=none; Any ideas? Is it possible?

#228749 One Function, Same Action, Multiple Times On A Page.

Posted by DarkxPunk on 20 December 2011 - 06:46 AM

Let me clarify. I have one function function showStuff(){document.getElementById("stuffLink").innerHTML = "<a onclick=\"hideStuff()\">Hide Stuff</a>";document.getElementById("stuff").innerHTML = "stuff";} This function changes a buttons action and displays "stuff". Now say I wanted to display "stuff" multiple times in different places using different buttons. For example <div id="stuff1"><p>This is stuff (<span id="stuffLink"><a onclick=\"showStuff()\">Show Stuff</a></span>)</p></div><div id="stuff"></div><div id="stuff2><p>This is the same stuff (<span id="stuffLink"><a onclick=\"showStuff()\">Show Same Stuff</a></span>)</p></div><div id="stuff"></div> Now this code simply when I click either "Show Stuff" or "Show Same Stuff" will take the first id="stuff" and display "stuff". What I want is if I click "Show Stuff" it will display "stuff" in the first id="stuff" and if I click "Show Same Stuff" it will display "stuff" in the second id="stuff". It must be possible. Now I know I could simply repeat the function and make the id's unique but that is allot of code. Is there a simpler way? Let me know, Thanks!