Welcome to WebmasterWorld Guest from 54.162.239.134

Forum Moderators: open

Message Too Old, No Replies

Newbie Question about DIVs in DW

     
4:33 am on Jul 9, 2005 (gmt 0)

10+ Year Member



I am trying to learn DW by playing around with it a bit. I have a pretty decent grasp of it for someone who just started out. My question is this.

Can anyone tell me why the div cell wont show up in my browser? Here is a copy of the code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="Again%20a%20new%20one" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW ¦¦ innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<div style="position:absolute; left:13px; top:93px; width:117px; height:332px; z-index:1">
<p>&nbsp;</p>
</div>
<table width=" 100%" border="0" cellpadding="10" cellspacing=" 0">
<tr>
<th height="65" bordercolor="#666666" id="top" scope="col"><h1>Test Page </h1></th>
</tr>
</table>
</body>
</html>

Thank you very much in advance.

4:55 am on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello RK: I know virtually nothing about DW, and write all code by hand
to avoid these and similar messes. I saw one thing though:

EVERYTHING between <!-- and --> is a COMMENT, not executable code.
Nothing so contained will ever happen. You could write poetry in there.

Is that the problem? Is the stuff between the marks what isn't happening? -Larry

6:14 am on Jul 9, 2005 (gmt 0)

10+ Year Member



<div style="position:absolute; left:13px; top:93px; width:117px; height:332px; z-index:1">
<p>&nbsp;</p>
</div>

Nope. Not sure how or why that is in there, but this is what is not showing up.

6:14 am on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is ok, in fact correct, to have comment tags around javascript - it just prevents it from being displayed on the page in older browsers.

This may be a problem:

<link href="Again%20a%20new%20one" rel="stylesheet" type="text/css">

specifically

Again%20a%20new%20one

The href should be pointing to your stylesheet.

That said, the div is showing up when I use that code. Just make the background coloured so you can see it:

<div style="background-color:#999999; position:absolute; left:13px; top:93px; width:117px; height:332px; z-index:1">

6:30 am on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



DOH! Thats right, I forgot. You can REM out JS lines and they still execute.
Please disregard everything I wrote above. -Larry
2:43 pm on Jul 9, 2005 (gmt 0)

10+ Year Member



Well first off, thank you very much for your comments.

I did add color to the CSS that is the "Again%20a%20new%20one" style sheet. I am not sure why it is adding the % signs unless DW automatically defaults to that in place of spaces (which now that I think of it, is probably the case). I have made about 20 pages using CSS to learn and have used a different naem on them all. Not sure why. LOL

But I will change the name on the CSS and retry. The color I have it set to is blue an it didn't show up.

2:56 pm on Jul 9, 2005 (gmt 0)

10+ Year Member



Ok. I got it to work. Thanks for the help.
3:31 pm on Jul 9, 2005 (gmt 0)

10+ Year Member



As an aside, this:
<link href="Again%20a%20new%20one" rel="stylesheet" type="text/css">
Specifically, the "Again%20a%20new%20one" may have been typed in the "Design" view, not code view. If you want your code to be "un-molested" (there I go with the quotes again), then be sure to put anything like that in when on "Code" view.

The contents of the "DIV" should have shown up, but might have been a problem because of the Z-index. I normally put that other stuff (position, style, etc.) in a style sheet. Good luck.

F

6:08 am on Jul 11, 2005 (gmt 0)

10+ Year Member



yes you may have typed it in design view or check for z index.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month