samedi 27 juin 2015

open javascript, when clicked, in the parent window

Is there an easy way to make the links in this javascript code open, upon being clicked, in the parent window?

Every example i can find, talks about href, and I don't see how to use that in this code.

<div class="dp-widget" data-dpw="8"></div>
<script type="text/javascript" src="//static.example.com/js_c/widget-ext.js?mt=c"></script>
<script type="text/javascript">
(function(){
    new dpw({
    "format":"div",
    "trackingLink":"http://ift.tt/1LNN4DN",
    "feedtype":"categories",
    "categorylist":"29",
    "theme":"transparent",
    "background":"transparent",
    "photo":true,
    "vector":true,
    "video":true,
    "sort":"1",
    "thumbsize":"110",
    "feedwidth":"200",
    "feedheight":"100",
    "searchBar":true,
    "preview":true,
    "responsive":true,"wid":8,
    "lang":"en"
    }).init();
})();
</script>

Header not filling the entire width or top of the body

Random question I am running into that I am sure is a dull oversign on my part. My header isn't filling to the top portion or left/right portions of my screennand leaving the body a little bit of room in those areas. I provded padding and margins for the elements inside the header, but have tried to max the header size to no avail. Any idea what I might be missing?

Thanks!

HTML:

<body>
    <header>
        <a href="index.html" id="logo">
        <img src="img/logo.png">
        </a>
</body>

CSS:

*{
    boz-sizing: border-box;
}

body{

    font-family: 'Open Sans', Tahoma, sans-serif;
    max-width: 100%;
    background-color: #5F5E5E;
}

/***************
HEADING
****************/

 header{
  float: left;
  margin: 0 0 15px 0;
  padding: 5px 0 -60px 0;
  min-width: 100%;
  width: 100%;
   }

#logo {
 margin: 5px 0 0 70px;
 padding-top: 7px;
 padding-left: 50px;
 display: inline-block;
 max-width: 100%;
}

How to create an input field (HTML) that spans two lines

I want to be able to use an <input> field type of control but allow only two lines.

At the moment I am using two fields but was wondering if anyone can come up with a solution to allow input (similar to a textarea) but no more than two lines. I control the width etc of the field.

For reference, Jquery and Bootstrap 3 are loaded.

Any help much appreciated.

Select2 not showing selected value

I have looked endlessly on here and everywhere else for a while, and I cannot figure out why my Select2 dropdown boxes aren't changing the value they display after I click it out of the dropdown.

I am trying to style the woocommerce product selection boxes using Select2 - I have them all styled, but now they don't seem to actually work. How I am initializing my two boxes:

<script src="http://ift.tt/1GEtfQr"></script>
<link    href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" rel="stylesheet" />
<script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#current-rank").select2({
allowClear: true,
multiple: false,
width: 150
});
$("#desired-rank").select2({
allowClear: true,
multiple: false,
width: 150
});
});
</script>

HTML of the product page relevant to the dropdown -WITH SELECT2 ENABLED-(so yes all my options have an ID that Select2 should be able to use...)

    <td class="value">
    <select id="current-rank" name="attribute_current-rank" data-attribute_name="attribute_current-rank" tabindex="-1" class="select2-hidden-accessible" aria-hidden="true">
        <option id="select-a-rank" selected="selected" value="select-a-rank">Select a Rank</option>         <option id="rank-2" value="rank-2">Rank 2</option>         <option id="rank-3" value="rank-3">Rank 3</option>         <option id="rank-4" value="rank-4">Rank 4</option>         <option id="rank-5" value="rank-5">Rank 5</option>         <option id="rank-6" value="rank-6">Rank 6</option>         <option id="rank-7" value="rank-7">Rank 7</option>         <option id="rank-8" value="rank-8">Rank 8</option>         <option id="rank-9" value="rank-9">Rank 9</option>         <option id="rank-10" value="rank-10">Rank 10</option>         <option id="rank-11" value="rank-11">Rank 11</option>         <option id="rank-12" value="rank-12">Rank 12</option>         <option id="rank-13" value="rank-13">Rank 13</option>         <option id="rank-14" value="rank-14">Rank 14</option>         <option id="rank-15" value="rank-15">Rank 15</option>         <option id="rank-16" value="rank-16">Rank 16</option>         <option id="rank-17" value="rank-17">Rank 17</option>         <option id="rank-18" value="rank-18">Rank 18</option>         <option id="rank-19" value="rank-19">Rank 19</option>         <option id="rank-20" value="rank-20">Rank 20</option>         <option id="rank-21" value="rank-21">Rank 21</option>         <option id="rank-22" value="rank-22">Rank 22</option>         <option id="rank-23" value="rank-23">Rank 23</option>         <option id="rank-24" value="rank-24">Rank 24</option>         <option id="rank-25" value="rank-25">Rank 25</option>         <option id="rank-26" value="rank-26">Rank 26</option>         <option id="rank-27" value="rank-27">Rank 27</option>         <option id="rank-28" value="rank-28">Rank 28</option>         <option id="rank-29" value="rank-29">Rank 29</option>         <option id="rank-30" value="rank-30">Rank 30</option>         <option id="rank-31" value="rank-31">Rank 31</option>         <option id="rank-32" value="rank-32">Rank 32</option>         <option id="rank-33" value="rank-33">Rank 33</option>         <option id="rank-34" value="rank-34">Rank 34</option>         <option id="rank-35" value="rank-35">Rank 35</option>         <option id="rank-36" value="rank-36">Rank 36</option>         <option id="rank-37" value="rank-37">Rank 37</option>         <option id="rank-38" value="rank-38">Rank 38</option>         <option id="rank-39" value="rank-39">Rank 39</option>         <option id="rank-40" value="rank-40">Rank 40</option>         <option id="rank-41" value="rank-41">Rank 41</option>         <option id="rank-42" value="rank-42">Rank 42</option>         <option id="rank-43" value="rank-43">Rank 43</option>         <option id="rank-44" value="rank-44">Rank 44</option>         <option id="rank-45" value="rank-45">Rank 45</option>         <option id="rank-46" value="rank-46">Rank 46</option>         <option id="rank-47" value="rank-47">Rank 47</option>         <option id="rank-48" value="rank-48">Rank 48</option>         <option id="rank-49" value="rank-49">Rank 49</option>         <option id="rank-50" value="rank-50">Rank 50</option>
    </select>
    <span class="select2 select2-container select2-container--default select2-container--below" dir="ltr" style="width: 150px;">
        <span class="selection">
            <span class="select2-selection select2-selection--single" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-labelledby="select2-current-rank-container">
                <span class="select2-selection__rendered" id="select2-current-rank-container" title="Select a Rank">
                    <span class="select2-selection__clear">×</span>Select a Rank
                </span>
                <span class="select2-selection__arrow" role="presentation">
                    <b role="presentation"></b>
                </span>
            </span>
    </span>
        <span class="dropdown-wrapper" aria-hidden="true"></span>
    </span>
</td>

HTML of the product page SELECT2 SCRIPT DISABLED

    <td class="value"><select id="current-rank" name="attribute_current-rank" data-attribute_name="attribute_current-rank">

    <option id="select-a-rank" selected="selected" value="select-a-rank">Select a Rank</option>                     
<option id="rank-2" value="rank-2" class="attached enabled">Rank 2</option>
<option id="rank-3" value="rank-3" class="attached enabled">Rank 3</option>
<option id="rank-4" value="rank-4" class="attached enabled">Rank 4</option>
<option id="rank-5" value="rank-5" class="attached enabled">Rank 5</option>
<option id="rank-6" value="rank-6" class="attached enabled">Rank 6</option>
<option id="rank-7" value="rank-7" class="attached enabled">Rank 7</option>
<option id="rank-8" value="rank-8" class="attached enabled">Rank 8</option>
<option id="rank-9" value="rank-9" class="attached enabled">Rank 9</option>
<option id="rank-10" value="rank-10" class="attached enabled">Rank 10</option>
<option id="rank-11" value="rank-11" class="attached enabled">Rank 11</option>
<option id="rank-12" value="rank-12" class="attached enabled">Rank 12</option>
<option id="rank-13" value="rank-13" class="attached enabled">Rank 13</option>
<option id="rank-14" value="rank-14" class="attached enabled">Rank 14</option>
<option id="rank-15" value="rank-15" class="attached enabled">Rank 15</option>
<option id="rank-16" value="rank-16" class="attached enabled">Rank 16</option>
<option id="rank-17" value="rank-17" class="attached enabled">Rank 17</option>
<option id="rank-18" value="rank-18" class="attached enabled">Rank 18</option>
<option id="rank-19" value="rank-19" class="attached enabled">Rank 19</option>
<option id="rank-20" value="rank-20" class="attached enabled">Rank 20</option>
<option id="rank-21" value="rank-21" class="attached enabled">Rank 21</option>
<option id="rank-22" value="rank-22" class="attached enabled">Rank 22</option>
<option id="rank-23" value="rank-23" class="attached enabled">Rank 23</option>
<option id="rank-24" value="rank-24" class="attached enabled">Rank 24</option>
<option id="rank-25" value="rank-25" class="attached enabled">Rank 25</option>
<option id="rank-26" value="rank-26" class="attached enabled">Rank 26</option>
<option id="rank-27" value="rank-27" class="attached enabled">Rank 27</option>
<option id="rank-28" value="rank-28" class="attached enabled">Rank 28</option>
<option id="rank-29" value="rank-29" class="attached enabled">Rank 29</option>
<option id="rank-30" value="rank-30" class="attached enabled">Rank 30</option>
<option id="rank-31" value="rank-31" class="attached enabled">Rank 31</option>
<option id="rank-32" value="rank-32" class="attached enabled">Rank 32</option>
<option id="rank-33" value="rank-33" class="attached enabled">Rank 33</option>
<option id="rank-34" value="rank-34" class="attached enabled">Rank 34</option>
<option id="rank-35" value="rank-35" class="attached enabled">Rank 35</option>
<option id="rank-36" value="rank-36" class="attached enabled">Rank 36</option>
<option id="rank-37" value="rank-37" class="attached enabled">Rank 37</option>
<option id="rank-38" value="rank-38" class="attached enabled">Rank 38</option>
<option id="rank-39" value="rank-39" class="attached enabled">Rank 39</option>
<option id="rank-40" value="rank-40" class="attached enabled">Rank 40</option>
<option id="rank-41" value="rank-41" class="attached enabled">Rank 41</option>
<option id="rank-42" value="rank-42" class="attached enabled">Rank 42</option>
<option id="rank-43" value="rank-43" class="attached enabled">Rank 43</option>
<option id="rank-44" value="rank-44" class="attached enabled">Rank 44</option>
<option id="rank-45" value="rank-45" class="attached enabled">Rank 45</option>
<option id="rank-46" value="rank-46" class="attached enabled">Rank 46</option>
<option id="rank-47" value="rank-47" class="attached enabled">Rank 47</option>
<option id="rank-48" value="rank-48" class="attached enabled">Rank 48</option>
<option id="rank-49" value="rank-49" class="attached enabled">Rank 49</option>
<option id="rank-50" value="rank-50" class="attached enabled">Rank 50</option>
</select> </td>

