Search the Community
Showing results for tags 'element'.
-
Folks, What is an "Element" in php ? I came across the word when researching on the php's "Count" function: https://www.tutorialspoint.com/php/php_function_count.htm These are not useful as they talk about "element in array" etc.: http://php.net/manual-lookup.php?pattern=element&scope=quickref https://www.google.com/search?q=what+is+an+element+in+php+%3F&oq=what+is+an+element+in+php+%3F&aqs=chrome..69i57j69i64.5238j0j7&sourceid=chrome&ie=UTF-8 Let's not talk about "element in any array". Let's just talk about "element" itself. What is the definition of an "element" in php ? And so, to newbies, how can you describe an "Element" in the layman's language without resorting to complex or advanced stuffs ? I'd like to see a few examples of an element in php with very simple & basic coding that is easily understandable to all beginners. I'm sure future newbies would appreciate your hard work! I am sure "elements" not only exist in "arrays" but other stuffs in php too. So, how-about a few examples on these other stuffs too regarding their elements ? Let me tell you why I prefer examples of an element without involving the array. Here: https://www.tutorialspoint.com/php/php_function_count.htm It says: Return Value It returns the number of elements in an array. Example Try out following example − <?php $a[0] = 1; $a[1] = 3; $a[2] = 5; $result = count($a); print($result); ?> This will produce the following result − 3 I don't see any elements in that example. I see things in this format: $variable name[array number] = array value; Where is the so-called "element" involved in any of this ? Which part is the "element" ? Which part of the "equation" ? Get a beginner's point of view ? These tutorials are not easy to understand. Thanks!
-
Hello fellow coders! I am trying to use tutorials to understand how to make dropdown menus with CSS3. So far so good, except for one little snag. Let me begin by showing you my HTML: <nav id='tabmenu'> <ul> <li><h2><a href='about.php' class='inactive'tabindex='4'>About</a></h2></li> <li><h2><a href='flash.php' class='inactive'tabindex='4'>Flash</a></h2></li> <li><h2><a href='writing.php' class='inactive'tabindex='4'>Writing</a></h2> <ul> <li> <a href='#' class='inactive' id='tech' onclick='toggleWritingType(this)' tabindex='10'>Technical</a> <a href='#' class='inactive' id='jour' onclick='toggleWritingType(this)'' tabindex='9'>Journalism</a> </li> </ul> </li> <li><h2><a href='design.php' class='inactive'tabindex='4'>Design</a></h2></li> <li><h2><a href='webs.php' class='active' tabindex='4'>Webs</a></h2> <ul> <li><a href='#' class='active' id='cobra' onclick='toggleSShots(this)' tabindex='9'>Cobra Cabana</a></li> <li><a href='#' class='inactive' id='hughes' onclick='toggleSShots(this)' tabindex='10'>Hughes, PhD</a></li> <li><a href='#' class='inactive' id='rasche' onclick='toggleSShots(this)' tabindex='11'>Rasche</a></li> </ul> </li> </ul> </nav> So, as you can see I have two submenus, and potentially one more if I can get this working. The tuts I found online created an absolute position for one submenu, which does not apply well to the second menu since they should not be in the exact same location. I think I now have a good understanding about how to use CSS3 to make submenus appear and reappear, but I'm not so clear on the placement. Is there a way to write one rule that applies to any submenu to appear beneath (relative to) it's parent <ul>? Here is my CSS for the nav: #tabmenu { width: 985px; margin: 0 auto 10px; height: 40px; border-bottom: 1px #fff solid; } #tabmenu a{ background-color: #000; color: #fff; width:150px; height:40px; line-height: 40px; float: right; text-align:center; text-decoration: none; } #tabmenu a.inactive:hover { color: #999; opacity: 0.7; filter: alpha(opacity=70); -khtml-opacity: 0.7; -moz-opacity: 1; } #tabmenu a.active, #tabmenu ul a.active { background-color: #fff; color:#000; } #tabmenu ul ul { display: none; } #tabmenu li:hover > ul { //This is the major area of concern, I believe. display: block; top: 40px; position: relative; height: 120px; width: 150px; } I made a fiddle: http://jsfiddle.net/cTcVT/ Thanks!
-
I am creating my first responsive website. My site has a wrapper that has the following css: #wrapper { width: 100%; max-width: 1230px; margin: 0 auto; background: #e0dfdf; } and I would like to have this element have a padding of 15px but when i apply that style the width of the element increases by 15px when i want it to stay at for example the max-width of 1230px. Any suggestions?
- 4 replies
-
- responsive
- element
-
(and 1 more)
Tagged with: