lundi 4 juillet 2016

padding the space above a css button

I'm trying to add padding to the space above a button created with CSS. The button CSS already has padding in it around the text so if I try to add padding-top it just changes the size of the button rather than move it down closer to the element below it which is what I'm trying to do.

This is the CSS:

button {
  background:    #c00;
  background:    -webkit-linear-gradient(#c00, #600);
  background:    linear-gradient(#c00, #600);
  border-radius: 999px;
  color:         #f6f4f4;
  padding:       10px 100px;
  font:          normal 700 24px/1 "Open Sans", sans-serif;
  text-align:    center;
  text-shadow:   1px 1px 0 #000;
  margin-left: 80px;
}

How to get auto sum required in angularjs?

Hi all I filter count and quality, I need to total sum value can be changed to corresponding filtered data equally auto sum generate using getTotals() functionality in meanjs app. then i tried many ways but unable to get the solution if any one knows the solution please help me... http://plnkr.co/edit/IBPd8Dx6hmfWHULKrIBi?p=preview

HTML

<td><p>{{getTotals()}}</p></td>
                <td><p>{{getTotalss()}}</p></td>

PHP - How to get special characters from databse? [duplicate]

This question already has an answer here:

PHP code:

$con = mysqli_connect("localhost", "root", "root", "demoTable");
$query = "select * from demoTable";
$result = mysqli_query($con, $query);
$row = mysqli_fetch_assoc($result);
echo "demo string: ".$row["demoString"];
mysqli_close($con);

Here the string stored in demoTable is This is a demo <string>. But only This is demo is being displayed on the screen. Can anyone please tell me what is the problem here???

dynamic textbox in pressing enter key

can someone help me with my code? everytime I type in my textbox it create multiple textbox but I want to create a program that everytime I hit enter key it create another textbox.

here's my code:

<script language="javascript">
    function changeIt() {
     var i = 1;
     my_div.innerHTML = my_div.innerHTML +"<br><input type='text' name='mytext'+ i><br/>"
    }
</script>
<body>
    <form name="form" action="post" method="">
      <input type="text" name=t1 onkeydown="changeIt()">
      <div id="my_div"></div>
    </form>
</body>

How to extract meta tags of a series of URLs without downloading whole html in c#

I want to extract title , description and keywords of a seris of URLs
I have this code

 WebClient x = new WebClient();
 string  pageSource = (x.DownloadString(url));     
 query.title = Regex.Match(pageSource, @"<titleb[^>]*>s*(?<Title>[sS]*?)</title>", RegexOptions.IgnoreCase).Groups["Title"].Value;

But I do not want to download whole page because It is so time consuming for a series of URLs. Is there any way to get get these information without downloading whole page?
I should mention that I get these URLs in google search result page buy sending query to google.

SCSS mixin or function to differentiate between color or gradient

Using SCSS, I want to create a mixin, which will receive parameter and can determine whether it color or gradient and according to it create background property.

As possible parameters input:

  • any colors values (#hex, rgba, color...).
  • any colors SCSS functions (rgba(color, 0.1), darken(color, 15%) ...) as color.
  • gradient string ("top, rgba(30,87,153,1) 0%,rgba(125,185,232,1) 100%")

Pseudo-code:

if color or SCSS color function 
  then background: color;
if gradient 
  then background: -webkit-linear-gradient(gradient);
       background: linear-gradient(gradient);
       background: -moz-linear-gradient(gradient);

I don't want to use Compass or any other SASS library.

background-size: cover; Can we reverse clip direction?

The CSS3 rule 'background-size: cover;' starts at the top left of a div and stretches the background image in aspect ratio so that it dynamically covers the width of the div.

For a particular image I have, it would look a lot better at higher width screens if 'background-size: cover;' started the image from the bottom left of the div (div has fixed height) and covered up and to the right. This way the sky of the image would not be the only thing visible on wide monitors.

After some trial and research I have come up empty. Is this possible?

Thank you