Everything posted by Snel pUppie
-
Dropdown menu with Javascript onclick?
It works for me now Thanks Dizi... I'm gonna study the code and try some things now
-
Dropdown menu with Javascript onclick?
Yes you are fully right Dizi! I tried to change onmouseover to onclick but nothing appears when I click the link :s <ul id="sddm"> <li><a href="#" onclick="mopen('m1')" onmouseout="mclosetime()">Home</a>
-
Dropdown menu with Javascript onclick?
*edited
-
Dropdown menu with Javascript onclick?
Thanks for the links Dizi! But I kinda need one with onclick instead of mouseover etc =P
-
Dropdown menu with Javascript onclick?
I don't think it's easier or smarter to do a drop-down menu activated by click in css than Javascript. And I am learning javascript and that's why I want to do this Thanks for the replies so far. Waiting for Faevilangel to reply
-
Dropdown menu with Javascript onclick?
It didn't work for me. Did you try the code?
-
Dropdown menu with Javascript onclick?
Okay... So I am about to learn Javascript and I am wondering how the most simple way to create a dropdown menu with onclick in javascript is? I know how to make a dropdown menu in CSS but I want to make it with javascript now. Got any great tutorials? Tips? I was thinking something like this: When onclick is activated (on the mainlinks) the display attribute(for the submenus) will change it's value from none to block and vice versa... I want this as simple as possible for easier understanding Thanks in advance!
-
Dropdown menu on click possible with CSS only?
Thanks for your reply a.g.r.c
-
Dropdown menu on click possible with CSS only?
Javascript is really the way to go on this but it was a task from my teacher ;p Next task: Make this in javascript :| I know no javascript at all XDdddddd
-
Dropdown menu on click possible with CSS only?
Updated first topic with the solution! (The html and css code).
-
Dropdown menu on click possible with CSS only?
Is it possible to do this by combining active and focus somehow? I heard that someone in my class managed to do this.
-
Dropdown menu on click possible with CSS only?
Haha evil
-
Dropdown menu on click possible with CSS only?
So how would you do to link the options (without any javascript obviously)?
-
Dropdown menu on click possible with CSS only?
I have pretty much gotten the same answers from everyone. I guess it's a trick by the teacher =P I'll just do normal drop-down menus =p
-
Dropdown menu on click possible with CSS only?
I have just started college as a Web application developer. My teacher is an it-consultant and he tends to be very smart and good at what he's doing As Wickham said, it may be a trick question... I just want to know if someone knows for SURE that this is impossible with just css and xhtml. Thanks for all the replies, I'll keep waiting for answers... I have until wednesday next week to finish this Edit: Forgot to mention that it must be valid to xhtml 1.0 strict.
-
Dropdown menu on click possible with CSS only?
Hello everybody! I got this task from my teacher together with two in my class to create two dropdown menus in CSS. One just below the header and one to the left of the content... So the dropdown menu to the left was just gonna be a normal one, when you hover it a submenu appears. But this dropdown menu below the header was gonna be activated when you've clicked one of the links. My friend has been helping me with this and he cannot find a way to this in CSS/XHTML ONLY! So I am wondering if it is possible to active a dropdown menu when you click on the links by only using CSS/XHTML. And how would I do this? Thanks in advance! EDIT: Our teacher showed us his solution, here is the html: <html> <head> <title></title> <link href="menu.css" rel="stylesheet" type="text/css" /> <link href="menuvg.css" rel="stylesheet" type="text/css" /> <script src="switchstylesheet.js" type="text/javascript"></script> </head> <body> <ul id="topmenu"> <li><a href="#">Getting started</a></li> <li>Installing <ul> <li><a href="#">Apache</a></li> <li><a href="#">PHP</a></li> <li><a href="#">MySQL</a></li> </ul> </li> <li>Configuration <ul> <li>Apache <ul> <li><a href="#">httpd.conf</a></li> <li><a href="#">vhosts</a></li> </ul> </li> <li><a href="#">PHP</a></li> <li><a href="#">MySQL</a></li> </ul> </li> <li>Testing <ul> <li><a href="#">Why?</a></li> <li><a href="#">What?</a></li> </ul> </li> <li><a href="#">Summary</a></li> </ul> <ul id="leftmenu"> <li><a href="#">Getting started</a></li> <li>Installing <ul> <li><a href="#">Apache</a></li> <li><a href="#">PHP</a></li> <li><a href="#">MySQL</a></li> </ul> </li> <li>Configuration <ul> <li>Apache <ul> <li><a href="#">httpd.conf</a></li> <li><a href="#">vhosts</a></li> </ul> </li> <li><a href="#">PHP</a></li> <li><a href="#">MySQL</a></li> </ul> </li> <li>Testing <ul> <li><a href="#">Why?</a></li> <li><a href="#">What?</a></li> </ul> </li> <li><a href="#">Summary</a></li> <li>Stylesheet <ul> <li><a href="#" id="G">G</a></li> <li><a href="#" id="VG">VG</a></li> </ul> </li> </ul> <div id="content"> <h1>HTML Ipsum Presents</h1> <a href="http://html-ipsum.com/">http://html-ipsum.com/</a> <p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p> <h2>Header Level 2</h2> <ol> <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li> <li>Aliquam tincidunt mauris eu risus.</li> </ol> <blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p></blockquote> <h3>Header Level 3</h3> <ul> <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li> <li>Aliquam tincidunt mauris eu risus.</li> </ul> <pre><code> #header h1 a { display: block; width: 300px; height: 80px; } </code></pre> </div> </body> </html> And here's the menu.css(for the layout): /** * Meny utan javascript * layout CSS för G och VG nivå * * @author Tobias Nordström, 2009 */ /***** meny ****/ /**** top ****/ #topmenu, #topmenu ul{ list-style: none; margin:0; padding:0; } #topmenu ul, #topmenu li{ width:120px; text-align: center; } #topmenu{ margin-left:150px; overflow: hidden; } #topmenu > li{ float:left; } #topmenu li{ border-bottom: 1px solid #446644; padding:0 12px; background-color: #e7efe7; line-height: 36px; } #topmenu ul li{ padding: 0; font-size:small; } #topmenu > li > ul > li{ background-color: #d7dfd7; } #topmenu > li > ul > li > ul > li{ background-color: #c7cfc7; } /**** left ****/ #leftmenu, #leftmenu ul{ list-style: none; margin:0; padding:0; width:120px; } #leftmenu { text-indent:12px; } #leftmenu li{ border-bottom: 1px solid #446644; padding:0; background-color: #e7efe7; line-height: 36px; } #leftmenu > li > ul > li{ background-color: #d7dfd7; font-size:small; } #leftmenu > li > ul > li > ul > li{ background-color: #c7cfc7; } #leftmenu{ width: 150px; float:left; clear:left; } /**** content ****/ #content{ width: 696px; float:left; padding:12px; } /**** other ****/ html, body{ margin: 0; padding: 0; background-color:eeffee; font-family: Georgia, serif; } a { text-decoration: none; color: #335533; } a:hover { border-bottom: 1px dotted #446644; color: #446644; } h1,h2,h3,h4,h5,h6,#topmenu,#leftmenu{ font-family:"Trebuchet MS", sans-serif; } And here's the menuvg.css (where the magic is!): /** * Meny utan javascript * CSS för VG nivå * * @author Tobias Nordström, 2009 */ /***** meny ****/ #topmenu{ overflow:visible; } #topmenu ul{ display:none; position:absolute; margin-top:-36px; padding-top:36px; top: 36px; } #topmenu ul ul{ margin-left:-120px; left:120px; padding-left:120px; top: 36px; } #topmenu li:active > ul, #topmenu ul:hover{ display:block; } #leftmenu ul{ display:none; position:absolute; left: 150px; top:0; margin-left:-150px; padding-left:150px; } #leftmenu li:active > ul, #leftmenu ul:hover{ display:block; } #leftmenu li{ position:relative; } #leftmenu ul ul{ left: 120px; top:0; margin-left:-120px; padding-left:120px; } It's an ugly way to do it, but it is possible! Enjoy
-
feedback please
You should really fix the 'contact us' page. It can be very hard to find the input fields for users. I suggest you make a border for those input fields or change their background. Same with the button, it's barely visible. The rest of the page is nice
-
PHP error in SQL syntax
It works without having them there I think, but it will give you this mysql error about the syntax~ This is how an insert query should look like: mysql_query( "INSERT INTO `table` (`username`, `password`, `usergroup`, `last_action`) VALUES ('$user', '$pass', 'Member', '$time')" );
-
my sql problem
Your first error is about your username and password, either both or any of these fields are incorrect when you're trying to login. Second error is something about your function, I am a newbie in php but I have had that error before when I was gonna use a function.
-
php my admin log in problem
Try the root as username and use your new password that you have been changing to. When you followed that tutorial they taught you how to set up a password for phpmyadmin, and you probably did that and that's yours password. If you are logged in phpmyadmin you go to Reload privilegies->Edit privilegies and this is where you can create a user in phpmyadmin or edit settings such as password change. Hope it helped!
-
Real Estate Website design
As a tool I recommend dreamweaver as well, but if you decide to learn and start coding I would recommend PHPDesigner 2008. It has some great features!
-
Strange Form behavior in Firefox
I don't really know what the problem is but you should make your website valid to the doctype you are using. You've got 60 errors =p The input errors appears in the "Product to be Installed" field and in the "Current Radio" field. And btw, you should use div's for the layout instead of tables. Good luck, I wish I could help you
-
Forms, CSS or Tabular?
I use div's for contact forms. You should REALLY learn div's, I think they are easier than tables...
-
Which browser do you use the most? Be honest.
I use firefox for everything. I can't stand IE anymore, in IE7 they added tabs like firefox got, but they load far to slow :/ 1-2 seconds more is still to much!
-
Stretch image to fill div?
I don't really get what you wanna do... Do you want a picture to fill a div you can just set a background-image in this div and put the width and height the same as the background. Or do you want the picture to follow the div's size? If that's the case, your image will probably lose quality as already stated