I have no clue why this isn't working, the main possible issue I have found is that Select2 has no ID to call an item by, but I have made sure an ID gets generated by WooCommerce when loading the page.

I don't think Select2:select is firing but not sure why, as "selected" isn't changed on an item click.

How to send message from Website To Telegram APP

I have a share button in my website and I want to send a specific message to Telegram APP contacts (when I open website in Mobile)

The Problem is I didnt find the complete code and it just open the APP in the mobile

my code is :

<a href="tg://" id="telegram_share" class="mobileShare" title="inviteFriends" alt="telegram_share"></a>

as you see I didnt find proper command for sending message in href property

for example I found something simillar for adding sticker like :

<a class="tgme_action_button" href="tg://addstickers?set=Saber2">Add Stickers</a>

Semantic UI CSS right padding

I have this code for making a cards stackable box. The problem is that this box is showing me a right paddding in the fragment, can anyone help me?

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="./semantic/semantic.css"/>
    <title>Agora</title>
</head>
<body>
<div class="ui teal inverted menu" style="border-radius: 0px;">
    <div class="item">
        <div class="huge ui buttons">
        <div class="ui button">One</div>
        <div class="ui button">Two</div>
        <div class="ui button">Three</div>
    </div>
    </div>
    <div class="item">
        <div class="ui button">Log-in</div>
    </div>
</div>

<div class="ui column centered grid">
    <div class="fourteen wide column">
        <div class="ui center aligned segment">


            <div class="ui stackable four column centered grid" >
                <div class="column">
                    <div class="ui card">
                        <div class="image">
                            <img src="http://ift.tt/1GDSLzx">
                        </div>
                        <div class="content">
                            <a class="header">Stevie Feliciano</a>
                            <div class="meta">
                                <span class="date">Joined in 2014</span>
                            </div>
                            <div class="description">
                                Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
                            </div>
                        </div>
                        <div class="extra content">
                            <a>
                                <i class="user icon"></i>
                                22 Friends
                            </a>
                        </div>
                    </div>
                </div>
                <div class="column">
                    <div class="ui card">
                        <div class="image">
                            <img src="http://ift.tt/1GDSLzx">
                        </div>
                        <div class="content">
                            <a class="header">Stevie Feliciano</a>
                            <div class="meta">
                                <span class="date">Joined in 2014</span>
                            </div>
                            <div class="description">
                                Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
                            </div>
                        </div>
                        <div class="extra content">
                            <a>
                                <i class="user icon"></i>
                                22 Friends
                            </a>
                        </div>
                    </div>
                </div>
                <div class="column">
                    <div class="ui card">
                        <div class="image">
                            <img src="http://ift.tt/1GDSLzx">
                        </div>
                        <div class="content">
                            <a class="header">Stevie Feliciano</a>
                            <div class="meta">
                                <span class="date">Joined in 2014</span>
                            </div>
                            <div class="description">
                                Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
                            </div>
                        </div>
                        <div class="extra content">
                            <a>
                                <i class="user icon"></i>
                                22 Friends
                            </a>
                        </div>
                    </div>
                </div>
                <div class="column">
                    <div class="ui card">
                        <div class="image">
                            <img src="http://ift.tt/1GDSLzx">
                        </div>
                        <div class="content">
                            <a class="header">Stevie Feliciano</a>
                            <div class="meta">
                                <span class="date">Joined in 2014</span>
                            </div>
                            <div class="description">
                                Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
                            </div>
                        </div>
                        <div class="extra content">
                            <a>
                                <i class="user icon"></i>
                                22 Friends
                            </a>
                        </div>
                    </div>
                </div>
            </div>


        </div>
    </div>
</div>




</body>
</html>

This is the problem image: http://ift.tt/1eQiijm

I need to remove the padding that's in the right side.

Scrolling on iPad not working correctly, (Possibly Skrollr)

I have created a website from using a theme called BODO, however Scrolling does not seem to be working... I'm guessing it is an issue with Skrollr but I'm not completely sure, any help would be greatly appreciated!

http://ift.tt/1BLttUj

Nameservers vs URL Forwarding

I am using a website called freenom.com and have a domain name. I think I understand that "url forwarding" means whenever someone types in the domain name I own, they are redirected to a different URL. It seems like there is something else called "nameservers" which may or may not do the same thing. Can anyone clarify these two terms?

Click on checkbox inside a button element - Firefox issue

I wish to know the reason that why the below JS Fiddle works well in chrome but not In Firefox. Although nesting checkbox inside button might be wrong, But I'm only interest to know the theory behind working difference between chrome and firefox in context of my JS Fiddle.

JS Fiddle

$(function(){    
    $("button.tablesaw-sortable-btn").on("click",function(){        
        alert("button clicked");        
    });
    $("input#test").on("click",function(e){        
        e.stopPropagation();
    });
});

Scraping html with rvest - getting http error 416

I am trying to scrape the HTML of this page using R (package rvest), but am getting "client error 416: Requested Range Not Satisfiable"

After a long search, I can't seem to find a solution. It throws the error when trying to use rvest's html function, which parses an HTML page:

url <- "http://ift.tt/1GDQSmE"
html(url)

I am using R version 3.2.0.

Any help would be appreciated!

CSS selector not working in CakePHP when trying to style an image/div

I've recently installed CakePHP and this is my first time using it.

I'm creating a vertical navigation bar that will have a square logo on top. I need to be able to resize this logo. However, I cannot for the life of me seem to be able to select the corresponding div.

HTML

<nav>
    <div id="my-logo">
            <?= $this->Html->image("Company_Logo.png") ?>
    </div>
    <ul class="nav nav-pills nav-stacked span2">
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Services</a></li>
    </ul>
</nav>

CSS

#my-logo {
width: 256px;
height: 256px;
display: block;

}

In theory using a unique ID should work if all else fails, however, that isn't working either. I've also tried using a CSS class, descendants, etc.

When I inspect the image in a browser I find out that it's being controlled by base.css (I've been writing my CSS in cake.css, both files are included in the HTML page).

  img {
  display: inline-block;
  vertical-align: middle;
  }

I can modify this fine to resize the logo, so my conclusion is that it's over-writing my ID - but doesn't that go against the specificity principle of CSS?

I've searched to see if it's something to do with CakePHP, but haven't come up with answers.

What's going on here?

How do i ignore div which style = none with JSPDF

i have a situation,in which i have to ignore some divs, i'am using a JSPDF plugin, the idea is to get only some div(which are the result of user choices), JSPDF get the code frome html, so it get even the hidden divs.

this is my code, but it's not working, any help will be appreciated,

var doc = new jsPDF();

var specialElementHandlers = {

    '#editor': function (element, renderer) {

        return true;
    }

};


     $("div[style*='display:none']").remove();

    doc.fromHTML($('#resultat').html(),15, 15,{
        'width': 170,
            'elementHandlers': specialElementHandlers
    });




    doc.output("dataurlnewwindow");


<div id="resultatConflit" style="display:none">
                    &lt;label><b>Test de Conflit</b>&lt;/label>
                    <div id="TNeer" style="display:none">
                        &lt;label for="cnfl1">Test de Neer &lt;/label>
                        <div id="cnfl1"></div>
                    </div>
                    <div id="ADouloureux" style="display:none">
                        &lt;label for="cnfl2">Arc Douleureux &lt;/label>
                        <div id="cnfl2"></div>
                    </div>
                    <div id="Yowm" style="display:none">
                        &lt;label for="cnfl3">Yowm &lt;/label>
                        <div id="cnfl3"></div>
                    </div>
                    <div id="THKenedy" style="display:none">
                        &lt;label for="cnfl4">Test de Howkins-Kenedy &lt;/label>
                        <div id="cnfl4"></div>
                    </div>
                    <div id="CATest" style="display:none">
                        &lt;label for="cnfl5">Cross Abduction Test &lt;/label>
                        <div id="cnfl5"></div>
                    </div> .

Detecting back using window.history

Ok, I've looked around a bit, I'm trying to find a way to detect whether the back button has been pressed as I need to change a html element. So far I have the code.

function showMenu(){
$('#menuButtonsM').fadeIn();
window.location.hash = "menu";
}

This is one part of the script that changes the hash of the url allowing the back button to be utilised. Now I need to recognise when the back button has been pressed.

Any help would be greatly appreciated as I am a complete newbee, struggling to find my way.

submit button doesn't work in bootstrap

I am using bootstrap in my django webapp. I have the following base.html

<!DOCTYPE html>
<html lang="en">

<head>
    {% load static %}
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Kevin's Blog</title>

    <!-- Bootstrap Core CSS -->
    <link href="{% static 'blog/css/bootstrap.min.css' %}" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="{% static 'blog/css/clean-blog.min.css' %}" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="http://ift.tt/1oKzmdw" rel="stylesheet" type="text/css">
    <link href='http://ift.tt/1wq0kHF' rel='stylesheet' type='text/css'>
    <link href='http://ift.tt/1iYwcJN' rel='stylesheet' type='text/css'>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="http://ift.tt/1fK4qT1"></script>
        <script src="http://ift.tt/1knl5gY"></script>
    <![endif]-->

</head>

