Jump to content

shaili_shah

Members
  • Posts

    111
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by shaili_shah

  1. If you're trying to apply background images to html and body that fill up the entire browser window, neither. Use this instead:

    html{ height : 100%;} body{min-height : 100%;}

    the reason why you have to specify height and min-height to html and body respectively is because neither element has any intrinsic height. Both are height: auto by default. It is the viewport that has 100% height, so height: 100% is taken from the viewport, then applied to body as a minimum to allow for scrolling of content.

     

     

  2.  
    window is the global object,you can call an alert either by alert('hey'); or by referencing the global object specificially:window.alert('hey');

    Both  are the same.

  3. 
            <table border="1" width="50%" height="50%">
                <tr>
                    <td colspan="5">1</td>
                </tr>
                <tr>
                    <td colspan="3">2</td>
                    <td colspan="2" rowspan="3">3</td>
                </tr>
                <tr>
                    <td rowspan="3">4</td>
                    <td colspan="2">5</td>
                </tr>
                <tr>
                    <td rowspan="2">8</td>
                    <td rowspan="2">9</td>
                </tr>
                <tr>
                    <td>6</td>
                    <td>7</td>
                </tr>
            </table>
       
  4. HTML:

     <div class="item">
        <img src="http://movingimages.files.wordpress.com/2009/10/earth-simulator-offers-peaks-into-our-planetary-future.jpg?w=780" alt=""/>
        <p>My Caption here</p>
      </div>

    CSS:

    .item{
      width:200px;
      text-align:center;
      display:block;
      background-color: transparent;
      border: 1px solid transparent;
      margin-right: 10px;
      margin-bottom: 1px;
      float:left;
    }

     

     

  5. HTML:

    <button onclick="myFunction()">Click Me</button>

    <div id="myDIV" style="display: none;">
      This is my DIV element.
    </div>

    Javascript :

    function myFunction() {
      var x = document.getElementById("myDIV");
      if (x.style.display === "none") {
        x.style.display = "block";
      } else {
        x.style.display = "none";
      }
    }

  6. Content marketing is a strategic marketing approach focused on creating and distributing valuable, relevant, and consistent content to attract and retain a clearly-defined audience and, ultimately, to drive profitable customer action.

×
×
  • Create New...