Author:
erics , June 4th, 2020
Outer Block – set the line-height: {some value} Inner Block – set the line-height: normal, along with display: inline-block; vertical-align: middle; Also works if you set OUTER height instead of the line-height (or together with the same value as the height).
Categories: How-To's , Technology Tags: Align , CSS , height , HotTo , html , line , line-height , normal , tips , Vertical
| No comments
Author:
erics , March 25th, 2020
I needed to use an iframe between a pre-defined header and footer that would auto-fill the full height on any size screen. On a desktop, the combined height of the header + footer was 223px and for mobile was 157px, so below find the CSS example: calc(100vh – 223px) – for desktop calc(100vh – 157px) […]
Categories: How-To's , Technology Tags: Auto , cacl() , Calc , CSS , Fly , Function , height , howto , html , On The Fly , tips
| No comments
Author:
erics , July 1st, 2019
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
DATE = ` date `
(
echo "From: Your Full Name <you@yourdomain.com>"
echo "To: you@yourdomain.com"
echo "Subject: AWS Instances Report for All Customers as of $DATE"
cat << EOT
MIME - Version : 1.0
Content - Type : text / html
Content - Disposition : inline
< html >
< body >
< pre style = "font: monospace" >
EOT
for profile in customer1 customer2 customer3 ; do
for region in ` aws ec2 describe - regions -- output text | cut - f3 ` ; do
echo - e "\nListing Instances for profile $profile in region: '$region'..."
aws ec2 describe - instances \
-- filters "Name=instance-state-name,Values=running" \
-- query 'Reservations[*].Instances[*].[InstanceId, PublicIpAddress, LaunchTime, InstanceType, Tags[?Key==`Name`] | [0].Value]| sort_by(@, &@[0][2])' \
-- region $region \
-- profile $profile \
-- output table
done
done
cat << EOT
< / pre >
< / body >
< / html >
EOT
) | / usr / sbin / sendmail - t
Categories: How-To's , Technology Tags: AWS , aws ec2 , Date , EC2 , Email , Font , Format , howto , html , LaunchTime , mail , monospace , monospaced , Multiple , Region , Regions , SendMail , sort , Sort By , time , tips
| No comments
Author:
erics , August 31st, 2018
< button class = "paypal-btn large" onclick = "window.location='https://www.yoursite.com/targetPage/';return false" > What a Great Button < / button >
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
button . paypal - btn {
white - space : nowrap ;
}
button . paypal - btn {
white - space : nowrap ;
overflow : hidden ;
border - radius : 13px ;
font - family : "Arial" , bold , italic ;
font - weight : bold ;
font - style : italic ;
border : 1px solid #ffa823;
color : #0E3168;
background : #ffa823;
position : relative ;
text - shadow : 0 1px 0 rgba ( 255 , 255 , 255 , . 5 ) ;
cursor : pointer ;
z - index : 0 ;
}
button . paypal - btn : before {
content : " " ;
position : absolute ;
width : 100 % ;
height : 100 % ;
border - radius : 11px ;
top : 0 ;
left : 0 ;
background : #ffa823;
background : - webkit - linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
background : - moz - linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
background : - ms - linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
background : linear - gradient ( top , #FFAA00 0%,#FFAA00 80%,#FFF8FC 100%);
z - index : - 2 ;
}
button . paypal - btn : after {
content : " " ;
position : absolute ;
width : 98 % ;
height : 60 % ;
border - radius : 40px 40px 38px 38px ;
top : 0 ;
left : 0 ;
background : - webkit - linear - gradient ( top , #fefefe 0%, #fed994 100%);
background : - moz - linear - gradient ( top , #fefefe 0%, #fed994 100%);
background : - ms - linear - gradient ( top , #fefefe 0%, #fed994 100%);
background : linear - gradient ( top , #fefefe 0%, #fed994 100%);
z - index : - 1 ;
- webkit - transform : translateX ( 1 % ) ;
- moz - transform : translateX ( 1 % ) ;
- ms - transform : translateX ( 1 % ) ;
transform : translateX ( 1 % ) ;
}
button . paypal - btn . small {
padding : 3px 15px ;
font - size : 12px ;
}
button . paypal - btn . large {
padding : 4px 19px ;
font - size : 14px ;
}
Categories: How-To's , Technology Tags: Button , Class , Create , CSS , howto , html , onclick , PayPal , style , tips
| No comments
Author:
erics , April 22nd, 2016
If when trying to use SVG as an image <img src=”image.svg”> or as a CSS background-image, the browser doesn’t display it, your web host is probably serving the SVG with the wrong content-type. Add this to your web server config or .htaccess file: AddType image/svg+xml .svg .svgz
Categories: How-To's , Technology Tags: .htaccess , apache , Background , Content , Content-Type , CSS , howto , html , Image , img , SVG , tips , Type , Web , Web server , XML
| No comments
Author:
erics , April 19th, 2014
table.myTable > tbody > tr:first-child > td:first-child
Categories: How-To's , Technology Tags: :first-child , Cell , Child , CSS , first , howto , html , Row , select , Table , TD , TH , tips
| No comments
Author:
erics , October 23rd, 2013
The latest patch version of the SMF forum, 2.0.6, now prevents the site from opening up in an HTML frame. Simply comment out line 104 inside index.php: The Problem: $ grep -Rni X-Frame-Options * index.php:104: header(‘X-Frame-Options: SAMEORIGIN’); The Solution: //header(‘X-Frame-Options: SAMEORIGIN’);
Categories: How-To's , Technology Tags: forum , Frame , Header , howto , html , iFrame , index.php , php , SAMEORIGIN , smf , tips , X-Frame-Options
| No comments
Author:
erics , October 1st, 2012
Add the parameter label_ids=true. For example:
{ html_radios name = "yourName" label_ids = true options = $ yourOptions selected = $ smarty . request . yourName separator = "<br/>" }
Categories: How-To's , Technology Tags: howto , html , html_radios , ID , Missing , php , Radio , Radio Button , Radios , Smarty , tips
| No comments
Author:
erics , July 19th, 2012
An HTML file input can’t be cleared by normal means (i.e. setting the value to null or an empty string) because of browser security restrictions. In most browsers, setting a null value attribute either will have no effect or cause an error. Creating a new element that clones the old element and swap the two […]
Categories: How-To's , Technology Tags: Clear , File , File Input , howto , html , input , tips
| No comments