Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by davidb52

  1. Hello,I want a link that has a little (let's say) slogan underneath it.so not:http://google.combut:http://google.com but in this situation I can't get it work... <ul> <li><a href="#">Technology</a> <!-- I want a little slogan under this --> <ul> <li><a href="#2">PHP</a></li> <li><a href="#1">HTML</a></li> </ul> </li> <li> <a href="#">Lifestyle</a> <!-- I want a little slogan under this --> <ul> <li><a href="#">Sneakers</a></li> <li><a href="#">Random</a></li> </ul> </li> <li> <a href="#">About</a> <!-- I want a little slogan under this --> <ul> <li><a href="#">Background</a></li> <li><a href="#">Contact</a></li> </ul> </li></ul> /* Menu outside*/nav#headerMenu{width: 724px;height: 75px;margin: 0px 0px 0px 266px;padding: 0px 5px 0px 5px;background-color: rgb(255,255,255);}ul{margin: 0;padding: 0;list-style: none;float: right;font-size: 18px;}ul li{display: block;position: relative;float: left;line-height: 75px;}li ul{display: none;}ul li a{display: block;text-decoration: none;margin-right: 5px;white-space: nowrap;height: 72px;width: 150px;text-align: center;color: rgb(99,99,99);}li:hover ul{display: block;position: absolute;}li:hover li{float: none;font-size: 10px;width: 150px;height: 20px;}/* Submenu kleur */li:hover ul a{background: rgb(255,255,255);height: 20px;margin-top: 0px;line-height: 20px;}/* Submenu kleur (hover) */li ul a:hover{color: rgb(0,93,232);background-color: rgb(156,156,156);}/* hoofdmenu kleur hover submenu */li:hover > a {background: rgb(0,93,232);height: 2px;margin-bottom: 72px;}
  2. MM, link doesn't work.But I'm using html5. http://dev.w3.org/html5/html-author/doesn't tell anything about what to use... http://www.w3schools.com/html5/tag_meta.aspin the example that you can try, they use />. While later they use "HTML5: <meta charset="UTF-8">" So what is the best way?The validator doesn't say anything about it...
  3. Hello,I'm wondering if this is allowed, and for so far I can't find the answer.For elements likemetaimgHow do you close it? Because you only need "1" element (<img src="">) not 2 like (<a href=""></a>)So:<meta charset="utf-8"><img src="images/layout/logo.png" width="266" height="100" alt="Logo"> or<meta charset="utf-8" /><img src="images/layout/logo.png" width="266" height="100" alt="Logo" /> notice the / Thanks,David
  4. I'm working on a similar menu too. This is may useful for you: HTML: <ul id="menu"><li id="home"><a href="#">Home</a></li><li id="about"><a href="#">About Us</a><ul><li id="about2"><a href="#">The teams</a><ul><li><a href="#">History</a></li><li><a href="#">Vision</a></li><li><a href="#">History</a></li><li><a href="#">Vision</a></li></ul></li><li><a href="#">History</a></li><li><a href="#">Vision</a></li></ul></li><li id="products"><a href="#">Products</a><ul><li><a href="#">Cozy Couch</a></li><li><a href="#">Great Table</a></li><li><a href="#">Shiny Shelf</a></li><li><a href="#">Invisible Nothing</a></li></ul></li><li id="contact"><a href="#">Contact</a><ul><li><a href="#">Online</a></li><li><a href="#">Right Here</a></li><li><a href="#">Somewhere Else</a></li></ul></li></ul> CSS: /* menu */ul{font-weight: bold;font-size: 24px;margin: 0;padding: 0;list-style: none;}ul li{display: block;position: relative;float: left;}li ul{display: none;}ul li a{display: block;text-decoration: none;padding: 7px 5px 0px 5px;background: orange;white-space: nowrap;}li:hover ul{display: block;position: absolute;}li:hover li{float: none;font-size: 11px;}/* Hoofdmenu kleur */#about:hover a{background: red;}/* Submenu kleur */#about:hover ul a{background: yellow;}/* Hoofdmenu kleur (hover) */#about a:hover{background: red;}/* Submenu kleur (hover) */#about ul a:hover{background: green;}#about2 ul{display:none;}#about2:hover ul{display:block;left: 100%;top:0px;}#about2:hover ul a{background: purple;}#about2 ul a:hover{background: blue;}
  5. ( I asked this question on a other forum too, but I want to hear you opinions because the traffic at w3schools is different than that site )Hello,I'm trying to make a fast website. The css / javascript etc is already minifyd. But now I want to make my database faster.I know it's all about indexes and structures but even when that is already done well.What schould I use by then?Mysql, mysqli, pdo or postgresql?I was using mysql but then people said mysqli was faster. Than people said choose mysqli for speed and pdo for functionallity now they are saying choose pdo it's also faster. So what is really the fastest? and again I know it's all about structure your database and index it but let's say that is already totally right.Already thank you!David
  6. Nah I'm only want to increase the speed not the functionallity.So PDO exists more for the functionallity and Pear MDB2 too. So mysqli for speed? What do you guys think?
  7. Which means I still have to change everyting....And if I have to change everything why not go for the best by than? So do you think PDO is good for mysql?
  8. Thanks for the reply,the only problem: I don't know nothing about mysqli and pdo etc.Can you give me a good tutorials site?
  9. Thanks both, 1. What's that?2. Oke, thanks for the tip3. I did that too a while back ago, but I think and is easier. But is your way faster?4. Yes it's a little bit more readable by than but it's also ironic because I want to use less variables.
  10. Hello,I'm trying to optimize my PHP code for more speed.I normally used variables twice but I found out that that is something that slow downs your speed.Although now when I'm avoiding that I think my code is less readable so I wanted to ask you guys:What do you prefer? Readable code or faster code? I'm talking about this short of things: // before:$count = mysql_result($query, 0);if($count==1){ $place = $_POST['place'];if($place>=0 and $place<=$maxsize and is_numeric($place)){ // after:if(mysql_result($query, 0)==1){ if($_POST['place']>=0 and $_POST['place']<=$maxsize and is_numeric($_POST['place'])){
  11. davidb52

    cron job

    I love this tutorials about cron jobs http://net.tutsplus.com/tutorials/php/managing-cron-jobs-with-php-2/
  12. davidb52

    slow database

    Indeed to less informationIn phpmyadmin you could use optimize. I'm not sure if you could do something like this in oracle.
  13. davidb52

    in_array ( )

    I don't see the problem why it can't <?php$a = array('1.10', 12.4, 1.13);if (in_array('12.4', $a, true)) { echo "'12.4' found with strict check\n";}if (in_array(1.13, $a, true)) { echo "1.13 found with strict check\n";}?>The above example will output:1.13 found with strict check Update:Oops a string, not an array... Yeah you should use strpos for that.But btw why not make an array?
  14. or php,create a array with pages something like (just the idea) <?php$pages = array(index.html,test.html,more.html,nothing.html);?> now create a random numberbecause we have 3 array items$i = rand(0,3);and show the page by:include("$pages[$i]"); if you want a blank page:if($i==3){// do nothing}else{include("$pages[$i]");}
  15. Visit this url to make your own feed thing.than change in div id="blog" the <h1>From the blog:</h1> to <h1>Industry News</h1>and beneath that the feed (that javascript code you get at the url)
  16. Maybe this works between <video etc. autobuffer preload=”auto” >
  17. @ingolmeOke, I will. @Don EI know it's not hard to press tab twice. But I'm justing saying "Hey w3schools if you want to improve your forum by 0,00001% this is what you could do...". Look at all these big companies were I log in at least once a day: Google, Facebook, Twitter and 99,9% off all other log in systems on the internet have this "function" to only tab once to get to the password section.
  18. davidb52


    The row may is only a integer.The row is set on unique.The post of email isn't correctly spelled (That's why it says 0) Or could you give me some more of your code?
  19. Make it a form.And make a submit button. Add to your existing file something like (just the basic idea):<?phpif(isset($_POST['optionlist1']) and etc.){$optionlist1 = $_POST['optionlist1'];and etc}?> if(!isset($optionlist1) and etc){ ?><div id="result"><?php$query = SELECT something FROM somewhere WHERE something="$optionlist1"?></div><?php } ?> if you want to do it without refreshing take a look at this.
  20. You may like this Link.And you may like this link Picture:
  21. Hello w3schools,I love your site no doubt. But it's not a big problem or really a problem but it improve's the functionality of the site by 0,0001%.Check this picture: If you type in your username and you press TAB normally you go to the password section (99,9% of the sites in this word).But if you do it in that screen you are selecting the link (like the left on the picture). It's not a first world problem and I'm not lazy or something but because 99.9% of the sites has it "right" it's a little bit annoying. Right in the way of pressing 1 time tab and you could type in your password. You could solve this problem easily (Picture right)
  22. davidb52

    Simple Query

    rename it to dbsymbol it may work.Sometimes sql thinks you meaning a tag instead of a (what you want)Like this:SELECT select,where,group FROM where WHERE group=order by Sql can't handle this 2x select , 2x where you see the problem?
  23. left box css = float:leftthan the middle one = do nothingright box css = float:right Now you will have the [] [ ] [] structere
  • Create New...