NOM NOM NOM (sam42) wrote in component_help,
NOM NOM NOM
sam42
component_help

  • Mood:

Nav Bar

Hello, first time poster. I'm (trying) to do a layout for a friend, and never having done most of this before, I'm a little lost. Basically, my knowledge consists of copying other codes and poking them for a while. My friend wants the components stationary, while the entries can scroll. I managed to achieve that here. However, this makes the nav bar disappear. He would prefer the nav bar up top rather than in a component. Is there any way to do this?

Also, if anyone sees anything that may be wrong in my code, could you please point it out? It's messy.

function page_layout(Page p) {
var string title = $p->title();
"""
<html>
<head>
<link rel="stylesheet" href="$p.stylesheet_url" type="text/css">
$p.head_content
""";
$p->print_custom_head();
"""
<style type="text/css">
body {
overflow: hidden;
}
</style>
<title>$title</title>
</head>
<body>

<div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:1; overflow: hidden;">
<table width="100%" cellspacing="0" cellpadding="0" valign="left">
<tr valign="left" width="30%">
<td width="1" background="http://www.livejournal.com/palimg/component/clear.gif">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0">
</td>

""";
if ($*comp_state == "left") {
print_my_components($p);
"""
<td width="10">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="10" height="1" alt="" border="0">
</td>
""";
}

if ($*comp_state == "right") { ###
"""
<td width="10">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="10" height="1" alt="" border="0">
</td>
""";
print_my_components($p);
}
"""
<td width="10">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="10" height="1" alt="" border="0">
</td>
</tr>
</table>
</div>

<div id="Layer2" style="position:relative; left:192px; width:81%; height:100%; z-index:1; overflow:auto;">
<table width="100%" cellspacing="0" cellpadding="0" valign="top">
<tr valign="right" width="100%">
<td width="1" background="http://www.livejournal.com/palimg/component/clear.gif">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0">
</td>
""";

print_my_entries($p, $title);
"""

<td width="1" background="http://www.livejournal.com/palimg/component/clear.gif">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0">
</td>
</tr>
</table>
</div>

</body>
</html>
""";
}
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 2 comments