Mac Problem

Draven

New Member
Hello,

I have a big proble with the website of a client because of the working of MacOSX with Safari browser

I'm using a Javascript that is invisible for divs. I have ordered the float:left in both divs with absolute position. The first div works but the second one doesn't work side by side with the first one.

here is an extract of the program code:

_________________________________________________________
Java Script:

function show(id) {
d=document;
d.getElementById("cat1").style.display="none";
d.getElementById("cat2").style.display="none";

d.getElementById(id).style.display="inline";

}

Html

<body>
<div style="float:left; width:200px;"><a class="main" href="#" onclick="show('cat1')">bla</a></div>
<div class="sub" id="cat1" style="display:none; position:absolute; float:left;">
<a class="sub" href="#">bla1</a><br />
<a class="sub" href="#">bla 1</a><br />
</div>
<br style="clear:both;"/>
<div />
<div style="float:left; width:200px;"><a class="main" href="#" onclick="show('cat2')">blabla</a></div>
<div class="sub" id="cat2" style="display:none; position:absolute; float:left;">
<a class="sub" href="#">bla2</a><br />
<a class="sub" href="#">bla 2</a><br />
</div>
<br style="clear:both;"/>
<div />
</body>
</html>

___________________________________________________


The website work with (IE,Firefox,Safari,Opera,Chrome under Win), I'm completely lost, thank you in anticipation...

sorry for my poor English...

LG

Draven
 

bluecollar01

New Member
I'm not sure that I understood the question correctly but it sounds like you are having trouble positioning the two divs side-by-side. If thats correct then remove your break tag and add the CSS>display>inline attribute to both divs. That should place them side-by-side. Thanks.
 
Last edited by a moderator:
Top