Showing posts with label CSS3. Show all posts
Showing posts with label CSS3. Show all posts

Wednesday, 19 February 2014

wordwrap in php

              word wrap a wraps and break string to a given number of characters.here given different example and well explained with syntax.also a word wrap a one of the php string function.and this function contain four argument within it.

Syntax :

string wordwrap ( string $str [, int $width = 75 [, string $break = "\n" [, bool TRUE/FALSE ]]] )

str      : string.
Width : The number of characters length which the string will be wrapped.
break : The line is broken using optional break statement like "\n".
cut     : if cur is set TRUE than string will be always wrapped before the specified width.if you want to your string
        larger than given width than remove this parameter from string. like this,

     wordwrap('Hello world !', 3, "<br />\n");

Example :


<?php
    $text = "Easyscript Provide Fresh and Easy script To Learn Website Development.";
    $newtext = wordwrap($text, 20, "<br />\n");

    echo $newtext;
?>

Output :

Easyscript Provide F<br />
resh and Easy script<br />
 script To Learn Website De<br />
velopment.


Example :

<?php
    $text = "Easyscript Provide Fresh and Easy script To Learn Website Development.";
    $newtext = wordwrap($text, 20, "\n");

    echo $newtext;
?>

Output :

Easyscript Provide F
resh and Easy script
 script To Learn Website De
velopment.

Wordwrap in css

p {word-wrap:break-word;}


how to create tabs dynamic example in html

             
                  in this post to you provide how to create dynamic tab menu using jQuery. standards compliant with menu tabs and sub contents are defined using HTML.and contents of this menu are search engine friendly. here you should set one tab default when the page is loads. if your default tab contains a sub content, that content will be show. here follow some steps to create dynamic tab menu and use it where were you wish.

first create one index.html file and include below two .js file and one .css file.

<link rel="stylesheet" href="jquery-ui.css" TYPE="text/css">
<script src="jquery-1.9.1.js"></script>
<script type="text/javascript" src="jquery-ui-1.10.3.custom.min.js"></script>

Than put below jQuery code in <head> tag.

<script language="javascript">
$(document).ready(function() {
    var tabs = $("#container-1").tabs();
    var tabCounter = 1;

    $('#add_tab').click( function(){
        var ul = tabs.find( "ul" );
        var current_idx = ul.find("li").length + 1;
        $("<li><a href='#fragment-" + current_idx + "'>Menu</a></li>" ).appendTo( ul );
        tabs.append("<div id='fragment-" + current_idx + "'>Content of Added Menu" + current_idx + "</div>");
        tabs.tabs("refresh");
        tabs.tabs("select", 1);
    });
}); 
</script>

After follow abow step write few line html code look like this.

<div id="container-1">
    <ul>
        <li><a href="#fragment-1">Menu 1</a></li>
        <li><a href="#fragment-2">Menu 2</a></li>
        <li><a href="#fragment-3">Menu 3</a></li>
    </ul>
    <div id="fragment-1">Content of First Menu by easyscript4u.com</div>
    <div id="fragment-2">Content of Second Menu by easyscript4u.com</div>
    <div id="fragment-3">Content of Third Menu by easyscript4u.com</div>
</div>
        <button id="add_tab">Add Tab</button>
</div>

             now you can add new tab easily by clicking "Add Tab" button and enjoy. you can see live demo or free download complate example by clicking download button.

      
            if you have any query or problem in PHP or PHP framework like Codeigniter, WordPress, Magento than you can freely contact on this email : easyscript4you@gmail.com




tabs examples in html with css

                         
                a tab navigation is a one of the most fundamental element in modern web structure. here i have examplain about tab that how to create tab in html using css and jQuery. it is very simple and very easy just follow some step to create a tab menu and also you can easily implement this tab menu in your website and can change tab design and colors.



Thursday, 2 May 2013

Accordion menu using css3

         
     








           Accordion Menu is a simple one type of collpsable menu. It enables an accordion menu for your Pages sidebar widget. It works for upto 3 levels of hierarchy. there are meny different types of accordian menu available using css, css3, javascript, jquery, ajax etc....