<body>

    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-custom navbar-fixed-top">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header page-scroll">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>

                {% if user.is_active %}
                    <span class="navbar-brand" href="{% url 'login' %}" style="font-size: 15px">{{user.username}}</span>
                    <a class="navbar-brand" href="/logout/" style="font-size: 15px">log out</a>
                {% else %}
                    <a class="navbar-brand" href="{% url 'login' %}" style="font-size: 15px">Login</a>
                    <a class="navbar-brand" href="{% url 'register' %}" style="font-size: 15px">Signup</a>
                {% endif %}


            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="{% url 'index' %}">Home</a>
                    </li>
                    <li>
                        <a href="{% url 'about' %}">About</a>
                    </li>
                    <li>
                        <a href="{% url 'post' %}">Post</a>
                    </li>
                    <li>
                        <a href="{% url 'project' %}">Project</a>
                    </li>
                    <li>
                        <a href="{% url 'contact' %}">Contact</a>
                    </li>
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container -->
    </nav>

    {% block content %}
    {% endblock content %}

        <!-- Footer -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <ul class="list-inline text-center">
                        <li>
                            <a href="http://ift.tt/1GDQUuK">
                                <span class="fa-stack fa-lg">
                                    <i class="fa fa-circle fa-stack-2x"></i>
                                    <i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="http://ift.tt/1GDQSmr">
                                <span class="fa-stack fa-lg">
                                    <i class="fa fa-circle fa-stack-2x"></i>
                                    <i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="http://ift.tt/1eQfMcO">
                                <span class="fa-stack fa-lg">
                                    <i class="fa fa-circle fa-stack-2x"></i>
                                    <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                                </span>
                            </a>
                        </li>
                    </ul>
                    <p class="copyright text-muted">Copyright &copy; Kevin's Website 2015</p>
                </div>
            </div>
        </div>
    </footer>

    <!-- jQuery -->
    <script src="{% static 'blog/js/jquery.js' %}"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="{% static 'blog/js/bootstrap.min.js' %}"></script>

    <!-- Custom Theme JavaScript -->
    <script src="{% static 'blog/js/clean-blog.min.js' %}"></script>

</body>

</html>

Now I want to create a login page (extends the base.html)

{% extends 'base.html' %}

{% block content %}

<div class="container"> 

<div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">                    
    <div class="panel panel-info" >
            <div class="panel-heading">
                <div class="panel-title">Sign In</div>
                <div style="float:right; font-size: 80%; position: relative; top:-10px"><a href="#">Forgot password?</a></div>
            </div>     

            <div style="padding-top:30px" class="panel-body" >

                <div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>



                <form action="/auth/" id="loginform" class="form-horizontal" role="form" method="post">
                {% csrf_token %}

                    <div style="margin-bottom: 25px" class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                                <input id="username" type="text" class="form-control" name="username" value="" placeholder="username or email">                                        
                    </div>

                    <div style="margin-bottom: 25px" class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                                <input id="login-password" type="password" class="form-control" name="password" placeholder="password">
                    </div>



                    <div class="input-group">
                        <div class="checkbox">
                            <label>
                                <input id="login-remember" type="checkbox" name="remember" value="1"> Remember me
                            </label>
                        </div>
                    </div>


                        <div style="margin-top:10px" class="form-group">
                            <!-- Button -->
                            <div class="col-sm-12 controls">
                              <input type="submit" id="btn-login" class="btn btn-success" value="login" />
                              <a id="btn-fblogin" href="#" class="btn btn-primary">Login with Facebook</a>
                            </div>
                        </div>


                        <div class="form-group">
                            <div class="col-md-12 control">
                                <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
                                    Don't have an account! 
                                <a href="#" onClick="$('#loginbox').hide(); $('#signupbox').show()">
                                    Sign Up Here
                                </a>
                                </div>
                            </div>
                        </div>    
                    </form>     



                </div>                     
            </div>  
</div>
</div>
{% endblock %}

The login submit button doesn't work, but if I remove the base.html(will lose css...), then it will be fine. I'm working on this three hrs, can anyone help with that? Thanks in advance!

How to change the value of a HTML Element using a bookmark with JS?

I'm not very familiar with JS and I was wondering how I could edit an element of a website using a JS Bookmark or page (One that starts like this: "javascript:")

I was trying to change the value of 58 in the following code:

<span class="rbx-text-navbar-right" id="nav-robux-amount">58</span>

Yet I had no luck, as I had used different information from different sites.

Could someone please help me? If I'm not being specific enough, please tell me.

function to create buttons receiving "text" and "onclick function" by parameter

I want to do what I said in the title. I tried this:

function createButton(func, text){
    var butt = document.createElement('BUTTON');
    var btTxt = document.createTextNode(text);
    btTxt.style.color = '#006633';
    btTxt.style.fontWeight = 'bold';
    butt.onclick = func;
    butt.appendChild(btTxt);
    butt.style.margin = '5px';
    document.body.appendChild(butt);
}

And this:

createButton(doSomething, click to do something);

But it doesn't work :/

Anyone?

CSS unordered list indent space to the left and right

Basically I have navigation bar inside my "main" div, and its indented to the left.

enter image description here

I cannot figure out where does this indentation come from, I tried padding/margin 0, padding-left/margin-left 0 but still nothing, It won't move even one inch!

I even tried mozilla firebug inspector to try to find out if I selected it right, basically no solution.

And here is html/css file if someone would have time to take a sneaky-beaky onto HTML code:

body {
  background-color: #000;
  color: white;
}

/* Style for tabs */
#main {
  color: 111;
  width: 600px;
  margin: 8px auto;
}

#main > li, #main > ul > li
{ list-style:none; float:left; }

#main ul a {
  display:block;
  padding:6px 10px;
  text-decoration:none!important;
  margin:1px 1px 1px 0;
  color:#FFF;
  background:#444;
}

#main ul a:hover {
  color:#FFF;
  background:#111;
}

#main ul a.selected {
  margin-bottom:0;
  color:#000;
  background:snow;
  border-bottom:1px solid snow;
  cursor:default;
}

#main div {
  padding:10px 10px 8px 10px;
  *padding-top:3px;
  *margin-top:-15px;
  clear:left;
  background:snow;
  height: 300px ;
}

#main div a {
  color:#000; font-weight:bold;
}
#male, #female, #all, #new {
  color: black;
}
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>2015 Race Finishers</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="my_style.css">
  </head>
  <body>
    <header>
      <h2>2015 Race Finishers</h2>
    </header>
    <div id="main">
      <ul class="idTabs">
        <li><a href="#male">Male Finishers</a></li>
        <li><a href="#female">Female Finishers</a></li>
        <li><a href="#all">All Finishers</a></li>
        <li><a href="#new">Add New Finishers</a></li>
      </ul>
      <div id="male">
        <h4>Male Finishers</h4>
        <ul id="finishers_m"></ul>
      </div>
      <div id="female">
        <h4>Female Finishers</h4>
        <ul id="finishers_f"></ul>
      </div>
      <div id="all">
        <h4>All Finishers</h4>
        <ul id="finishers_all"></ul>
      </div>
      <div id="new">
        <h4>Add New Finisher</h4>
        <form id="addRunner" name="addRunner" action="service.php" method="POST">
          First Name: <input type="text" name="txtFirstName" id="txtFirstName" /> <br>
          Last Name: <input type="text" name="txtLastName" id="txtLastName" /> <br>
          Gender: <select id="ddlGender" name="ddlGender">
          <option value="">--Please Select--</option>
          <option value="f">Female</option>
          <option value="m">Male</option>
          </select><br>
          Finish Time:
          <input type="text" name="txtMinutes" id="txtMinutes" size="10" maxlength="2" />(Minutes)
          <input type="text" name="txtSeconds" id="txtSeconds" size="10" maxlength="2" />(Seconds)
          <br><br>
          <button type="submit" name="btnSave" id="btnSave">Add Runner</button>
          <input type="hidden" name="action" value="addRunner" id="action">
        </form>
      </div>

    </div>
    <footer>
      <h4>Congratulations to all our finishers!</h4>
      <br>Last Updated: <div id="updatedTime"></div>
    </footer>
    <script src="scripts/jquery-1.6.2.min.js"></script>
    <script src="scripts/my_scripts.js"></script>
    <script src="scripts/jquery.idTabs.min.js"></script>
  </body>
</html>

This is just for learning purpose, but I would really love if I could somehow solve this problem, biggest thing is that I have no clue where does it come from.

fadein() not triggering but everything else is

I have this small snippet that triggers when I use socket.io:

