Go Back   DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums > Webmaster / Coding / Web Design Discussion > HTML / XHTML / CSS

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
3D Guide-characters


Advertise Here

Reply
 
LinkBack Thread Tools Display Modes
Old 04-23-2008, 02:17 PM   #1 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 42
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Default what's wrong with my code!?

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>&nbsp;&nbsp;<span class="style1">|</span><a href="about_us.html" id="link" style="margin-left:10px">About Us</a>&nbsp;&nbsp;<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.";}?>&nbsp;</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.
deatle is online now   Reply With Quote
Old 04-23-2008, 02:43 PM   #2 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

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>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 04-23-2008, 04:53 PM   #3 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 42
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Default

well the home and about us and contact us!!! in ie it doesnt work as a link! the code is
HTML Code:
<a href="contact_us.php" id="link" style="margin-left:10px">Contact Us</a>
when i add to it this link and its css
PHP Code:
<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.";}?>&nbsp;</td>
  </tr>
</table>
Code:
#date1{color:#CCCCCC;
text-decoration: none; 
margin-top:-1.5em;
font-size:0.9em}
__________________
Anthony.Riachy
deatle is online now   Reply With Quote
Old 04-23-2008, 07:49 PM   #4 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

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>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 04-24-2008, 10:37 AM   #5 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 42
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Default

both.... with some friends it works! with others it shows a white bar on the right!! i dont know what's happening to my codes!!!
__________________
Anthony.Riachy
deatle is online now   Reply With Quote
Old 04-24-2008, 10:48 AM   #6 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

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>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 04-24-2008, 11:25 AM   #7 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

Try validating the page.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+
Code:
<style type="text/css"> u { text-decoration: none; } </style>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 04-24-2008, 04:43 PM   #8 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

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>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 04-25-2008, 04:30 AM   #9 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 42
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Default

You know last time i figured out that when i remove the margin-left code :570px for the table of php code it works but the php code appears on the join our newsletter!! is there any way to send the table to the right?
__________________
Anthony.Riachy
deatle is online now   Reply With Quote
Old 04-25-2008, 04:33 AM   #10 (permalink)
New Hunter
 

Join Date: Sep 2007
Posts: 42
iTrader: 0 / 0%
Hunter Bux: 0
deatle is on a distinguished road
Default

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
deatle is online now   Reply With Quote
Old 04-29-2008, 07:05 AM   #11 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

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>
GameYin. Redesigning for DevPlooth.
SpOrTsDuDe.Reese is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 12:39 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios