![]() |
|
|||||||
| Register | FAQ | Members List | Arcade | Dev Directory | HB Bank | Calendar | Search | Today's Posts | Mark Forums Read |
| HTML / XHTML / CSS Discuss HTML, XHTML and CSS coding in this forum. |
| Have A Look At Some Of Our Webmaster Related Sponsors! | |||||
![]() Script Directory |
![]() Advertise Here |
![]() Market Leverage |
![]() Free Templates |
![]() 3D Guide-characters |
![]() Advertise Here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
New Hunter
|
what is wrong with my code!??
The link i created dont work on internet explorer!:( check it wit internet explorer : Welcome To R.Z Paintball Arena | Home.) here is the code of html: Code:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#dropmenudiv{
position:absolute;
border:1px solid black;
border-bottom-width: 0;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
}
#dropmenudiv a{
width: 100%;
display: block;
text-indent: 3px;
border-bottom: 1px solid black;
padding: 1px 0;
text-decoration: none;
font-weight: bold;
}
#dropmenudiv a:hover{ /*hover background color*/
background-color: yellow;
}
</style>
<script type="text/javascript">
/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (Dynamic Drive DHTML(dynamic html) & JavaScript code library)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive DHTML(dynamic html) & JavaScript code library for full source code
***********************************************/
//Contents for menu 1
var menu1=new Array()
menu1[0]='asdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa dasdasdsa d'
//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://nba.com">NBA</a>'
menu2[1]='<a href="http://google.com">GOOGLE</a>'
menu2[2]='<a href="http://me.com">ME</a>'
var menuwidth='px' //default menu width
var menubgcolor='#626465' //menu bgcolor
var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?
/////No further editting needed
var ie4=document.all
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
</script>
<title>Welcome To R.Z Paintball Arena | Home.</title>
<link href="default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {
color: #0033FF;
font-weight: bold;
}
-->
</style>
</head>
<body background="http://www.devhunters.com/images/main.gif"><a href="home.php" id="link" style="margin-left:40px">Home</a> <span class="style1">|</span><a href="about_us.html" id="link" style="margin-left:10px">About Us</a> <span class="style1">|</span><a href="contact_us.php" id="link" style="margin-left:10px">Contact Us</a>
<a href="#" class="style2" id="link" style="margin-left:70px" onclick="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Join Our NewsLetter</a>
<table width="400" border="0" style="margin-left:570px" id="date1">
<tr>
<td><? = date("d");
=date("l");
=date("F");
= date("Y");
=date("i");
=date("H")+8;
="" -24;
echo" , "."-----"; if(>24){echo "It is now : in Beirut";}else{
echo"It is now : in Beirut.";}?> </td>
</tr>
</table>
</body>
</html>
Dont look at the php code i was just trying to create one as im new to PHP! and this is the CSS script: Code:
body{
width:auto;
height:42em;
}
#img{
margin-left:-7.5em;
width:0
}
#link{
color:#CCCCCC;
text-decoration: none;
margin-top:-20em;
}
#date1{
color:#CCCCCC;
text-decoration: none;
margin-top:-1.5em;
font-size:0.9em
}
__________________
Anthony.Riachy
Last edited by SpOrTsDuDe.Reese; 04-23-2008 at 02:47 PM. |
|
|
|
|
|
#2 (permalink) |
|
Senior Moderator
|
I went to the website, what link are you talking about? Please only show the code of the link that isn't working. Along with the code of the link, please show us ONLY the JavaScript/PHP/CSS that applies to the code. Then come back to us. In the future please add code tags. I added them for you this time.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
|
|
#3 (permalink) |
|
New Hunter
|
well the home and about us and contact us!!! in ie it doesnt work as a link!
the code isHTML Code:
<a href="contact_us.php" id="link" style="margin-left:10px">Contact Us</a> PHP Code:
Code:
#date1{color:#CCCCCC;
text-decoration: none;
margin-top:-1.5em;
font-size:0.9em}
__________________
Anthony.Riachy
|
|
|
|
|
|
#4 (permalink) |
|
Senior Moderator
|
Hmm, are you testing in IE6 or 7.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
|
|
#6 (permalink) |
|
Senior Moderator
|
Hmm, well I honestly don't know what's wrong with the code. Can you narrow it down more, show all the JavaScript functions associating with the link.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
|
|
#7 (permalink) |
|
Senior Moderator
|
Try validating the page.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
|
|
#8 (permalink) |
|
Senior Moderator
|
Try giving position:relative to all of those elements with a negative top margin.
That navigation should be marked up as an unordered list. I suggest you learn how semantics apply to X/HTML. Semantics is really a very important subject when it comes to X/HTML. These three articles explain how to style lists. A List Apart: Articles: CSS Design: Taming Lists Listutorial: Step by step CSS list tutorial How to Use CSS to Position Horizontal Unordered Lists - WebReference.com
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
|
|
#10 (permalink) |
|
New Hunter
|
It worked with "float:right" Btw 10x a lot!!! I still have one question: when you browse this site are the dimensions good? Do you see a white bar on the right??
Does the layout appear on all the page?? or just a piece of it??? and if you please can print screen it and send it to me!! Thanks a lot... I appreciate it!
__________________
Anthony.Riachy
|
|
|
|
|
|
#11 (permalink) |
|
Senior Moderator
|
Not for me. No problem :). That's what I'm a moderator for lolz. It's blocked by my school (I'm 16 ^_^) but when I get home I'll take a look at it.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|