473,616 Members | 2,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
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.dt d">

<html>

<head>

<title>Utica Adult Learning Center</title>

<link rel="stylesheet " type="text/css" href="C:\Docume nts and Settings\ksmith \Desktop\refuge es.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="largebanne r.jpg" alt="Main" />
div.img {
height: auto;
width: auto;
float: left;
border: none
}
<h1><img src="subtitle.j pg" /></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 1645
drhowarddrfine
7,435 Recognized Expert Expert
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.dt d">

<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=ut f-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="largebanne r.jpg" alt="Main" />
<h1><img src="subtitle.j pg" /></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
sevenalive
2 New Member
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 Recognized Expert Expert
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
1906
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! HOWEVER! When I positioned my navbar directly at the top of the page it works fine even in IE! Moving the navbar down about double the height of the font being used and then it stops working only highling the buttons when over the text, weird no?
2
2767
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 Firefox 0.8 browsers, which I am using for testing. I have a design in progress that uses a relatively positioned, left-floated, 122px wide navbar, with the main content padded to the right by 10px, wrapping under after it exceeds the height of the...
11
1993
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 instead ;-)) Two questions: the containing navbar div has a width of 760px. There are 6 buttons of 116 wide plus a 1px border makes: 6 x 118px = 708px. The buttons also have a 4px padding on the right, so I come to a total of 708px + 24px = 732...
3
3022
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 download a fully working C# sample with the Northwind.mdb here: www.insightgis.com.au/web/stuff/DataGridCombo.zip
87
4934
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 with very large and complex projects. This is a real shame :(
0
1159
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, and is necessary to view the hidden parts of the body. Most importantly, the navbar remains unchanged. What happens in IE is what I want. In FF, the body starts sliding UNDER the navbar when you've shrunk the width of the body to a narrow...
30
7682
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 target directory (where the backup copies will be kept, on another drive). I can successfully test whether the target directory exists or not using findfirst(), but if it doesn't, I wanted to create it using mkdir(), but it doesn't like the path...
1
2444
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 background image) is hyperlinked underneath the nav bar. I can't see any errors in the coding below. Any ideas what may be causing this? the page is at http://www.maguiresonline.co.uk/wosis/files/nickysnav.html the html.... <body...
0
1213
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 disappears or goes about 100px where it should be, then when you hover over each menu item, the navbar goes back to where it should be! I'm using an AJAX form which dynamically inserts a loading bar and success/failure mesage without reloading the...
0
8145
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8642
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8592
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8448
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5550
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4060
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4140
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1439
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.