473,505 Members | 13,925 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

horizontal navigation

18 New Member
I am trying to horizontically place my links at the bottom of the header, in its own div.
But having problems, ie the numbers of the list are still there and the links are placed vertical and not horizontal, I thought the display: inline; would get rid of them being vertical.
Expand|Select|Wrap|Line Numbers
  1. body {
  2.         font-family: Verdana, sans-serif;
  3.         margin: 0;
  4.         padding: 0;
  5.       }
  6. #container {
  7.         position: relative;
  8.         width: 80em;
  9.         background-color: #E60073;
  10.         margin-left: auto;
  11.         margin-right: auto;
  12.         }
  13. #header {
  14.         height: 8em;
  15.         padding: 1em;
  16.         margin: auto;
  17.                    }
  18.       img {
  19.         border:0;
  20.         width:750px;
  21.         height:110px;
  22.         margin: auto;
  23.         clear: both;
  24.         align: center;
  25.  
  26.       }
  27.  
  28. #main        {
  29.              margin-left: 12em;
  30.              }
  31.  
  32. #links       {
  33.               margin: 0;
  34.               padding: 0.5em, 3em;
  35.               color: #FFFFFF;
  36.               background: #6600CC;
  37.               }
  38.  
  39. ol             {
  40.                padding: 0; 
  41.                color:#FFFFFF; 
  42.                font-family: verdana. sans-serif; 
  43.                font-size:1em; 
  44.                background-color:#6600CC
  45.                }
  46.  
  47. #linksli      { 
  48.                 display: inline;
  49.                 border-right: 1px, solid, #FFFFFF;
  50.                 margin-right: 0.5em;
  51.                 padding-right: 0.75em; 
  52.                 font-weight: bold;
  53.               }
the html
[html]
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<link rel="stylesheet" type="text/css" href="new_page_1.css">
</head>
<div id="container">
<div id="header">
<body>
<img src="images/networkartslogo.gif" alt="Logo" /><div id="links">
<div id="linksli">
<ol><div id="ol">
<li>Contacts</li>
<li>Referrals</li>
<li>About</li>
<li>Benefits</li>
<li>Your Say</li>
<li>Site Map</li>
</ol></div>
</div>
</div>
</body>
</html>[/html]
Dec 21 '07 #1
32 2028
Death Slaught
1,137 Top Contributor
Once again you cannot place division outside of the body tag.......1 sec and i'll fix it.


- Death
Dec 21 '07 #2
quartzy
18 New Member
Do you mean that all divs are to be placed before the first body tag?
Dec 21 '07 #3
Death Slaught
1,137 Top Contributor
Do you mean that all divs are to be placed before the first body tag?
No after

Expand|Select|Wrap|Line Numbers
  1.  <body> 
  2. <div></div>
  3. <div></div>
  4. </body>
  5.  
Nothing to my knowledge is allowed between the head and body tag.

Thanks, Death
Dec 21 '07 #4
Death Slaught
1,137 Top Contributor
Is this similiar to what you were going for? (To position this you will have to put it in a division, and give it an absolute position).

[HTML] <html>
<head>
<style type="text/css">

body {
margin:0;
padding:0;
}

ul {
float:left;
list-style-type:none;
}

li {
display:inline;
}

a {
float:left;
text-decoration:none;
padding:0.2em 0.6em;
color:#000;
background-color:#fff;
border:1px solid #000;
}

a:hover {
color:#fff;
background-color:#000;
border:1px outset #fff;
}

a:active {
color:#fff;
background-color:#000;
border:1px inset #fff;
}

</style>
</head>

<body>

<ul>
<li><a href="#">Contacts</a></li>
<li><a href="#">Referrals</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Benefits</a></li>
<li><a href="#">Your Say</a></li>
<li><a href="#">Site Map</a></li>
</ul>

</body>

</html>

[/HTML]

