Log in

View Full Version : Just Created External Style Sheet: Something's Wrong



jihanemo
11-10-2008, 01:13 AM
http://americanchic.net/testpagecopy.html - I just created an external style sheet for this page but the images in my image gallery feature are not showing up. This is what the page should look like (this page uses internal style sheets): http://americanchic.net/testpage.html What did I do wrong? How do I fix it?

Here is the external style sheet - http://americanchic.net/style.css

Moshambi
11-10-2008, 01:48 AM
You should post some code first and we might be able to help work you through this problem.

bluewalrus
11-10-2008, 02:20 AM
moshambi you can easliy get code from what was posted.

this shouldnt be in the css this is java


/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.americanchic.net/stamquiltedchainbags.html"> Quilted Chain Bags<\/a>'
menu1[1]='<a href="http://www.americanchic.net/ledixmotorcyclebags.html"> Le Dix Motorcycle Bags<\/a>'
menu1[2]='<a href="http://www.americanchic.net/spybags.html"> Spy Bags<\/a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="http://www.americanchic.net/bracelets.html">Bracelets<\/a>'
menu2[1]='<a href="http://www.americanchic.net/earrings.html">Earrings<\/a>'
menu2[2]='<a href="http://www.americanchic.net/necklaces.html">Necklaces<\/a>'

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="http://www.americanchic.net/wayfarersunglasses.html"> Wayfarer Sunglasses<\/a>'
menu3[1]='<a href="http://www.americanchic.net/aviator.html> Aviator Sunglasses<\/a>'
menu3[2]='<a href="http://www.americanchic.net/beltbucklesunglasses.html"> Belt Buckle Sunglasses<\/a>'
menu3[3]='<a href="http://www.americanchic.net/oversizedharlotsunglasses.html"> Harlot Sunglasses<\/a>'
menu3[4]='<a href="http://www.americanchic.net/oversizedsunglasses.html"> Oversized Sunglasses<\/a>'
menu3[5]='<a href="http://www.americanchic.net/sideaccentsunglasses.html"> Side Accent Sunglasses<\/a>'
menu3[6]='<a href="http://www.americanchic.net/squaresunglasses.html"> Square Sunglasses<\/a>'
menu3[7]='<a href="http://www.americanchic.net/wraparoundsunglasses.html"> Wrap Around Sunglasses<\/a>'

//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="http://www.americanchic.net/handbagssale.html"> Handbag Sale<\/a>'
menu4[1]='<a href="http://www.americanchic.net/jewelrysale.html"> Jewelry Sale<\/a>'
menu4[2]='<a href="http://www.americanchic.net/sunglassessale.html"> Shoe Sale<\/a>'
menu4[3]='<a href="http://www.americanchic.net/sunglassessale.html"> Sunglasses Sale<\/a>'

//Contents for menu 5
var menu5=new Array()
menu5[0]='<a href="http://www.americanchic.net/shopashleyolsenstyle.html"> Ashley Olsen<\/a>'
menu5[1]='<a href="http://www.americanchic.net/shopbeyoncestyle.html"> Beyonce Knowles<\/a>'
menu5[2]='<a href="http://www.americanchic.net/shophilaryduffstyle.html"> Hilary Duff<\/a>'
menu5[3]='<a href="http://www.americanchic.net/shopjessicasimpsonstyle.html"> Jessica Simpson<\/a>'
menu5[4]='<a href="http://www.americanchic.net/shopkatemossstyle.html"> Kate Moss<\/a>'
menu5[5]='<a href="http://www.americanchic.net/shopkatieholmesstyle.html"> Katie Holmes<\/a>'
menu5[6]='<a href="http://www.americanchic.net/shoplaurenconradstyle.html"> Lauren Conrad<\/a>'
menu5[7]='<a href="http://www.americanchic.net/shoplindsaylohanstyle.html"> Lindsay Lohan<\/a>'
menu5[8]='<a href="http://www.americanchic.net/shopmarykateolsenstyle.html"> Mary Kate Olsen<\/a>'
menu5[9]='<a href="http://www.americanchic.net/shopnickyhiltonstyle.html"> Nicky Hilton<\/a>'
menu5[10]='<a href="http://www.americanchic.net/shopnicholerichiestyle.html"> Nicole Richie<\/a>'
menu5[11]='<a href="http://www.americanchic.net/shopparishiltonstyle.html"> Paris Hilton<\/a>'
menu5[12]='<a href="http://www.americanchic.net/shopvictoriabeckhamstyle.html"> Victoria Beckham<\/a>'


var menuwidth='165px' //default menu width
var menubgcolor='white' //menu bgcolor
var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"><\/div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)





}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


var ray={
randomPic:function(el,targ)
{
var img=document.getElementById(el).getElementsByTagName('img');
for(var i=0;i<img.length;i++)
img[i].onclick=function()
{
var oSrc=this.getAttribute('src'),
spltSrc=oSrc.split('.'),
concat=spltSrc[0]+'_big.'+spltSrc[1];
document.getElementById(targ).setAttribute('src',concat);
return false;
}
}
}
window.onload=function()
{
ray.randomPic('myul','default'); // ID of the ul element and the id of the target image
}
</script>

jihanemo
11-10-2008, 02:32 AM
Thank you, bluewalrus!