socket.on('wheelspin', function (random) {
    var img = document.querySelector('img');
    $("img").fadeIn();
    console.log('wheelspin!!!');
    console.log('fadeIn');

        img.removeAttribute('style');
        var deg  = 0; 

        console.log('deg = ' + deg);
        console.log('Number = ' + random);
        if(random == 0) {var deg = 15; var css = '-webkit-transform: rotate(' + deg + 'deg);'; }
        img.setAttribute('style', css);
}

Whenever I run this, the webpage console displays the console.logs but it doesn't do the fadeIn. If I do the following outside the socket trigger it works:

$( document ).ready(function() {
    $("img").fadeIn();
 });

Any advice?

Thanks

How can i pass the file loaded using fileopen dialog in ajax request

I am opening an image from fileopen dialog using jquery. I want send the ajax request to a php page to upload the image to database. How can i do it. I am using the following code to open the image

$("#imgup").on("click",function(){
                $('#imgfile').trigger('click');
                var data=$("#imgfile").val();
            });

And here is my code that is the place where the input dialog is present

<div id="profilepic">
                <img id="profileimg" src="getImage.php" width="100" height="100"/>
                <p style="margin-top: -20px;" id="imgchng"><a id="imgup" href="#">Change Image</a></p>
                <input id="imgfile" type="file"/>
            </div>

Can anyone help? Thanks in advance

Option values in dropdown select tag

I have two drop down select tags in one page.

The first dropdown box is called "states" and based off of what state is chosen...

The second dropdown will show the colleges in that state by having the same "VALUE"

What I am trying to do is to have a link based off of the college chosen:

  • is it possible to create another value to have a link for the college chosen? or is there another way to have create a link?

Why is it so hard to center divs in HTML?

Why does this code not center all three elements inside the outer div?

.center {
  margin-left: auto;
  margin-right: auto;
  width: 70%;
}
<div class="center">
  <!-- container -->
  <h1 class="center">Headline</h1>

  <div class="center"><span>Some text</span></div>

  <form class="center">
    <button>Button</button>
  </form>
</div>

How can I do this, without specifying absolute values? Why is it so hard to center divs in HTML with hacks like margin-left: auto; and margin-right: auto;?

Edit: I added a span to the second inner div.

hey i have some error what don't know how to solve it! i want to make a student information website

hey i have some error what don't know how to solve it! i want to make a student information website. i have view.php page & edit.php . when i edit a student details i find a lot of error! can anyone help me to solve this asap? my codeing page and error imge given bellow: ! Error:enter image description here

View.php page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ift.tt/kkyg93">
<html xmlns="http://ift.tt/lH0Osb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Viewing The Records</title>
</head>
<body>
<a href="user_registration.php">Insert New Record</a>
<a href="logout.php">Logout</a>
<table align="center" width="1000px" border="2px">
<tr>
<td align="center" bgcolor="#FFFF00" colspan="20"><h1>Viewing All The Records</h1></td>
</tr>
<tr align="center">
<th>Serial No:</th>
<th>Student Name:</th>
<th>Father's Name:</th>
<th>Mother's Name:</th>
<th>Roll No:</th>
<th>Delete</th>
<th>Edit</th>
<th>Details</th>
</tr>
<?php
define("DB_SERVER","localhost");
define("DB_USER","root");
define("DB_PASS","");
define("DB_NAME","students");
$connection= mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
//Connection Varification................................................................
if(mysqli_connect_errno()){
die("Database connection failed".mysqli_connect_error()."(".mysqli_connect_errno().")");
}
$sql = "SELECT * FROM u_reg ORDER BY 1 DESC";
$result = mysqli_query($connection, $sql);
$i= 1;
while($row= mysqli_fetch_array($result)){
$u_id = $row["u_id"];
$u_student = $row[1];
$u_father = $row[2];
$u_mother = $row[3];
$u_roll = $row[6];
?>
<tr align="center">
<td><?php echo $i; $i++;?></td>
<td><?php echo $u_student;?></td>
<td><?php echo $u_father;?></td>
<td><?php echo $u_mother;?></td>
<td><?php echo $u_roll;?></td>
<td><a href="delete.php?del=<?php echo $u_id;?>" >Delete</a></td>
<td><a href="edit.php?edit=<?php echo $u_id;?>">Edit</a></td>
<td><a href="details.php?details=<?php echo $u_id;?>" >Details</a></td>
</tr>
<?php } ?>
</table><br /><br /><br /><br /><br /><br /><br />
<form action="view.php" method="get">
Search Student: <input type="text" name="search" />
<input type="submit" name="submit" value="Find Now" />
</form>
<br /> <br /> <br /><br />
<?php
$output = "";
if(isset($_GET["search"])){
$search_record = $_GET["search"];
$query= "SELECT * FROM u_reg WHERE u_student= '$search_record' OR u_father= '$search_record'";
$count = mysqli_query($connection, $query);
if($count == false){
$output = "There is no search result !";
}
else{
while($rowon = mysqli_fetch_array($count)){
$student_name2 = $rowon[1];
$father_name2 = $rowon[2];
$mother_name2 = $rowon[3];
$school_name2 = $rowon[4];
$gender2 = $rowon[5];
$roll2 = $rowon[6];
$student_class2 = $rowon[7];
?>
<table width="800px" bgcolor="#FFFF00" align="center" border="1">
<tr align="center">
<td><?php echo $student_name2;?></td>
<td><?php echo $father_name2;?></td>
<td><?php echo $mother_name2;?></td>
<td><?php echo $school_name2;?></td>
<td><?php echo $gender2;?></td>
<td><?php echo $roll2;?></td>
<td><?php echo $student_class2;?></td>
</tr>
</table>
<?php }}}?>
<?php        mysqli_close($connection); ?>
</body>
</html>

edit.php page:

<?php 
function redirect_to($location){
header("Location: ".$location);
exit;
}?>
<?php
define("DB_SERVER","localhost");
define("DB_USER","root");
define("DB_PASS","");
define("DB_NAME","students");
$connection= mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
//Connection Varification................................................................
if(mysqli_connect_errno()){
die("Database connection failed".mysqli_connect_error()."(".mysqli_connect_errno().")");
}
$edit_record =$_GET["edit"];
$query= "SELECT * FROM u_reg WHERE u_id = '$edit_record'";
$result = mysqli_query($connection, $query);
while($row = mysqli_fetch_array($result)){
$edit_id = $row["u_id"];
$s_name = $row[1];
$s_father = $row[2];
$s_mother = $row[3];
$s_school = $row[4];
$s_gender = $row[5];
$S_roll = $row[6];
$s_class = $row[7];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ift.tt/kkyg93">
<html xmlns="http://ift.tt/lH0Osb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="style.css" />
<title>Updating Student's Record</title>
</head>
<body>
<div id="student_container">
<h2>Record Updating FORM</h2>
<form action="edit.php?edit_form=<?php echo $edit_id;?>" method="post" enctype="multipart/form-data">
<table border="0px" width="1100px" align="center">
<tr align="right">
<td bgcolor="#FFFF00"> Student Registration Form</td>
</tr>
<tr>
<td width="50px" align="right">Student Name:</td>
<td><input type="text" name="student_name1" size="52px"  value="<?php echo $s_name; ?>"/></td>
</tr>
<tr>
<td width="50px" align="right">Father's Name:</td>
<td><input type="text" name="fathers_name1" size="52px"  value="<?php echo $s_father ;?>"/></td>
</tr>
<tr>
<td width="50px" align="right">Mother's Name:</td>
<td><input type="text" name="mother_name1" size="52px"  value="<?php echo $s_mother; ?>"/></td>
</tr>
<tr>
<td width="50px" align="right">School Name:</td>
<td><input type="date" name="school_name1" size="20px" value="<?php echo $s_school;?>"/></td>
</tr>
<tr>
<td width="50px" align="right">Gender:</td>
<td>
<input type="radio" name="gender1" value="<?php echo $s_gender;?>"> Male
<input type="radio" name="gender1" value="<?php echo $s_gender;?>"> Female
</td>
</tr>
<tr>
<td></td>
<td width="50px">Class & Batch Details</td>
</tr>
<tr>
<td width="50px" align="right">Roll:</td>
<td><input type="text" name="roll1" size="12px" value="<?php echo $S_roll;?>"/></td>
</tr>
<tr>
<td width="50px" align="right">Class:</td>
<td>
<select name="student_class1">
<option value="<?php echo $s_class;?>"<?php echo $s_class;?>/>Select Class</option>
<option value="six">SIX</option>
<option value="seven">SEVEN</option>
<option value="eight">EIGHT</option>
<option value="nine">NINE</option>
<option value="ten">TEN</option>
</select>
</td>
</tr>
<tr>
<td width="50px" align="center"></td>
<td><input type="submit" name="update" value="UPDATE" /></td>
</tr>
</table>
</form>
</div><!-----------student_container----->
</body>
</html>
<?php
if(isset($_GET["update"])){
$edit_record1= $_GET["edit_form"];
$student_name1= $_POST["student_name1"];
$fathers_name1= $_POST["fathers_name1"];
$mother_name1= $_POST["mother_name1"];
$school_name1= $_POST["school_name1"];
$gender1= $_POST["gender1"];
$roll1= $_POST["roll1"];
$student_class1= $_POST["student_class1"];
$query1= "UPDATE u_reg SET u_student = '$student_name1', u_father= '$fathers_name1', u_mother = '$mother_name1', u_school = '$school_name1', u_gender = '$gender1', u_roll ='$roll1', u_class ='$student_class1' WHERE u_id = '{$edit_record1}' ";
$result1= mysqli_query($connection, $query1);
if($result1){
echo redirect_to("view.php?updated=Record Has Been Successfully Updated!");
}
}               
?>

Dynamic Select Choice using jquery

I have two choice boxes as follows,

<select name="first" id="first">
   <option value="0">First</option>
   <option value="1">Second</option>
   <option value="2">Third</option>
   <option value="3">Fourth</option>
   <option value="4">Five</option>
   <option value="5">Six</option>
   <option value="6">Seven</option>
</select>

Second Select box :

<select name="first" id="first">
   <option value="0">First</option>
   <option value="1">Second</option>
   <option value="2">Third</option>
   <option value="3">Fourth</option>
   <option value="4">Five</option>
   <option value="5">Six</option>
   <option value="6">Seven</option>
</select>

Now when I select "First" in first select box at that time I should not able to select First choice in second select box. If I select second in first choice then I should not able to select 1st and second from second list box, if third then I should not able to select first, second and third. So on.. How can I do it ?

Thanks!

Javascript click button1

Hi i have the following html code, and i'm truing to make a javascript to click on this button

<fieldset class="fields1"></fieldset>
<fieldset class="submit-buttons">
<some other button here >
<input class="button1" type="submit" value="Submit" name="post" tabindex="4" accesskey="f"></input>

What i already tried is the following options,

$(".submit-buttons").children('input[name="post"]').click();

doesn't work

and this way also, and this doesn't work neither

$("input[name=post]").click();

Is there any other way to click the button1, or is any way i can select tabindex4 or accesskey f, as these are values that wont change?, the problem is that i don't have any id button.

Thanks

CSS animation not working on mobile

I have this code and it works on my pc browser, and galaxy note 4 phone. It animates a svg element. But when I test on a Moto X phone chrome browser, it does not work. Does anyone know why? I tried to put in all the prefix tags.

@keyframes example {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  25% {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
  }
  50% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  75% {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
  }
  100% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }
}
#left_leg_group {
  animation: example 1s linear infinite;
  /* and here*/
  animation-timing-function: ease-in-out;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-transform-origin: 50% -10%;
  -moz-transform-origin: 50% -10%;
  -ms-transform-origin: 50% -10%;
  -o-transform-origin: 50% -10%;
  transform-origin: 50% -10%;
}
#right_leg_group {
  animation: example 1s linear infinite;
  /* and here*/
  animation-timing-function: ease-in-out;
  animation-delay: 0.1s;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-transform-origin: 50% -10%;
  -moz-transform-origin: 50% -10%;
  -ms-transform-origin: 50% -10%;
  -o-transform-origin: 50% -10%;
  transform-origin: 50% -10%;
}
<svg version="1.1" xmlns="http://ift.tt/nvqhV5" xmlns:xlink="http://ift.tt/PGV9lw" x="0px" y="0px" width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve">
  <g id="main">
    <g id="left_leg_group">
      <rect id="left_1" x="81" y="129" fill="#653508" width="17" height="40" />
      <rect x="81" y="141" fill="#3B2111" width="17" height="5" />
      <path id="foot" fill="#A07044" d="M98,180H75c0,0-4.875-0.021-4.875-5.625S75,169,75,169h23V180z" />
    </g>
    <g id="torso_group">
      <path fill="#653508" d="M138,141H63V65.021c0,0-1.751-29.521,37.167-29.521S138,65.021,138,65.021V141z" />
    </g>
    <g id="right_leg_group">
      <rect id="Left_3_" x="109" y="129" fill="#653508" width="17" height="40" />
      <rect x="109" y="141" fill="#3B2111" width="17" height="5" />
      <path id="foot_1_" fill="#AE7A49" d="M126,180h-23c0,0-4.875-0.021-4.875-5.625S103,169,103,169h23V180z" />
    </g>
    <g id="right_arm_group">
      <path fill="#653508" d="M138,73.21c0,0-13,0.123-13,4.957s13,5.824,13,5.824c1,0.01,0.725,0.01,1.005,0.01
                                        c17.58,0,31.747-14.25,31.747-31.83c0-17.19-13.752-31.2-30.752-31.81v11.43c10,1.98,19.67,10.43,19.67,20.55
                                        C159.67,63.15,149,72.05,138,73.21z" />
      <path fill="#AE7A49" d="M133.33,25.75c0,5.25,4.835,5.72,4.835,5.72c0.67,0.07,1.835,0.18,1.835,0.32V20.36
                                        c0-0.01-0.605-0.02-0.995-0.02c-0.28,0-0.478,0-0.757,0.01C138.248,20.35,133.33,20.5,133.33,25.75z" />
    </g>
    <g id="left_arm_group">
      <path fill="#653508" d="M41.206,52.34C41.206,42.22,51,33.77,61,31.79V20.36c-17,0.61-30.876,14.62-30.876,31.81
                                        C30.124,69.75,44.229,84,61.809,84c0.281,0-0.025,0,0.975-0.01c0,0,12.984-0.99,12.984-5.824c0-4.833-12.946-4.956-12.946-4.956
                                        C51.821,72.05,41.206,63.15,41.206,52.34z" />
      <path fill="#AE7A49" d="M67.422,25.75c0,5.25-4.711,5.72-4.711,5.72C62.041,31.54,61,31.65,61,31.79V20.36
                                        c0-0.01,0.481-0.02,0.871-0.02c0.28,0,0.416,0,0.695,0.01C62.566,20.35,67.422,20.5,67.422,25.75z" />
    </g>
    <g id="head_group">
      <circle id="face" fill="#AE7A49" cx="95.207" cy="70.543" r="28.042" />
      <path id="Right_Eye" fill="#200200" d="M82.25,65h-2.37c0-1.31-1.07-2.38-2.38-2.38s-2.38,1.07-2.38,2.38h-2.37
                                c0-2.62,2.13-4.75,4.75-4.75S82.25,62.38,82.25,65z" />
      <path id="left_eye_1" fill="#200200" d="M106.25,65h-2.37c0-1.31-1.069-2.38-2.38-2.38c-1.31,0-2.38,1.07-2.38,2.38h-2.37
                                c0-2.62,2.13-4.75,4.75-4.75S106.25,62.38,106.25,65z" />
      <circle id="mouth" fill="#200200" cx="89.104" cy="70.938" r="5.271" />
      <polygon id="forehead" fill="#915B36" points="104,51 81,51 81.688,49 103.312,49        " />
      <polygon id="forehead_1" fill="#915B36" points="110,56 76,56 76.75,54 109.125,54       " />
    </g>
  </g>