Hope it helps, Thanks, Death
Dec 21 '07 #5
quartzy
18 New Member
thanks I will try it out an let you know.
Dec 21 '07 #6
quartzy
18 New Member
Yes
they are just like what I want but with different colors, fonts, backgrounds which I can amend, but I would rather do them in an external style sheet and not embedded like this. I'll have a go and probaly will be back, thanks
Dec 21 '07 #7
Death Slaught
1,137 Top Contributor
Yes
they are just like what I want but with different colors, fonts, backgrounds which I can amend, but I would rather do them in an external style sheet and not embedded like this. I'll have a go and probaly will be back, thanks
You can easily put it into an external stylesheet, I just made this way so I wouldn't have to seperate the HTML, and CSS.

Glad it helped, Death
Dec 21 '07 #8
quartzy
18 New Member
hello again, they work good I placed the code in the external css and it all work good. Still have a problem with the header though.
Thanks for your help, css is so simple yet so hard to learn
Dec 21 '07 #9
quartzy
18 New Member
I am back again, the code worked fine in an empty page but when I added it to my external style sheet, it has gone wrong again, the links appear at the edge of the header, all jumbled up and without their boxes in firefox but work OK in ie.
Expand|Select|Wrap|Line Numbers
  1. body {
  2.         font-family: Verdana, sans-serif;
  3.         margin: 0;
  4.         padding: 0;
  5.       }
  6. #container {
  7.         position: relative;
  8.         width: 65em;
  9.         background-color: #E60073;
  10.         margin-left: auto;
  11.         margin-right: auto; color:#000000; font-size:1em
  12.         }
  13. #header {
  14.         height: 10em;
  15.         padding: 1em;
  16.         align: center;
  17.        }
  18.  
  19. img {
  20.         border:0;
  21.         width:750px;
  22.         height: 110px;            
  23.       }
  24.  
  25. ol {
  26.            float: right;
  27.            list-style-type:none;
  28.            background: #6600CC;
  29.          }
  30. li {
  31.           display:inline;
  32.           text-size: 0.5em;
  33.     }
  34. a {
  35.           float: right;
  36.           text-decoration:none;
  37.           padding:0.2em, 0.6em;
  38.           color:#FFFFFF;
  39.           background-color:#6600CC;
  40.           border: 1px, solid, #FFFFFF;
  41.           font-weight: bold;
  42.         }
  43. a:hover {
  44.           color:#FFFFFF;
  45.           background-color:#E60073;
  46.           border:1px outset #FFFFFF;
  47.    }
  48. a:active {
  49.           color:#FFFFFF;
  50.           background-color:#E60073;
  51.           border:1px inset #FFFFFF;
  52.         }
  53.  
[html]
</head>
<body>
<div id="container">
<div id="header">
<a href="index.html"><img border="0" src="images/netoworkarts.gif"
width="750" height="110"></a>
<ol>
<li><a href="contacts.htm">Contacts</a></li>
<li><a href="referrals.htm">Referrals</a></li>
<li><a href="about.htm">About</a></li>
<li><a href="benefits.htm">Benefits</a></li>
<li><a href="say.htm">Your Say</a></li>
<li><a href="sitemap.htm">Site Map</a></li>
</ol></div>
</body>
</html>[/html]
appreciate anoyones help on this.
Dec 22 '07 #10
quartzy
18 New Member
I fixed the jumbled up problem but now I still have the problem of no border boxes, but I have them on hover.
Dec 22 '07 #11
drhowarddrfine
7,435 Recognized Expert Expert
Are we just making up our own tags as we go along or are we following the standards? Validate your html and css for your list of errors that need fixing.
Dec 22 '07 #12
quartzy
18 New Member
I am learning this css and I cannot see any errors. I cannot validate it as I am developing a new website and it is not yet loaded any where. Needless to say I do not like your tone, you had to start somewhere didn't you?
Dec 22 '07 #13
Markus
6,050 Recognized Expert Expert
I am learning this css and I cannot see any errors. I cannot validate it as I am developing a new website and it is not yet loaded any where. Needless to say I do not like your tone, you had to start somewhere didn't you?
http://validator.w3.org/#validate_by_input

Enter your markup there and validate it.

