Please help with CSS problem!

Discussion in 'HTML' started by Gavin, Jun 5, 2005.

  1. Gavin

    Gavin Guest

    I have the code below in my html page:

    <div id=menu>
    <a onclick="P7_swapClass(1,'sub1','sectionon','sectionoff','div')"
    href="javascript:;">On
    Air...</a> </font>
    <DIV class=sectionoff id=sub1><a href="main.php?page=onair" >On
    Air 1</a> <a href="main.php?page=onair" >On Air 2</a> <a
    href="main.php?page=onair" >On
    Air 3</a> </font>
    </div>

    I have a CSS file saying what the menu tags should be formated like, but
    when the new drop down menu appears it doesn't display any text or links?

    The CCS file is below if needed.

    Thanks

    Gavin.

    #sched a:link { text-decoration: none; color: #000000 }
    #sched a:active { text-decoration: none; color: #000000 }
    #sched a:visited { text-decoration: none; color: #000000 }
    #sched a { text-decoration: none; color: #000000 }
    #sched a:hover {
    text-decoration: none;
    color: #FFFFFF;
    background-repeat: no-repeat;
    }


    #h1
    {
    font-family: Verdana;
    font-size: 18pt;
    text-decoration: underline;
    font-weight: bold
    }


    #menu a:link, #menu a:active, #menu a:visited, #menu a {
    color: #000000;
    display: block;
    text-decoration: none;
    background-image: none;
    width: 125px;
    padding-top: 5px;
    padding-right: 2px;
    padding-bottom: 5px;
    padding-left: 20px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    height: 30px;
    }


    #menu a:hover {
    color: #CCCCCC;
    display: block;
    width:125px;
    padding: 5px 2px 5px 20px;
    background-image: none;




    }

    ..sectionoff {
    VISIBILITY: hidden; FONT: 11px Verdana, Arial, Helvetica, sans-serif;
    POSITION: absolute
    }
    ..sectionon {
    VISIBILITY: visible; POSITION: static
    }

    ..sectionon A {
    PADDING-RIGHT: 2px; DISPLAY: block; PADDING-LEFT: 15px; BACKGROUND-IMAGE:
    none; PADDING-BOTTOM: 2px; FONT: 11px Verdana, Arial, Helvetica, sans-serif;
    COLOR: #000000; PADDING-TOP: 2px; BACKGROUND-COLOR: #cdbfde
    }
    ..sectionon A:link {
    COLOR: #000000; BACKGROUND-COLOR: #cdbfde
    }
    ..sectionon A:visited {
    COLOR: #000000; BACKGROUND-COLOR: #cdbfde
    }
    ..sectionon A:hover {
    BACKGROUND-COLOR: #cdbfde; TEXT-DECORATION: underline
    }
    ..sectionon A:active {
    COLOR: #000000; BACKGROUND-COLOR: #cdbfde
    }
    ..sectionoff {
    VISIBILITY: hidden; FONT: 11px Verdana, Arial, Helvetica, sans-serif;
    POSITION: absolute
    }
    #sub1 a {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    color: #00FF00;
    text-decoration: none;
    }
     
    Gavin, Jun 5, 2005
    #1
    1. Advertising

  2. Gavin wrote:

    > I have the code below in my html page:
    >
    > <div id=menu>
    > <a onclick="P7_swapClass(1,'sub1','sectionon','sectionoff','div')"
    > href="javascript:;">


    Why is this an anchor?

    Why doesn't the href point to anything useful?

    > On
    > Air...</a> </font>


    You have a </font>, but no <font> (not that you should be using the font
    element anyway - it *is* 2005 now).

    You should probably pay a visit to http://validator.w3.org/

    > 1</a> <a hre


    Nothing between anchors except white space, this isn't a good idea. The
    links will tend to blur into each other and be difficult to tell apart.

    Since you appear to have a list of links, why doesn't your markup reflect
    that? http://css.maxdesign.com.au/listamatic/


    > font-family: Verdana;


    The trouble with Verdana is that it encourages authors to use very small
    fonts. This wouldn't be too bad if you could be certain that every visitor
    will have Verdana installed (its more readable then most fonts at very
    small sizes), but you can't.

    > font-size: 18pt;


    Browsers are not very good at knowing the correct DPI of the system, so the
    point unit is highly inappropriate for use on screen. It also causes
    additional problems in Internet Explorer since that browser provides no
    convenient way to resize text specified in points.

    http://css-discuss.incutio.com/?page=UsingPoints

    > #menu a:link, #menu a:active, #menu a:visited, #menu a {
    > color: #000000;


    It isn't a very good idea to set visited and unvisited links to be the same
    colour - you remove a very useful visual clue from the user by doing so.

    > font-size: 11px;


    11px is very small (see my previous point about Verdana), and also suffers
    from the resizing issue in MSIE.

    http://css-discuss.incutio.com/?page=UsingPixels

    > I have a CSS file saying what the menu tags should be formated like, but
    > when the new drop down menu appears it doesn't display any text or links?


    Since you have failed to provide a complete set of code to recreate this
    problem, its rather difficult to tell. Try providing a URL to a live
    example (URLs are much between then a bunch of files since whomever decides
    to help would have to recreate your files, which takes time - and they
    aren't being paid to help you).

    I'd suggest you fix any machine detectable syntax errors though. (Some good
    reasons for that can be found at
    http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you )

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Jun 5, 2005
    #2
    1. Advertising

  3. Gavin

    gavin Guest

    Thanks for all the info.

    This:
    >> <div id=menu>
    >> <a onclick="P7_swapClass(1,'sub1','sectionon','sectionoff','div')"
    >> href="javascript:;">


    was borrowed for a tutorial site. I just copy and pasted it!

    I think alot of the problem is that all of this code has been imported from
    frontpage (oooooo :() ) ! I am fairly new to dreamweaver and it is causing
    me a few problems!

    Thanks for all the advice though.

    Gavin.


    "David Dorward" <> wrote in message
    news:d7vikh$lrp$1$...
    > Gavin wrote:
    >
    >> I have the code below in my html page:
    >>
    >> <div id=menu>
    >> <a onclick="P7_swapClass(1,'sub1','sectionon','sectionoff','div')"
    >> href="javascript:;">

    >
    > Why is this an anchor?
    >
    > Why doesn't the href point to anything useful?
    >
    >> On
    >> Air...</a> </font>

    >
    > You have a </font>, but no <font> (not that you should be using the font
    > element anyway - it *is* 2005 now).
    >
    > You should probably pay a visit to http://validator.w3.org/
    >
    >> 1</a> <a hre

    >
    > Nothing between anchors except white space, this isn't a good idea. The
    > links will tend to blur into each other and be difficult to tell apart.
    >
    > Since you appear to have a list of links, why doesn't your markup reflect
    > that? http://css.maxdesign.com.au/listamatic/
    >
    >
    >> font-family: Verdana;

    >
    > The trouble with Verdana is that it encourages authors to use very small
    > fonts. This wouldn't be too bad if you could be certain that every visitor
    > will have Verdana installed (its more readable then most fonts at very
    > small sizes), but you can't.
    >
    >> font-size: 18pt;

    >
    > Browsers are not very good at knowing the correct DPI of the system, so
    > the
    > point unit is highly inappropriate for use on screen. It also causes
    > additional problems in Internet Explorer since that browser provides no
    > convenient way to resize text specified in points.
    >
    > http://css-discuss.incutio.com/?page=UsingPoints
    >
    >> #menu a:link, #menu a:active, #menu a:visited, #menu a {
    >> color: #000000;

    >
    > It isn't a very good idea to set visited and unvisited links to be the
    > same
    > colour - you remove a very useful visual clue from the user by doing so.
    >
    >> font-size: 11px;

    >
    > 11px is very small (see my previous point about Verdana), and also suffers
    > from the resizing issue in MSIE.
    >
    > http://css-discuss.incutio.com/?page=UsingPixels
    >
    >> I have a CSS file saying what the menu tags should be formated like, but
    >> when the new drop down menu appears it doesn't display any text or links?

    >
    > Since you have failed to provide a complete set of code to recreate this
    > problem, its rather difficult to tell. Try providing a URL to a live
    > example (URLs are much between then a bunch of files since whomever
    > decides
    > to help would have to recreate your files, which takes time - and they
    > aren't being paid to help you).
    >
    > I'd suggest you fix any machine detectable syntax errors though. (Some
    > good
    > reasons for that can be found at
    > http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you )
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
     
    gavin, Jun 6, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    541
    Chris Uppal
    May 5, 2005
  2. Nick Wouters
    Replies:
    5
    Views:
    4,659
    Flinky Wisty Pomm
    May 8, 2006
  3. KK
    Replies:
    2
    Views:
    646
    Big Brian
    Oct 14, 2003
  4. MuZZy
    Replies:
    7
    Views:
    1,785
    Mike Hewson
    Jan 7, 2005
  5. mera
    Replies:
    7
    Views:
    1,130
Loading...

Share This Page