472,782 Members | 1,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

navbar won't go up next to everything else; insists on being underneath

Hi--
I am very new at this and trying to teach myself, and I have run into a roadblock that I can't figure out no matter how many times I Google it......my navbar is a vertical column of images, and I want it to go up next to the rest of the page (which consists of a banner image, a h1 image, and some text). It insists on beginning itself below the text on the page. Here is what I've got (I'm sorry if it's confusing---it is probably a frankenthing at this point)--thanks for any ideas!


<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>

<title>Utica Adult Learning Center</title>

<link rel="stylesheet" type="text/css" href="C:\Documents and Settings\ksmith\Desktop\refugees.css" />

</head>

<body>
body {
font-family: tahoma, verdana, arial, sans-serif;
color: #000;
font-size: .9em;
text-align: left;
padding-left: 5%;
letter-spacing: .2em;
background-color: #fff
}
<div id="container">

#container {
position: relative;
width: 75%;
margin-right: 10em;
background: #fff;
}
<div class="img">
<img src="largebanner.jpg" alt="Main" />
div.img {
height: auto;
width: auto;
float: left;
border: none
}
<h1><img src="subtitle.jpg" /></h1>
h1 {
padding-top: 5%;
padding-left: 3%
}

<p>Text is here</p>
p {
padding-left: 5%;
padding-right: 100px
}
<div id="navbar">
#navbar {
width: 10em;
float: right;
position: absolute;
text-decoration: none;
vertical-align: top;
background-color: #fff;
}
<ul>
a:link {
text-decoration: none;
color: #800000;
}
img {
border: none
}

a:hover {
text-decoration: underline;
color: #696969
}

#navbar ul {
float: right;
text-decoration: none;
}

#navbar li {
float: right;
list-style-type: none;
padding-left: 785px;
margin-top: 0px;
text-decoration: none;
align: top
}
<li><a href="Here are all the images in the navbar, in a list" /></li>
</ul>

</div>

</div>

</body>

</html>
Jul 25 '07 #1
3 1608
drhowarddrfine
7,435 Expert 4TB
Not really. You just didn't have it marked up right. Is the above markup how you really have it? This is how you should write it up:
[HTML]<!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" xml:lang="en" lang="en">

<head>

<title>Utica Adult Learning Center</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
body {
font-family: tahoma, verdana, arial, sans-serif;
color: #000;
font-size: .9em;
text-align: left;
padding-left: 5%;
letter-spacing: .2em;
background-color: #fff
}
#container {
position: relative;
width: 75%;
margin-right: 10em;
background: #fff;
}
div.img {
height: auto;
width: auto;
float: left;
border: none
}
h1 {
padding-top: 5%;
padding-left: 3%
}
p {
padding-left: 5%;
padding-right: 100px
}
#navbar {outline:1px solid red;
width: 10em;
float: right;
position: absolute;
text-decoration: none;
vertical-align: top;
background-color: #fff;
}
a:link {
text-decoration: none;
color: #800000;
}
img {
border: none
}

a:hover {
text-decoration: underline;
color: #696969
}

#navbar ul {
float: right;
text-decoration: none;
}

#navbar li {
float: right;
list-style-type: none;
padding-left: 785px;
margin-top: 0px;
text-decoration: none;
align: top
}
</style>
</head>
<body>

<div id="container">

<div class="img">
<img src="largebanner.jpg" alt="Main" />
<h1><img src="subtitle.jpg" /></h1>
<p>Text is here</p>
</div>

<div id="navbar">
<ul>
<li><a href="Here are all the images in the navbar, in a list" /></li>
</ul>
</div>
</div>

</body>

</html>[/HTML]

There is no such thing as align:top though in CSS.
Jul 25 '07 #2
Thank you--- however, when I change it to this, the entire thing shows up blank. I even tried copying and pasting to make sure I wasn't missing anything.... what am I doing wrong?
Thanks
Jul 26 '07 #3
drhowarddrfine
7,435 Expert 4TB
Don't know. It works for me.
Jul 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: David | last post by:
I made a navbar where the buttons light up when the user moves over them. The only problem was in IE the buttons only light up when hovering over the text. This was not a problem in opera!...
2
by: Wiz | last post by:
Greetings the group! I see from a few previous postings that I am not the only person having a problem with hidden list item bullets. This question applies to both IE 6, current version, and...
11
by: A.Translator | last post by:
On this page http://www.xs4all.nl/~hogen/MvK_nieuw/ I have a horizontal menu made up of an ul (bit scary, this, feel much more comfortable with a table there, but I keep reading I should use css...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
87
by: John Rivers | last post by:
Hello everybody, I just wondered if anybody else has noticed this? It takes around 6 seconds to start debugging a very simple ASPX page with VS.NET whereas VB6 takes under 0.5 seconds, even...
0
by: bobr | last post by:
See: http://www.writeonwhidbey.org/ When you shrink the width of your browser in IE, everything scrunches up until you get to a the width of the largest image...then a horiz scroll bar appears,...
30
by: MikeC | last post by:
Good People, I'm writing a backup utility that uses a chdir() to go into the source directory (in which the files reside that I want to back up), so I don't want to use chdir() to get into the...
1
by: nicky77 | last post by:
Hi, I've created a nav bar using a background image for rollover effects. Everything works as I had hoped, however, for some reason it seems that an area of whitespace (the same size of the...
0
by: nicky77 | last post by:
This is a long shot, but I have no idea why my navbar is being temperamental in IE6. Everything looks ok on page load, but when you fill out the online form and click Submit, the navbar either...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.