2 replies [Last post]
spookiness
spookiness's picture
Offline
newbie
Last seen: 9 years 14 weeks ago
Timezone: GMT-5
Joined: 2014-02-22
Posts: 2
Points: 3

Least favorite thing about css because they are easy for me to break:)

I have a horizontal nav bar. It used to work but I redid some of the site and now it does not. My html code is the following and it works, as in it shows up (vertically as it is not styled). So I'm going line by line in my css to see where the issue is as it was disappearing from the website all together when I inserted the external css style sheet.

The line of code that makes my menu bar disappear from the screen is
.nav { position:absolute; display:block; bottom:5px; right:5px; font-size:12px; } /*Sets the location of the .nav container

class*/

There is nothing blocking the menu from showing up and the menu will show up (without style) without this line of code.

HTML:

  • Home
  • Content

    sub_men_flt">

  • Any input? Thanks!

    spookiness
    spookiness's picture
    Offline
    newbie
    Last seen: 9 years 14 weeks ago
    Timezone: GMT-5
    Joined: 2014-02-22
    Posts: 2
    Points: 3

    <ul class="nav">   <li><a

    <ul class="nav">
     
    			<li><a href="index.html">Home</a></li>
     
    	                <li><a href="#" class="sub_men_flt">Content </a><a href="#" class="sub_menu_flyout 
     
    sub_men_flt"></a>
     
    	                        <ul class="sub_men_ul">
     
    	                            <li><a href="#">Classes</a></li>
     
     
    	                        </ul>
     
    	                </li>
     
     
     
    	            </ul>

    spookiness wrote:

    Least favorite thing about css because they are easy for me to break:)

    I have a horizontal nav bar. It used to work but I redid some of the site and now it does not. My html code is the following and it works, as in it shows up (vertically as it is not styled). So I'm going line by line in my css to see where the issue is as it was disappearing from the website all together when I inserted the external css style sheet.

    The line of code that makes my menu bar disappear from the screen is
    .nav { position:absolute; display:block; bottom:5px; right:5px; font-size:12px; } /*Sets the location of the .nav container

    class*/

    There is nothing blocking the menu from showing up and the menu will show up (without style) without this line of code.

    HTML:

  • Home
  • Content

    sub_men_flt">

  • Any input? Thanks!

    gary.turner
    gary.turner's picture
    Offline
    Moderator
    Dallas
    Last seen: 2 years 13 weeks ago
    Dallas
    Timezone: GMT-6
    Joined: 2004-06-25
    Posts: 9776
    Points: 3858

    Absolute position nearly always a bad idea

    Have you looked at the bottom right of the page? You don't provide any context for your menu so cannot offer more than that.

    cheers,

    gary

    If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.