HTML or CSS navigation

Discussion in 'HTML & Website Design' started by 24788, Feb 14, 2010.

  1. #1
    Anyone know which one would be better for cooler navigation? I just want to make a simple two image navigation button with text on it. I have the two buttons already in gimp (photoshop - free) and I just want a simple mouse over. Would CSS be a better way to do it or should I do it in html?

    CSS would be trickier, but I have the mouse over effect that adds 2-3x a better look in my opinion.

    HTML would be easier, but I don't know if I can do a mouse over in html. I'd just do a simple button with a name and a link behind it.

    Anyone have a good guide to use?

    My question basically is can I do a mouse over in straight html or maybe javascript?
     
    Last edited: Feb 14, 2010
    24788, Feb 14, 2010 IP
  2. DOCtriN

    DOCtriN Well-Known Member

    Messages:
    184
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #2
    Use CSS, there so many CSS rollover tutorial on Internet :)
     
    DOCtriN, Feb 14, 2010 IP
  3. 24788

    24788 Peon

    Messages:
    529
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Got any good links? I am struggling with this for my website.

    I'm doing something wrong with my image. My image wants to repeat itself rather than stop where the block is formed for the navigation. Is there anyway to get around this to force it to cut off the image or stretch to size to fit a block?
     
    Last edited: Feb 14, 2010
    24788, Feb 14, 2010 IP
  4. felixjet

    felixjet Greenhorn

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    20
    #4
    i would use a jquery menu. they are cross-compatible and looks pretty nice
     
    felixjet, Feb 14, 2010 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    Because throwing a fat bloated pile of crap javascript library at a MENU is such a good solution. Why not add auto-playing midi files and a flash based splash page while you're at it?

    HTML on it's own cannot do a hover effect. Period. Your choices are javascript, or CSS. Use CSS, as javascript rarely has graceful degradation, results in multiple image files if using images that have to be 'precached' and a whole bunch of other nonsense for what can be done as a simple sliding image in CSS taking a fraction the code.

    Can you post your images? One of us could toss together a simple example of how to handle the rollover effect.
     
    deathshadow, Feb 14, 2010 IP
  6. felixjet

    felixjet Greenhorn

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    20
    #6
    uh.... if you hate jquery its just your opinnion. i have my own one. there is nothing wrong with jquery, you just dont like it, thats all..
     
    felixjet, Feb 14, 2010 IP
  7. thelethargarian

    thelethargarian Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I personally prefer CSS and think that JS rollover images are a thing of the past. They're ok if you really want to use them. I could say that they might not have JS enabled, but that it hardly ever the case these days. My opinion may also be a little biased because I really don't like JavaScript.
     
    thelethargarian, Feb 14, 2010 IP
  8. xyberworks

    xyberworks Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I think that CSS is the better choice, for more about CSS please visit the following URL

    w3schools.com/css/default.asp

    Regards
     
    xyberworks, Feb 15, 2010 IP
  9. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #9
    If you are going to do a mouseover do it in CSS. You can set the hover event to the link or div to show a different background.
     
    LeetPCUser, Feb 15, 2010 IP
  10. kreativi

    kreativi Peon

    Messages:
    89
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yes, jquery is the best to do the effect. It will be better if javascript is called externally. Also, by using jquery we can make linking SEO friendly.
     
    kreativi, Feb 15, 2010 IP
  11. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #11
    1) Best? If 70k minified is your idea of best for a MENU...

    2) What has SEO got to do with using javascript; Hell, .js is usually the OPPOSITE of SEO friendly... unless of course all you are doing is using jquery to enhance a CSS menu, in which case use a CSS menu and throw a behavior file at IE.

    What the **** is it with people throwing jquery at the SMALLEST of problems....
     
    deathshadow, Feb 15, 2010 IP
  12. noahqw

    noahqw Member

    Messages:
    180
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #12
    The best navigation when it comes to "cool" out of the two choices would be CSS.
     
    noahqw, Feb 15, 2010 IP
  13. seoz87

    seoz87 Peon

    Messages:
    262
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #13
    @deathshadow

    I wont expecting something about seo from a person whose own website's url structure is non-seo friendly. Hell its against even the usability with your obsession with HULK i guess..never mind...your age demands so :p

    Just go to any website which is using jquery navigation and then view source of that page...you can clearly see the navigation in html in there...which is totally readable by search engines as well as reader...infact you can put link in javascript and search engine spider can read it too

    Yes you can do it with CSS too But If you know CSS then it doesn't bound you to use CSS for every thing..unless of course you don't know anything except CSS :)

    By reading one or two blogs about seo didn't make you some seo teacher ....

    you are developer/programmer...stick to it..a friendly advice....

    Lessons For You:
    when you don't know bout something don't fuck about it
     
    seoz87, Feb 15, 2010 IP
    akiza likes this.
  14. m7md_cis

    m7md_cis Peon

    Messages:
    91
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Using CSS you can make it:

    .button{
    font-family:Verdana, Tahoma, Arial;
    font-size:11px;
    font-weight:normal;
    color:#000000;
    text-decoration:none;
    padding:5px;
    background-image:url(image-name-1.jpg);
    background-repeat:no-repeat;
    }
    .button a{
    font-family:Verdana, Tahoma, Arial;
    font-size:11px;
    font-weight:normal;
    color:#000000;
    text-decoration:none;
    padding:5px;
    background-image:url(image-name-1.jpg);
    background-repeat:no-repeat;
    }
    .button a:hover{
    font-family:Verdana, Tahoma, Arial;
    font-size:11px;
    font-weight:normal;
    color:#000000;
    text-decoration:none;
    padding:5px;
    background-image:url(image-name-2.jpg);
    background-repeat:no-repeat;
    }
     
    m7md_cis, Feb 15, 2010 IP
  15. northernweb

    northernweb Peon

    Messages:
    319
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    CSS every time! i'm guessing by "HTML" you actually mean javascript. unless you need to do anything particuarly tricky i'd recommend CSS or jQuery. both are lightweight and look great. and most importantly they will make it easier to adhere to W3C standards.
     
    northernweb, Feb 16, 2010 IP