473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to get sub items to display properly in navigation bar?

Samishii23
246 100+
http://hoa.ath.cx/~dm2/ ( My Home computer, might be slow )

My navigation bar is having float issues.
I want the sub Items to appear under the main items. But sadly, not the case right now.

Expand|Select|Wrap|Line Numbers
  1. .content-nav {
  2.     display: table-cell;
  3.     height: 100px;
  4.     width: 700px;
  5.     overflow: hidden;
  6.     font-size: 23px;
  7.     font-weight: bolder;
  8.     font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; }
  9. .content-nav ul { list-style: none; margin: 0 auto; }
  10. .content-nav ul li {
  11.     float: left;
  12.     padding: 0 4px;
  13.     border-bottom: 1px Solid #000;
  14.     border-bottom-left-radius: 20px;
  15.     border-bottom-right-radius: 20px; }
  16. .content-nav ul li a { color: #000; text-decoration: none; }
  17. .content-nav ul li:hover { text-shadow: 1px 1px 2px #080; border-bottom-color: #088; }
I was using Position: Absolute and Margin adjustments up until just now, but I was reading up on proper CSS techniques, and am going to the style I am currently using. But I don't know how to stop the float from making the items below AND to the right of the main items...

Edit: Also the Blocks of color are just to see how the positioning is working for this new-to-me technique.
Feb 8 '11 #1

✓ answered by drhowarddrfine

Validate your html and css for those lists of errors.

The 'clear' attribute for br is deprecated. Use CSS.

Use 'clear:both' on the ul with the Equipment title in it.

7 2286
Samishii23
246 100+
I was able to fix it using clear:both; after the main items, but I've read before its considered a hack. Anyway to fix this properly?
Feb 8 '11 #2
drhowarddrfine
7,435 Expert 4TB
The clear property is not a hack except if you use it to fix a problem with your markup that should be fixed by writing proper markup.

Showing the CSS doesn't do much good and your link times out.
Feb 9 '11 #3
Samishii23
246 100+
http://samishii.site90.net/p/2/
This is the problem I am having, as I removed the clear from the sub navigation item <div>
Feb 9 '11 #4
"Clear" is not a hack, youre using float's on the list-items of your main menu so youre bound to use clear.

If your first link wasn't timing out last night I would have posted to use "clear: both".

If you use float, and you want it to become "neutral" on the next line, you'll need to use clear.

Bit extra info: There is also the possibility to use clear on a br as in:
Expand|Select|Wrap|Line Numbers
  1. <br clear="all" />
But in the break you use "all" and in the CSS you use "both".
Feb 9 '11 #5
drhowarddrfine
7,435 Expert 4TB
Validate your html and css for those lists of errors.

The 'clear' attribute for br is deprecated. Use CSS.

Use 'clear:both' on the ul with the Equipment title in it.
Feb 9 '11 #6
Btw: its like drhowarddrfine said, its deprecated for the br but even so, I would always recommend putting it in your CSS to keep the structure(HTML) and styling(CSS) separated.
Feb 9 '11 #7
Samishii23
246 100+
I've run the validator for 2.1 and 3. Seems W3 still has issues with border-radius. I thought they had a specification for it. Guess not quite yet.
Oh well, guess I'll just use the clear and run with it. :)

Thanks for the help guys. :)
Feb 9 '11 #8

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

Similar topics

1
by: Anand | last post by:
Hi i am having trouble adding a recordset into the access database, the code seems to be working fine it passs and parses through all variables just fine without showing any errors and also when i...
2
by: ed | last post by:
i'm having trouble with a form. I want to be able to type in the address of the form with the data for the form items in the URL (ie: http://somesite.com/formpage.html?field1=data1&field2=data2)....
1
by: Lauren Wilson | last post by:
I'm having trouble with the Access VBA help on my installation of A2K with Dev tools. Every time I try to retrieve help for items listed in the Object Browser (and SOME other items as well),...
2
by: Jozef | last post by:
Hello, I am trying to put together a module and open a workspace on a database that has a simple password (using Access XP). This is the lin that I'm having trouble with; Set wrk =...
0
by: Jozef | last post by:
Hello, I'm having trouble with the download links on my web server. The error I'm getting is; CGI Timeout The specified CGI application exceeded the allowed time for processing. The server...
1
by: Jozef | last post by:
Hello. I'm having trouble creating a blank solution (and ASP.net web application) from my laptop. I own the server (in fact it's sitting right next to me) and have added the URL to the trusted...
1
by: MLH | last post by:
Am having trouble with the filter property setting below. Would like to filter the listing to car makes beginning with "D". I'm blowing it on the filter spec somehow??? Sub OpenRecordsetX() ...
2
by: Jake Barnes | last post by:
I've read over the documentation for these effects: http://wiki.script.aculo.us/scriptaculous/show/CombinationEffectsDemo I want to include them on my page. I tried attaching using onload, but...
0
by: harry12 | last post by:
Hello- I'm fairly new at using Microsoft Access and I'm having trouble getting a couple of things to work in my database. The first is that I have yet to find a way to get an append query to...
2
by: Stu | last post by:
Hi guys, I've been having trouble getting the clock function to work portably, please could I get some thoughts? <Possibly OT comments> It works fine on my laptop (under WinXP) and on my...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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,...
0
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...

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.