PDA

View Full Version : show hide Image wrapp is out of place in IE



Oak
02-03-2008, 05:51 PM
http://www.capoeiracanal.co.uk/capoeira-classes-mon-fri.php

Please can someone find a solution to this. I have tried adjusting the left: px but it ever is out in IE or FF??

Please scroll over
Monday and Friday evenings 7 pm - 9 pm.

Thank you!

Nile
02-03-2008, 05:56 PM
Try making a div that will hold both of the 2 sidebars, then use a getElementById.
EDIT: You posted in the java forum not javascript!
2nd EDIT: Can we see your code?

Oak
02-03-2008, 06:09 PM
Try making a div that will hold both of the 2 sidebars, then use a getElementById. sounds good, but don't know what a get element is!

Ok sorry for posting here! should I repost in the javascript?


2nd EDIT: Can we see your code?

??

Nile
02-03-2008, 06:10 PM
Can we see your js code so I can edit it and turn it into getElementById.

Oak
02-03-2008, 06:13 PM
Ok, sorry! yes yes.


<script type="text/javascript" language="JavaScript"><!--
function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}
function ReverseDisplay(d) {
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
//--></script>

Nile
02-03-2008, 06:22 PM
Put both of the things in the same div.

Oak
02-03-2008, 06:31 PM
Hey sorry, wrong code. This is it.


<script type="text/javascript" language="JavaScript"> <!--
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
//-->
</script>
<script type="text/javascript">

Nile
02-03-2008, 06:36 PM
Like I said
Put both of the things in the same div.

Oak
02-03-2008, 06:43 PM
How ?


<div id="mon-fri-wrapper" "fri-mon-wrapper" style="display: inline;">

Nile
02-03-2008, 06:52 PM
You would need to put 'em both in the same div like this:

<div id="mon-fri-wrapper" style="display: inline;">
And then you would want to create a <span> with the id of: "fri-mon-wrapper"
So like this:

<div id="mon-fri-wrapper" style="display: inline;"><!--everyhting--!><span id="fri-mon-wrapper"><!--Links--!></span></div>

Oak
02-03-2008, 07:04 PM
Like this?


<div id="mon-fri-wrapper" style="display: inline;">
<h3>Virgin Active</h3>
<h4><strong>Virgin Active Notting Hill 119 - 131 Lancaster Road W11 1QT.</strong>
<a href="javascript:void(0);" onmouseover="Tip(' &lt;img src=\'img/Map.jpg\' width=\'352\337\'>')" class="aor">Map</a><br /><br />
(Non Health club members welcome)
</h4><p class="or">Every Friday from 7pm to 9pm</p>
<h4>Tube: Hammermith &amp; City Line.
Busses: 7,23,52,70,295,452.<br /><br />
You can print out an application form by <a class="aor" href="javascript:pop(400,585,20,20,'capoeira-canal-appform-mon-fri.php','Application');">clicking here</a></h4>
<h3>David Game House</h3>
<h4><strong>David Game House 69 Notting Hill Gate W11 3JS.</strong><br /><br /><a href="javascript:void(0);" onmouseover="Tip(' &lt;img src=\'img/Map1.jpg\' width=\'352\337\'>')" class="aor">Map</a></h4>
<p class="or">Every Monday from 7pm to 9pm</p>
<h4>Tube: Central, District and Circle Lines.<br />Buses: 27,28,31,52,70,328<br />94,148,390,452.<br /><br />You can print out an application form by <a class="classes" href="capoeira-canal-appform-mon.php">clicking here</a></h4>
<span id="fri-mon-wrapper"><p><a onmouseover="ReverseContentDisplay('fri-mon-wrapper'); return true;" href="javascript:ReverseContentDisplay('fri-mon-wrapper')" class="aor">Monday and Friday</a> evenings 7 pm - 9 pm.</p>
</span></div>

Oak
02-03-2008, 07:07 PM
Sorry mistake, double post.

Nile
02-03-2008, 07:25 PM
Yes try that.

Oak
02-03-2008, 07:32 PM
Well that views pretty messsed up in FF & IE6?

I am adding these styles, but in IE it's all still way out?


<span id="fri-mon-wrapper" style="display:none; position:absolute; left:-25px; top:0px; border-style:solid;">

Nile
02-03-2008, 07:36 PM
I don't know Im not that good at js.

Oak
02-03-2008, 07:46 PM
Ok, well thanks for trying even though it did take a long time to get no where!

Just to say that your PHP: signature is a bit BIG, it makes it difficult to read your replies!

Oak
02-05-2008, 08:09 PM
Am I to take it that this is unsolvable?