And don't speak down to moderators.
Dec 22 '07 #14
drhowarddrfine
7,435 Recognized Expert Expert
I wasn't following this thread, so I may have come across too strong, but I never understand how people come up with tags and attributes that don't exist. It's the third time in the last couple of days.

There are two validators, one for html and one for css. You don't need to be online with your site to validate. markusnoob gives the link for the html validator. Here is the CSS direct entry validator.
Dec 22 '07 #15
jamesicus
37 New Member
I am back again, the code worked fine in an empty page but when I added it to my external style sheet, it has gone wrong again, the links appear at the edge of the header, all jumbled up and without their boxes in firefox but work OK in ie.

appreciate anoyones help on this.
Really need to see the entire coding -- including the DOCTYPE and Character encoding. Load up the completed document to your server and provide the URL, please.

James
Pickering Pages
Dec 24 '07 #16
Death Slaught
1,137 Top Contributor
Didn't any one actually take the time to read his code?!?!?


Here's your border problem, it's in your anchor rule, on this line:

Expand|Select|Wrap|Line Numbers
  1. border:1px, solid, #FFFFFF;
You have commas after 1px, and after solid. You only need to put spaces. So change it to this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. border:1px solid #fff;
  3.  
Hope it helps, Thanks, Death
Dec 24 '07 #17
Death Slaught
1,137 Top Contributor
Are we just making up our own tags as we go along or are we following the standards? Validate your html and css for your list of errors that need fixing.
What are you talking about it looks fine to me?????

- Death
Dec 24 '07 #18
Death Slaught
1,137 Top Contributor
I can honestly say i'm extremely disapointed in you all.

How many of you actually read his code, there was a simple answer to a problem, and odds are you didn't even read all of his post. How do you expect to help someone if you don't know what's going on?

I'm going to say this once. BEFORE POSTING A REPLY, READ THE ENTIRE THREAD, AND IF CODE OR A LINK IS PROVIDED GO OVER IT!

Sorry if i'm being too cross with you, but it's for your own benefits.

Thanks, Death
Dec 24 '07 #19
drhowarddrfine
7,435 Recognized Expert Expert
The suggestion was made that he validate his markup for his list of errors where he would have found the comma problem and whatever else is there. No one is paying us to sift through anyones markup.
Dec 24 '07 #20
Death Slaught
1,137 Top Contributor
The suggestion was made that he validate his markup for his list of errors where he would have found the comma problem and whatever else is there. No one is paying us to sift through anyones markup.
From what I can see that was his only error, when something is that obvious you shouldn't tell them to run to a validator, you should simply tell them about it, and how to fix it.

Thanks, Death
Dec 24 '07 #21
drhowarddrfine
7,435 Recognized Expert Expert
So why didn't you? You went through a lot of posts without saying anything about it.
Dec 24 '07 #22
Death Slaught
1,137 Top Contributor
So why didn't you? You went through a lot of posts without saying anything about it.

I'de check that again. I couldn't say anything about it because he didn't have the problem up until post #10. As you will see I didn't post again until #17 where I answered his question first thing after logging in. So I did say something about it, I would have sooner, but i'm not usually online during the weekends.

Thanks, Death
Dec 24 '07 #23
drhowarddrfine
7,435 Recognized Expert Expert
It was in the first post.
Dec 24 '07 #24
Death Slaught
1,137 Top Contributor
It was in the first post.
I knew continuing this arguement would lead to an inevitable defeat.

I did notice it, but I didn't say anything because I assumed he would see that I didn't use it in the code I provided. Stupid assumptions :).

I still don't agree with telling people to go a to a validator first, because then there's nothing for us to do. It's so slow in this forum.

Thanks, Death
Dec 24 '07 #25
jamesicus
37 New Member
I am learning this css and I cannot see any errors. I cannot validate it as I am developing a new website and it is not yet loaded any where .........................
But you really should load it up on to a server so that those people trying to help you can run your embryonic page through the W3C HTML & CSS validators in order to evaluate errors and suggest corrective action. You don't have to copy Markup (code) into these messages if you load up your pages to a server.