</svg>

Validation Message on HTML form

I want to validate each field of a HTML form onblur. The validation message gets displayed but it doesn't use the complete horizontal space of the box. I want it to be something like this.

Customer Name: TextBox *Customer Name Must Not Be Blank

But it displays:

 Customer Name: TextBox *Customer 
                         Name Must
                         Not Be
                         Blank

This is my Code:

<form  method="post" name="customer" action="newcustcheck.php" onblur="return Validate()" onKeyUp="return Validate()">
    <table width="300">
        <tr>
            <td>Customer Name:</td>
            <td><input type="text" name="name" ></td>
            <td> <label class="message" id="message" ></td>
        </tr>

CSS

form {
width: 400px;
background:#FFD700;
color: #000000;
font: small Verdana, sans-serif;
position: absolute;
top: 200px;
left: 550px;}

.message{color:#FF0000;
font-size: small;
font-weight: bold;  }

JavaScript

if(x==null || x==""){
    document.getElementById('message').style.visibility="visible";
    document.getElementById('message').innerHTML="Customer Name must not be blank";

}
else{
    document.getElementById('message').style.visibility="hidden";
    }

How to Decode Html in controller

Hi i have htmlencoded content, now i want convert it into string..

\u003cmeta charset=\"\u0026amp;quot;utf-8\u0026quot;\u0026amp;quot;\" content=\"\u0026amp;quot;\u0026quot;text/html;\u0026amp;quot;\" http-equiv=\"\u0026amp;quot;\u0026quot;Content-Type\u0026quot;\u0026amp;quot;\" /\u003e\u003cmeta

I want to convert this content into readable string...

i have try to use this

string javascriptencode = HttpUtility.JavaScriptStringEncode(document.Document);
            string html = HttpUtility.HtmlAttributeEncode(javascriptencode);

           string s = HttpUtility.HtmlEncode(html);

now if i want to show this on razor page then there is @html.Raw(""); can use but i want to do this on controller side, so how can i use @html.Raw("") alternative in controller..

please give some idea...

Thank you in advance Regards,

Do I create a custom theme or modify css in a genesis child theme?

I've just got started with Wordpress and it was suggested to use a child theme so I purchased the Magazine Pro theme. This has got the perfect layout for my needs but I find some of the padding is too intense and in particular when I have a leaderboard banner at the top my text for my blog title is wrapping.

I want to reduce my title text and reduce the padding. I know how to do that, I've got plenty of experience in front end dev but I just don't know if I should create a child theme (or grandchild theme) based off Magazine Pro or whether I should modify the css file directly in my Magazine Pro css file? What I'm worried about it overwriting my changes by any updates to the child theme.

What's the best course of action here, I'm really keen to get cracking on some content but my site looks a bit crap with the header text wrapping.

Using sketch.js I want to download more of the produced data

When I press the download key on it does not download the quote that is present. Is there a way to change this? I tried playing around with the "data-" tag but can get nothing to work.

Here is the code

<title>SNUGGLETOOTH</title>

<body>

    <nav>

        <div id="SketchTools">
    <!-- Basic tools -->
    <a href="#SketchPad" data-color="#000000" title="Black"><img src="img/black_icon.png" alt="Black"/></a>
    <a href="#SketchPad" data-color="#ff0000" title="Red"><img src="img/red_icon.png" alt="Red"/></a>
    <a href="#SketchPad" data-color="#00ff00" title="Green"><img src="img/green_icon.png" alt="Green"/></a>
    <a href="#SketchPad" data-color="#0000ff" title="Blue"><img src="img/blue_icon.png" alt="Blue"/></a>
    <a href="#SketchPad" data-color="#ffff00" title="Yellow"><img src="img/yellow_icon.png" alt="Yellow"/></a>
    <a href="#SketchPad" data-color="#00ffff" title="Cyan"><img src="img/cyan_icon.png" alt="Cyan"/></a>

    <!-- Advanced colors -->
    <a href="#SketchPad" data-color="#e74c3c" title="Alizarin"><img src="img/alizarin_icon.png" alt="Alizarin"/></a>
    <a href="#SketchPad" data-color="#c0392b" title="Pomegrante"><img src="img/pomegrante_icon.png" alt="Pomegrante"/></a>
    <a href="#SketchPad" data-color="#2ecc71" title="Emerald"><img src="img/emerald_icon.png" alt="Emerald"/></a>
    <a href="#SketchPad" data-color="#1abc9c" title="Torquoise"><img src="img/torquoise_icon.png" alt="Torquoise"/></a>
    <a href="#SketchPad" data-color="#3498db" title="Peter River"><img src="img/peterriver_icon.png" alt="Peter River"/></a>
    <a href="#SketchPad" data-color="#9b59b6" title="Amethyst"><img src="img/amethyst_icon.png" alt="Amethyst"/></a>
    <a href="#SketchPad" data-color="#f1c40f" title="Sun Flower"><img src="img/sunflower_icon.png" alt="Sun Flower"/></a>
    <a href="#SketchPad" data-color="#f39c12" title="Orange"><img src="img/orange_icon.png" alt="Orange"/></a>

    <a href="#SketchPad" data-color="#ecf0f1" title="Clouds"><img src="img/clouds_icon.png" alt="Clouds"/></a>
    <a href="#SketchPad" data-color="#bdc3c7" title="Silver"><img src="img/silver_icon.png" alt="Silver"/></a>
    <a href="#SketchPad" data-color="#7f8c8d" title="Asbestos"><img src="img/asbestos_icon.png" alt="Asbestos"/></a>
    <a href="#SketchPad" data-color="#34495e" title="Wet Asphalt"><img src="img/wetasphalt_icon.png" alt="Wet Asphalt"/></a>
   </br> <a href="#SketchPad" data-color="#ffffff" title="Eraser"><img src="img/eraser_icon.png" alt="Eraser"/></a>

    <!-- Size options -->
    <a href="#SketchPad" data-size="1"><img src="img/pencil_icon.png" alt="Pencil"/></a>
    <a href="#SketchPad" data-size="3"><img src="img/pen_icon.png" alt="Pen"/></a>
    <a href="#SketchPad" data-size="5"><img src="img/stick_icon.png" alt="Stick"/></a>
    <a href="#SketchPad" data-size="9"><img src="img/smallbrush_icon.png" alt="Small brush"/></a>
    <a href="#SketchPad" data-size="15"><img src="img/mediumbrush_icon.png" alt="Medium brush"/></a>
    <a href="#SketchPad" data-size="50"><img src="img/bigbrush_icon.png" alt="Big brush"/></a>
    <a href="#SketchPad" data-size="90"><img src="img/bucket_icon.png" alt="Huge bucket"/></a>

    <a href="#SketchPad" data-download='png' id="DownloadPng">Download</a>
    <br/>
  </div>
        <div class="links">
        <ul>
            <li><img src="ficon.png" alt="Facebook"></li>
            <li><img src="igramicon.png" alt="Instagram"></li>
            <li><img src="picon.png" alt="Pinterest"></li>
            <li><img src="mcicon.png" alt="Mixcloud"></li>
            <li><img src="twicon.png" alt="Twitter"></li>
        </ul>
    </div>

    <div class="message">

        <div data id="quote"></div>
  <script>
    (function() {
      var quotes = [
        { text: "Snuggletooth likes pancakes"},
        { text: "Would you like Snuggletooth to tuck you in?"},
        { text: " Snuggletooth loves you"},
        { text: "Snuggletooth is here for you"},
        { text: "Did you know that Snuggletooth </br>can be in 2 places at once?"},
        { text: "Heyyyy!<br> I was just thinking about you </br>Love Snuggletooth" },
        { text: "Wanna Sandwich??</br>xSnuggletooth"},
        { text: "Want some breakfast???</br> ;) Snuggletooth"},
        { text: "Snuggletooth-a-riffic!!!"},    
        { text: "Snuggletooth makes great popcorn!"},
        { text: "Come over to Snuggletooth's! He makes a great guacamole!"},
        { text: "Snuggletooth likes his bubblebaths to smell like bubblegum"},
        { text: "Snuggletooth wants to know what are you up to later?"},
        { text: "Snuggletooth-a-licious!!!"},
      ];
      var quote = quotes[Math.floor(Math.random() * quotes.length)];
      document.getElementById("quote").innerHTML =
        '<p>' + quote.text + '</p>' +
        '' +  '';
    })();
  </script>

    </div>
    </nav>
    <canvas id="SketchPad" width="1125" height="600">

    </canvas>
  </div>
  <script type="text/javascript">
    $(function() {
      $('#SketchPad').sketch();
    });
  </script>