Inasmuch as you had adopted corrected (valid) Markup at one time here, I can only assume your subsequent problems were related to incorrect header information or additional non-compliant Markup.

James
Dec 24 '07 #26
Death Slaught
1,137 Top Contributor
But you really should load it up on to a server so that those people trying to help you can run your embryonic page through the W3C HTML & CSS validators in order to evaluate errors and suggest corrective action. You don't have to copy Markup (code) into these messages if you load up your pages to a server.

Inasmuch as you had adopted corrected (valid) Markup at one time here, I can only assume your subsequent problems were related to incorrect header information or additional non-compliant Markup.

James
You can run code through a validator without it being on a server. Also his problem has already been answered.

Thanks, Death
Dec 24 '07 #27
jamesicus
37 New Member
You can run code through a validator without it being on a server ..........
Yes, but then those offering help do not have access to a common document.

.......... Also his problem has already been answered ..........
Has it really? I get the impression he still has fundamental problems with his document (page) functioning as intended.

James
Dec 24 '07 #28
Death Slaught
1,137 Top Contributor
He provided what we needed his HTML, and CSS. If we have those we do not need a 'common document'.

His problem was that the border was not appearing. The answer to that problem was that he had invalid CSS (commas where they should not have been). He asked the question, and the answer was provided, wether some one chooses to put there documents on a server or simply provide their code is up to them.

Thanks, Death
Dec 24 '07 #29
Death Slaught
1,137 Top Contributor
I motion that we return to the origonal topic of this thread, and help the poster, instead of all of this arguing.

- Death
Dec 24 '07 #30
jamesicus
37 New Member
.......... his problem was that the border was not appearing ..........
.......... Still have a problem with the header though ..........
And that problem has been resolved?

James
Dec 24 '07 #31
Death Slaught
1,137 Top Contributor
And that problem has been resolved?

James
According to this yes.

Thanks, Death
Dec 24 '07 #32
drhowarddrfine
7,435 Recognized Expert Expert
Please do not double post. This thread is closed.
Dec 26 '07 #33

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5306
by: Ansgar Hein | last post by:
I have been playing around with several different versions for a horizontal menu, but I haven't been able to build a horizontal navigation based on the vertical one featured on www.alistapart.com...
2
11256
by: Randall Sell | last post by:
Hmmm, have now spent a day reading the entire web with no answer yet! so now resorting again to the experts... I'm trying to create a horizontal list. This is easy enough doing: <html> <head>...
5
14641
by: Charles Blaquière | last post by:
As part of my explorations in liquid design, I'm exploring ways to use the overflow: hidden property -- when browser windows become too narrow, I want (some) images to get cropped rather than have...
7
3164
by: addled | last post by:
Hi there, after reading posts here for a few months, I've built the courage to see if someone can see where I"m going wrong in the webpage I've been working on. In particular the horizontal nav...
1
5963
by: Bryan | last post by:
I've been trying to figure out how to do this for the past 2 days and am finally tossing in the towel. No matter what I do, I just can't seem to get it to work and haven't been able to find any...
2
3300
by: Dan V. | last post by:
Why is there a large space before the background image (horizontal orange line under top NAV horizontal CSS list buttons) in Internet Expolorer 6 only? http://www.officeactivate.com/fish ...
1
2268
by: pixelwiz | last post by:
Hi, I am a designer working with an external .NET programmer. We are trying to figure out the best way to implement at tab style horizontal menu similar to...
9
3327
by: Verona Busch | last post by:
Hi everybody, I am very happy to find this group. I am searching for a solution to make a horizontal list menu with submenu on hover. I found a lot of examples for horizontal lists which open...
0
1412
by: EA | last post by:
http://www.doublesix.plus.com/Examples/ The above link displays a page with an example of the navigation structure I would like to create. It is a horizontal version of the standard vertical...
1
3451
by: Paul | last post by:
Code is below. Works in Firefox but not IE. I understand there is a box issue with IE but I am having problems fixing this. Many thanks for any help! #navigation { float: left; width: 125px;...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7366
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...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
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...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1526
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 ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
406
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...

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.