How to display HTML page using BrightScript

I would like to display a single HTML web page on a Roku channel. I have no need to follow hyperlinks, but the page does have periodic updates.

Is it possible to write a BrightScript application that uses Gecko to render the page, or would I have to draw the page myself?

I see plenty of information as well as examples in the Roku SDK that describe how to provide user navigation and play video on a Roku box using BrightScript, but I can't find any information about displaying a single HTML page on a Roku channel.

Floated elements 100% height dynamic wrapper

I have 2 columns within a wrapper. One column is taller than the other. I would like the shorter column given a height of 100% so that it matches the taller column. All heights are dynamic so can not be defined in pixels.

DEMO http://ift.tt/1fS3d0T

<div class="wrapper">
    <div class="col1"> short column // not much content </div>
    <div class="col2"> tall columns // lots of content </div>
</div>

You will see in the example the red column is taller than the blue column. How do i set the blue column to 100% height of the wrapper.

I know I can easily do this by defining a height, this isn't an option. I can also do this if I use tables for layout, which I do not want to do. I can also do this by using javascript to get the height from the tall column and then set the height of the smaller column. I would like a CSS only approach though. Thanks.

HTML To PDF Input

Is it possible to use html to submit information to a pdf file? So that the information input by the html document fills in the fields on the pdf file.

Also is there a signature plugin that I can use to have a customer sign and have it put that in the pdf file signature field as well?

Thanks in advanced! ~ Kevin Grout

Why browser does so weird moves line?

example

.table{
    width: 500px;
}
.table td{
    vertical-align: middle:
}
.logo{
    vertical-align: middle;
    display: inline-block;
}
<table class="table" border="1">
    <tr>
        <td>
            <span class="logo">
                <img src="http://ift.tt/1LC1QR0" alt="" />
            </span>
            <span>Ололо лололо олололо лололо лолололо лололлололл лолололлл оллолло лоллогллол лололо</span>
        </td>
    </tr>
</table>

Why is the first line posted normally, and the other at the bottom? I tried different "display", "float" and "clear" attributes but nothing happened

Scrolling circle bars on the right side?

I am trying to create a scrolling circles that navigates each section of my page like this: http://goo.gl/kAhj8J

However for some reason I don't how to start it with jQuery.

Here's my Markup:

<section class="background-fixed img-1" >
        <div class="main-content">
            <h2>Title here</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem dolor beatae, laudantium eos fugiat, deserunt delectus quibusdam quae placeat, tempora ea? Nulla ducimus, magnam sunt repellendus modi, ad ipsam est.</p>
        </div>
    </section>

    <section class="background-fixed img-2">
        <div class="main-content">
            <h2>Title here</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem dolor beatae, laudantium eos fugiat, deserunt delectus quibusdam quae placeat, tempora ea? Nulla ducimus, magnam sunt repellendus modi, ad ipsam est.</p>
        </div>
    </section>

    <section class="background-fixed img-3">
        <div class="main-content">
            <h2>Title here</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem dolor beatae, laudantium eos fugiat, deserunt delectus quibusdam quae placeat, tempora ea? Nulla ducimus, magnam sunt repellendus modi, ad ipsam est.</p>
        </div>
    </section>

    <section class="background-fixed img-4">
        <div class="main-content">
            <h2>Title here</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem dolor beatae, laudantium eos fugiat, deserunt delectus quibusdam quae placeat, tempora ea? Nulla ducimus, magnam sunt repellendus modi, ad ipsam est.</p>
        </div>

Here's the JSFIDDLE: http://ift.tt/1BLiQRn

Any ideas?

jQuery - object dissapears as soon as I put it in another page

Couldn't find about this problem, I guess it's not really a problem, just I don't know how to it. On the event of click on a certain div, I want to open it a new tab. I managed to do it in the following code, but what happens is the original div disappears from the original page and is showed only in the new tab, I'm not quite sure why this is happening, but I though about cloning the object - but wasn't successful.

This is the relevant code: open new tab on click:

$(document).on("click", ".button", function(){
    window.toSend = $(this);   
    window.newTab = window.open("test.html", "_blank");  

add the object to the new tab:

var data = parent.window.opener.toSend;
    $(".clickedButton").html(data);

Any solutions? or first, why is this even happening? thanks!

Using Javascript to update hidden form fields with an image file name on seperate form pages

I have a customized Django wizard_form.html which shows the user 3 different images on three different pages of my survey.

I am trying to use the below script to update 3 hidden form fields on 3 different pages with the contents of value="{{display_image}}" as a way of storing the filename of the images shown to the user in the Database

This works fine for the first page/image e.g.

<input id="id_9-slider_one_image" name="9-slider_one_image" type="hidden" value="P1D1.jpg"/>

But I cant seem to get it working on the second or third

<input id="id_10-slider_two_image" name="10-slider_two_image" type="hidden" />

Can anyone tell me what I am doing wrong?

My Code

{% if wizard.steps.current in steps %}      

<div class="image_rating">      
    <img src="{% static "survey/images/pathone/" %}{{display_image}}" 
         value="{{display_image}}" onload="updateInput1(this); updateInput2(this); updateInput3(this);"/>                                                                                   
</div>  



<script type="text/javascript">
    function updateInput1(ish) {
    var valueAttribute = ish.getAttribute("value");
    document.getElementById("id_9-slider_one_image").setAttribute(
    "value", valueAttribute)
}

function updateInput2(ish) {
    var valueAttribute = ish.getAttribute("value");
    document.getElementById("id_10-slider_two_image").setAttribute(
    "value", valueAttribute)
}

function updateInput3(ish) {
    var valueAttribute = ish.getAttribute("value");
    document.getElementById("id_11-slider_three_image").setAttribute(
    "value", valueAttribute)
}

</script>

Any helps is as always, much appreciated, Thanks.

HTML5 images not aligning correctly with same css

I am trying to align two images in two divs. These are the two images, they are the same size, resolution, and the aligning is perfect when doing it in photoshop: enter image description here

But when I reference them in my index.html like so:

<!-- Intro Header -->
<div class="intro">
    <div class="intro-body">
        <div class="container">
            <div class="row">
                <div class="col-md-8 col-md-offset-2">
                    <h2>ssss</h1>
                </div>
            </div>
        </div>
    </div>
</div>

<!-------acerca---------->

<div id="acerca" class="acerca">
    <div class="acerca-body">
        <div class="container">
            <div class="row">
                <div class="col-md-8 col-md-offset-2">
                    <h2>Acerca de Cssss</h2>
                </div>
            </div>
        </div>
    </div>
</div>

With the exact same css classes:

.intro {
display: table;
width: 100%;
height: auto;
padding: 100px 0;
text-align: center;
color: #fff;
background: url(../img/back2.png) no-repeat bottom center scroll;
background-color: #000;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}

.intro .intro-body {
    display: table-cell;
    vertical-align: middle;
}

.intro .intro-body .brand-heading {
    font-size: 40px;
}

.intro .intro-body .intro-text {
    font-size: 18px;
}


.acerca {
    display: table;
    width: 100%;
    height: auto;
    padding: 100px 0;
    text-align: center;
    color: #fff;
     background: url(../img/back4.png) no-repeat bottom center scroll;
    background-color: #000;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
}

.acerca .acerca-body {
    display: table-cell;
    vertical-align: middle;
}

.acerca .acerca-body .brand-heading {
    font-size: 40px;
}

.acerca .acerca-body .acerca-text {
    font-size: 18px;
}

And the images do not align as you can see in this picture: enter image description here

I can't post images because of lacking reputation points, this is only my second question.

Do anyone know how to align them? Thanks.

CSS, how to make the scrollbar disappear, in a 100% viewport

I have set my body and html to be 100%, there seems to be a weird margin collapse case here, i can't seem to make the scrollbar disappear, the body seems to be adding the menu height to its own height causing a scroll

<body>
<div id='container'>
    <div id='menu'>
        i am a menu
    </div>
    <div id='app'>
        i want this div to fill the hole available space so my textarea can fill too
        <div> i am the contents of the app </div>
        <textarea id='text'>
           i want this to be this big filling all the space, as it is now
        </textarea>
    </div>
</div>
</body>

here is the styles i am using:

html, body { height:100%; width:100%}
html { background-color: red; overflow-y:scroll}
body { background-color: white; }

#container
{
  width:100%;
  height:100%;
}
#menu {
    height:100px;
    background-color:lightgrey;
}
#app {
  width:100%;
  height:100%;
  background-color:pink;  
}
#text{
    box-sizing: border-box;
    width:100%;
    height:100%;
}

I don't want to disable the scrollbar, I want the height to be correct and the scroll to be enabled only when content is actually overflowing!

here is a fiddle

i have tried to make container float, and other things that i have researched about margin collapse, but this one does not budge.

please help!, as a bonus is there a different way to make my textarea occupy all available space on the viewport without setting height 100% on every parent?

How to pass parameters between forms in HTML?

I have a 2-step registration process which consists of 2 different HTML pages. The second (and final) step collects all the data and sends it to the server for evaluation. For simplicity, let's say I collect user's name in the first form and user's age in the second:

formA.html:

<form action="formb.html" method="get">
      Name: <input id="age" type="text" name="age">
      <input id="submit_button" type="submit" value="CONTINUE">
</form>

formB.html:

<form action="serverscript.py" method="post">
      Age: <input id="name" type="text" name="name">
      <input id="submit_button" type="submit" value="SUBMIT">
</form>

How can I "propagate" the "name" that user has entered in formA.html to formB.html so that I can send name,age to the server?

Show CSS menu item selected by default using Jquery

I have created a menu bar using CSS and HTML. Menu bar contains sub-menu as well.

I am able show menu-item on hover of main menu item etc. But now I need Menu Item 2 (or one menu item), to be hovered/selected by default, (as soon as the page loads) and its related sub-menu items to be shown by default as well. Please guide me through the same.

I have tried adding a class on the first item using Jquery :

$(document).ready(function(){
  $("get the id of the menu item").click(function(){
       $(this).parent().find("id of the menu item").addClass('class to be added');   
  }); //but what should be written in the class so that menu item is active and its sub menu items are shown by default

});

HTML Code :

<ul id="menu-main" class="menu"><li id="menu-item-24" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-24"><a href="#">Test1</a></li>
  <li id="menu-item-25" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-25"><a href="#">Test2</a>
<ul class="sub-menu">
 <li id="menu-item-267" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-267"><a href="#">Sub Menu1</a></li>
</ul>
</li>
<li id="menu-item-27" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-27"><a href="#">Test3</a>
<ul class="sub-menu">
<li id="menu-item-33" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-33"><a href="#">S1</a></li>
<li id="menu-item-34" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-34"><a href="#">S2</a></li>
<li id="menu-item-30" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-30"><a href="#">S3</a></li>
<li id="menu-item-278" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-278"><a href="#">S4</a></li>
<li id="menu-item-281" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-281"><a href="#">S5</a></li>
</ul>
</li>
<li id="menu-item-31" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-31"><a href="#">Test4</a></li>
<li id="menu-item-258" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-258"><a href="#">Test5</a></li>
<li id="menu-item-253" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-253"><a href="#">Test6</a></li>
</ul>

And the CSS :

ul.sub-menu{position:relative;
z-index:40;}
ul#menu-main ul {
display: none;
}

ul#menu-main li:hover > ul {
display: block;background-color: red;
} ul#menu-main {



position: relative;
display:inline-table;
top: 42px;
position: relative;
float:right;
margin-bottom: 0px;
clear: both;
padding: 0 0 0 20px;
background: transparent!important;
list-style: none;
height: 60px;
font-family: BebasNeueRegular, Helvetica, Arial Narrow, sans-serif;
font-size: 18px;
}
 ul#menu-main:after {
 content: ""; clear: both; display: block;
}
ul#menu-main li {
float: left;
line-height: 60px;
z-index: 40;
margin-left: 15px;
}

 ul#menu-main li a:hover {
    color: #fff;
background: #f29919;

}
ul#menu-main ul li{ border-bottom:1px solid #eee;}
ul#menu-main ul li a:hover {
color: #818181;
background: #eee;

}


ul#menu-main li a {
display: block;
font-family: BebasNeueRegular, Helvetica, Arial Narrow, sans-serif;
padding: 0 20px;
color: #818181;
text-decoration: none;
}
ul#menu-main ul {
border-radius: 0px; padding: 0;
position: absolute; top: 100%;
}
ul#menu-main ul li {
float: none; 

position: relative;
list-style:none;
/*width: 180px;*/
line-height: 37px;
margin-left: 0px;
}ul#menu-main ul li:first-child{border-top: 1px solid white;}

ul#menu-main ul ul li a:hover {
color:white;
}

ul#menu-main ul ul {
position: absolute; left: 100%; top:-1px;
}
ul#menu-main li.current-menu-item > a{
color: #fff;
}


ul#menu-main ul ul li:hover a{
color: #333333;
}

Undefined method "errors"... But there are ERRORS

I am doing a basic validation for a bank entry and am trying to display the errors on submit. Here is my validation and html.

class GuestbookEntry < ActiveRecord::Base
  validates :body, presence: :true
end

This is my html:

<% form_for @guestbook_entry do |f| %>                                                                                   
  <% if @guestbook_entry.errors.any? %>                                                                                
    <% @guestbook_entry.errors.full_messages.each do |m| %>                                                                                         
      <li><%= m %></li>                                                                                          
    <% end %>                                                                                                   
  <% end %>                                                                                 
  <%= f.label :body, "Guestbook Entry:" %>                                                                                     
  <%= f.text_area :body %>                                                                                                         
  <%= f.submit "Submit" %>                                                                                     
<% end %>

error message Any ideas?

I am trying to make a div disappear on click and make another div appear in its place I have wrote and run code using javascript;

document.getElementById("nextOneButton").onclick = function() { document.getElementById("mainFrameOne").style.display="none"; document.getElementById("mainFrameTwo").visibility="visible"; }

//mainFrameTwo is initially set hidden in terms of visibillity //nextOneButton is on top of the mainFrameOne in terms of position, when //clicked it should move to next frame. Some what like a slide show

image rotation design by css and js

I wanted to rotate an image by css and javascript. I do not have much knowledge in css. I have tried by transform. my css :

.rotate-90 {
  -webkit-transform: rotate(90deg);
  -moz-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  -o-transform: rotate(90deg);
  transform: rotate(90deg);
}

Here is the fiddle before applying rotating css.

And here is the fiddle after applying css.

I want output like this attachment

EDIT:

For more clear insight Image rotation is working fine. I am having problem in css. When i am adding css class it is overlaping top buttons. I need to rotate and adjust image in a way that image never overlap my buttons and my page footer.

Can anyone suggest me how can I adjust image that after rotating it will adjust his position and will not overlap top buttons or footer design?

Any suggestion will be appreciated.

CSS website layout adaptive to content (SOLVED)

I have searched many articles to find this answer but have not been able to find a solution:

I cannot manage to get the wrapper to expand with it's content...

Here is the structure:

 * {
padding: 0;
margin: 0;
}  
body {
background-color: #ccc;
background-repeat:repeat;
font: Tahoma, Geneva, sans-serif;
color: #FFF;
}
.wrapper {
width: 95%;
margin: 0 auto;
}
/* ------------------------ Start Header -----------------*/
.header {
background-color: #333;
}
* html .header {height:110px} /* IE Min-Height Hack */ 
/* ------------------------ End Header -----------------*/
/* ------------------------ Start Nav Bar -----------------*/
.nav-bar {
background-color: #E8E8E8;
margin: 0px 0px 13px 0px;
min-height: 17px;
padding: 13px;
border: 1px solid #AEAEAE;
}
* html .nav-bar {height: 17px} /* IE Min-Height Hack */ 

.nav-links li {
list-style: none;
display: inline;
margin-right: 16px;
font: normal small-caps normal 12px/1.4 Tahoma, Geneva, sans-serif;
}

.nav-links li a:link {
background-color: #E8E8E8;
color: #333;
font-weight: bold;
font-size: 13px;
text-decoration: none;
}
.nav-links li a:visited {
background-color: #E8E8E8;
color: #333;
font-weight: bold;
font-size: 13px;
text-decoration: none;
}
.nav-links li a:hover {
background-color: #E8E8E8;
color: #999;
font-weight: bold;
font-size: 13px;
text-decoration: none;
}
/* ------------------------ End Nav Bar -----------------*/
/* ------------------------ Start outer content -----------------*/
#container {
  overflow: hidden;
  width: 100%;
}

#outercontent {
background-color: #e8e8e8;
width: 97,5%;
padding: 13px;
min-height: 655px;
margin-bottom: 13px;
border: 1px solid #AEAEAE;

  background-color: orange;
  /*padding-bottom: 100em;*/
  /*margin-bottom: -500em;*/
}
* html #outercontent {height: 655px} /* IE Min-Height Hack */ 
/* ------------------------ End outer content -----------------*/
/* ------------------------ Start Columns -----------------*/
#centercolumn { /* Parent Wrapper for inside boxes background-color:    #333333; */ 
background-color: #333333;
margin: 0px 0px 0px 0px;
display: inline; /* IE Hack */
padding: 7px;
width: 80%;
min-height: 630px;
float: left; 

  background-color: red;
 /* padding-bottom: 250em; */
 /* margin-bottom: -250em; */

}

.p {
font: normal small-caps normal 40px/1.2 Tahoma, Geneva, sans-serif;
}

table.db-table-products { border-right:1px solid #ccc; border-bottom:1px   solid #ccc; background-color:#FFF; overflow:hidden;}
table.db-table-products th  { padding:5px; border-left:1px solid #ccc;   border-top:1px solid #ccc; font: normal small-caps normal 12px/1.2 Tahoma,   Geneva, sans-serif, bold; background-color: #FFF; color: #000;}
table.db-table-products td  { padding:4px; border-left:1px solid #ccc;   font: normal small-caps normal 10px/1.2 Tahoma, Geneva, sans-serif; border-  top:1px solid #ccc; background-color:#999;}

table.db-table-products caption { 
font: normal small-caps normal 16px/1.4 Tahoma, Geneva, sans-serif;
display: table-caption;

}

table.db-table-products hr { 
display: block;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: auto;
margin-right: auto;
border-style: inset;
border-width: 1px;
}

/* unvisited link */
table.db-table-products a:link {
color: #FFDD38;
}

/* visited link */
table.db-table-products a:visited {
color: #D8C150;
}

/* mouse over link */
table.db-table-products a:hover {
color: #D8B70F;
}

/* selected link */
table.db-table-products a:active {
color: #D8B70F;
}

.rightcolumn {
margin: 0px 0px 13px 13px;
padding: 7px;
display: inline; /* IE Hack */
width: 210px;
min-height: 160px;
float: left;
border: 1px solid #AEAEAE;
background-color: #ccc;
font: normal normal 10px/1.4 Tahoma, Geneva, sans-serif;
color: #666666;
}
/* ------------------------ End Columns -----------------*/
/* ------------------------ Start Footer -----------------*/
#footer {
border: 1px solid #AEAEAE;
padding: 15px;
margin-bottom: 13px;
background-color: #e8e8e8;
font: normal normal 10px/1.4 Tahoma, Geneva, sans-serif;
color: #666666;

   background-color: blue;
 /* padding-bottom: 100em; */
 /* margin-bottom: -200em; */
}
/* ------------------------ End Footer -----------------*/

h1 {
font-size: 23px;
font-family: Arial;
font-weight:bold;
font: normal small-caps normal 23px/1.4 Tahoma, Geneva, sans-serif; 
}
.float {
float: left;
padding: 0px 10px 0px 0px;
}
img {
border: none;
}
/* Links */
a:link {
color: #fff;
text-decoration: underline;
}
a:visited {
color: #fff;
text-decoration: none;
}
a:hover {
color: #333333;
background-color: #fff;
text-decoration: none;
}

And here it is HTML code:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://ift.tt/kkyg93">
 <html xmlns="http://ift.tt/lH0Osb">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <!-- <link href="table-css/table-db.css" rel="stylesheet" type="text/css"> -->
 <link rel="stylesheet" type="text/css" href="main4.css" />
 <title>Products Market</title>
 </head>
 <body>
 <div id="container">
 <!-- Start Wrapper -->
 <div class="wrapper">
 <!-- Start Header -->
 <div class="header"> <img src="images/logo.jpg" alt="Logo" width="1200" height="150" /> 
 </div>
 <!-- End Header -->
 <!-- Start Navigation Bar -->
 <div class="nav-bar">
 <ul class="nav-links">
  <li><a href="#">Home</a></li>
  <li><a href="#">24h Monetary Market</a></li>
  <li><a href="#">Actual Monetary Market</a></li>
  <li><a href="#">Products Market</a></li>
  <li><a href="#">Jobs Market</a></li>
  <li><a href="#">Contact me</a></li>
 </ul>
 </div>
 <!-- End Navigation Bar -->
 <!-- Start Outer Content -->

 <div id="outercontent">
 <div id="centercolumn">
  <h1><b><u>Welcome</u></b></h1>
  <p>  
 <?php include 'test.php'; ?>
 </p><br />
 </div>  

 <!-- Start Right Content -->
 <div class="rightcolumn">
  <h1><u><b>About Me</b></u></h1>
  TEXT </div>
  <div class="rightcolumn">
  <h1><u><b>Search</b></u></h1> 
    </div>
    <br />
    </div>

  <!-- End Right Content -->
  </div>

  <!-- End Outer Content -->
  <!-- End Outer Content -->
  <!-- Start Footer -->
  <div id="footer"> &copy; Copyright with <a href="http://ift.tt/1diZWpl">Code-Sucks.com</a> 2006-2015 </div>
  <!-- End Footer -->
  </div>
  <!-- End Wrapper -->
  </div>
  </div>

  </body>
  </html>

I would like that outer part of layout reach the same height of content? Could you help me pls?

Thx

Here we go with the solution to the problem. It's a little bit different from the one suggested by petebolduc, but his idea helped me to find a mix solution.

So this is the code:

* {
padding: 0;
margin: 0;
}
body {
background-color: #ccc;
background-repeat:repeat;
font: Tahoma, Geneva, sans-serif;
color: #FFF;
}
/* ------------------------ Start Header -----------------*/
.header {
background-color: #333;
}
* html .header {height:110px} /* IE Min-Height Hack */ 
/* ------------------------ End Header -----------------*/
/* ------------------------ Start Nav Bar -----------------*/
.nav-bar {
background-color: #E8E8E8;
margin: 0px 0px 13px 0px;
min-height: 17px;
padding: 13px;
border: 1px solid #AEAEAE;
}
* html .nav-bar {height: 17px} /* IE Min-Height Hack */ 

.nav-links li {
list-style: none;
display: inline;
margin-right: 16px;
font: normal small-caps normal 12px/1.4 Tahoma, Geneva, sans-serif;
}

.nav-links li a:link {
background-color: #E8E8E8;
color: #333;
font-weight: bold;
font-size: 13px;
text-decoration: none;
}
.nav-links li a:visited {
background-color: #E8E8E8;
color: #333;
font-weight: bold;
font-size: 13px;
text-decoration: none;
}
.nav-links li a:hover {
background-color: #E8E8E8;
color: #999;
font-weight: bold;
font-size: 13px;
text-decoration: none;
}
/* ------------------------ End Nav Bar -----------------*/
/* ------------------------ Start outer content -----------------*/
#container {
  overflow: hidden;
  width: 100%;
}
.wrapper {
vertical-align:top;
width: 95%;
margin: 0 auto;
}

#outercontent {
background-color: #e8e8e8;
width: 97.85%;
padding: 13px;
/* min-height: 655px;*/
margin-bottom: 13px;
border: 1px solid #AEAEAE;
/* height:auto;*/
/* position:relative;*/
/*text-align:left;*/
vertical-align:top;

/*      background-color: orange; */
  /*padding-bottom: 100em;*/
  /*margin-bottom: -500em;*/
}
/** html #outercontent {height: 655px;} */
/* ------------------------ End outer content -----------------*/
/* ------------------------ Start Columns -----------------*/
.lefthalf_col {
width:79.5%;
display:inline-block;
position:relative;
left:0;
top:0;
vertical-align:top;
}

.righthalf_col {
width:19.2%;
display:inline-block;
position:relative;
/*  right:0;*/
left:.9%;
vertical-align:top;
}
#centercolumn { /* Parent Wrapper for inside boxes background-color:  #333333; */ 
background-color: #333333;
/* margin: 0px 0px 0px 0px;*/

padding: 7px;
width:100%;
min-height: 630px;
height:auto;
position:relative;
top:0;

/* width: 75%;*/
/* min-height: 630px;*/
display: inline-block; /* IE Hack */
/* top:0;*/
/* float: left; */

/*      background-color: red; */
 /* padding-bottom: 250em; */
 /* margin-bottom: -250em; */
}
.rightcolumn {
margin: 0px 0px 13px 13px;
padding: 7px;
/* display: inline-block; /* IE Hack */*/
/* width: 210px;*/
width:100%;
min-height: 160px;

position:relative;
top:0;
border: 1px solid #AEAEAE;
background-color: #ccc;
font: normal normal 10px/1.4 Tahoma, Geneva, sans-serif;
color: #666666;
}

.p {
font: normal small-caps normal 40px/1.2 Tahoma, Geneva, sans-serif;
}


table.db-table-products { border-right:1px solid #ccc; border- bottom:1px solid #ccc; background-color:#FFF; overflow:hidden;}
table.db-table-products th  { padding:5px; border-left:1px solid #ccc;  border-top:1px solid #ccc; font: normal small-caps normal 12px/1.2 Tahoma,  Geneva, sans-serif, bold; background-color: #FFF; color: #000;}
table.db-table-products td  { padding:4px; border-left:1px solid #ccc;  font: normal small-caps normal 10px/1.2 Tahoma, Geneva, sans-serif; border- top:1px solid #ccc; background-color:#999;}

table.db-table-products caption { 
font: normal small-caps normal 16px/1.4 Tahoma, Geneva, sans-serif;
display: table-caption;

}

table.db-table-products hr { 
display: block;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: auto;
margin-right: auto;
border-style: inset;
border-width: 1px;
}

/* unvisited link */
table.db-table-products a:link {
color: #FFDD38;
}

/* visited link */
table.db-table-products a:visited {
color: #D8C150;
}

/* mouse over link */
table.db-table-products a:hover {
color: #D8B70F;
}

/* selected link */
table.db-table-products a:active {
color: #D8B70F;
}
/* ------------------------ End Columns -----------------*/
/* ------------------------ Start Footer -----------------*/
#footer {
border: 1px solid #AEAEAE;
padding: 15px;
margin-bottom: 13px;
background-color: #e8e8e8;
font: normal normal 10px/1.4 Tahoma, Geneva, sans-serif;
color: #666666;

 /* background-color: blue; */
 /* padding-bottom: 100em; */
 /* margin-bottom: -200em; */
}
/* ------------------------ End Footer -----------------*/

h1 {
font-size: 23px;
font-family: Arial;
font-weight:bold;
font: normal small-caps normal 23px/1.4 Tahoma, Geneva, sans-serif; 
}
.float {
float: left;
padding: 0px 10px 0px 0px;
}
img {
border: none;
}
/* Links */
a:link {
color: #fff;
text-decoration: underline;
}
a:visited {
color: #fff;
text-decoration: none;
}
a:hover {
color: #333333;
background-color: #fff;
text-decoration: none;
}

And here is the html code:

   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ift.tt/kkyg93">
   <html xmlns="http://ift.tt/lH0Osb">
   <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

   <link rel="stylesheet" type="text/css" href="main7.css" />
   <title>Products Market</title>
   </head>
   <body>
   <div id="container">
   <!-- Start Wrapper -->
   <div class="wrapper">
   <!-- Start Header -->
   <div class="header"> <img src="images/logo.jpg" alt="Logo" width="100%" height="150" /> 
   </div>
   <!-- End Header -->
   <!-- Start Navigation Bar -->
   <div class="nav-bar">
   <ul class="nav-links">
   <li><a href="#">Home</a></li>
   <li><a href="#">24h Monetary Market</a></li>
   <li><a href="#">Actual Monetary Market</a></li>
   <li><a href="#">Products Market</a></li>
   <li><a href="#">Jobs Market</a></li>
   <li><a href="#">Contact me</a></li>
   </ul>
   </div>
   <!-- End Navigation Bar -->
   <!-- Start Outer Content --> 
   <!--  <div class="tablegraph">
   <div class="row"> -->
   <div id="outercontent">
   <div class="lefthalf_col">
   <div id="centercolumn">
   <h1><b><u>Welcome</u></b></h1>
   <p>  
   <?php // include 'query.php';
   include 'query2.php'; ?>  ‫
   </p><br />
   </div>
   </div>
   <!-- Start Right Content -->
   <div class="righthalf_col">
   <div class="rightcolumn">
   <h1><u><b>About Me</b></u></h1>
   TEST
   </div>
   <div class="rightcolumn">
   <h1><u><b>Search</b></u></h1>
   <br />
   TEST
   </div> 
   </div> <!-- half_col -->


   <!-- End Right Content -->
   </div>
   <!-- End Outer Content -->
   </div>

   <!-- Start Footer -->
   <div id="footer"><p> &copy; Copyright with <a href="http://ift.tt/1diZWpl" target="_blank">Code-Sucks.com</a> 2006-2015 </p>
   <p>Thanks to <a href="http://ift.tt/fyw30c" target="_blank">Stackoverflow.com</a> guys! </p>

   </div>
   <!-- End Footer -->

   </div>
   <!-- End Outer Content -->
   </div>
   <!-- End Wrapper -->
   <!--</div>
   </div>-->

   </body>
   </html>

In the end problem seemed to be with "float" attribute. Changing that and positioning the DIVs I needed for content into wrapper DIV part and into outer content DIV part, the problem was resolved.

Thx for the help.