Monday, November 3, 2014
How to test your page for responsiveness?..
My team leader just suggested a very good site to test page for responsiveness. Here it is Responsive design . Definitely, will use in a future.
Thursday, October 2, 2014
CSS3 Shadows Generator (Box-Shadow)
Working on my project, I have to create a lot of shadows around boxes. So, I found a nice tool to generate different shadows very quickly. I hope to use this tool more often.
Friday, September 19, 2014
How to imitate bootstrap's tooltip without bootstrap
Working with my next project, I had to come up with an idea to imitate tooltip bootstrap style without bootstrap. So, I did some research and found excellent resource. This example gave the idea how create fully-customized tooltip for my project. Here's an example how I used the sample:
HTML:
<div id="top-menu-bar-buttons">
<div class="button1 icon-location-left"><button class="btn-secondary tooltips" type="button">Cancel<span class="width60">Cancel</span></button></div>
<div class="button2 icon-location-left"><button class="btn-secondary tooltips" type="button">Preview<span class="width60">Preview</span></button></div>
<div class="button3 icon-location-left"><button class="btn-primary tooltips" type="button"><div id="top-menu-bar-button3-text">Review Job</div><i class="fa fa-chevron-right fa-lg"></i><span class="width75">Review Job</span></button></div>
</div>
CSS:
button.tooltips {
position: relative;
display: inline;
}
button.tooltips span {
position: absolute;
color: #FFFFFF;
background: #000000;
height: 19px;
line-height: 18px;
text-align: center;
visibility: hidden;
border-radius: 6px;
font-size: 12px;
font-weight: normal;
}
button.tooltips span:after {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -8px;
width: 0; height: 0;
border-bottom: 8px solid #000000;
border-right: 8px solid transparent;
border-left: 8px solid transparent;
}
button:hover.tooltips span {
visibility: visible;
opacity: 0.8;
top: 40px;
bottom: 30px;
left: 100%;
margin-left: -76px;
z-index: 999;
}
.width60 {
width: 60px;
}
.width75 {
width: 75px;
}
Wednesday, June 11, 2014
CSS: Default values
Every CSS style has a natural default value. It's just not always
Some may be
Some may be
Sometimes
Colours can be set to
If you're unsure what the default is, try creating a dummy page with just a plain unstyled element, and use the browser dev tools to see what the styles are set to.
none
.Some may be
0
(as in zero).Some may be
auto
.Sometimes
inherit
is the best option.Colours can be set to
transparent
.If you're unsure what the default is, try creating a dummy page with just a plain unstyled element, and use the browser dev tools to see what the styles are set to.
Thursday, May 22, 2014
Starting with LESS in .NET environment.
Researching the topic above I did not find anything useful for my project. Therefore my team lead and I found out pretty good way to implement LESS in out Bootstrap-Knockout environment.
1. Download less-1.7.0.min.js from LESS site and add to your scripts folder.
2. Open HTML file and add the line.
<script src="Scripts/less-1.7.0.min.js"></script>
3. Using Visual studio, create .less file and add line to HTML file before js-files.
<link rel="stylesheet/less" type="text/css" href="Content/custom/css/hello1.less">
4. Open web.config file and after(underneath) <system.web> add
<system.webServer>
<staticContent>
<mimeMap fileExtension=".less" mimeType="text/css" />
</staticContent>
</system.webServer>
Now you can play with .less files in .NET environment.
1. Download less-1.7.0.min.js from LESS site and add to your scripts folder.
2. Open HTML file and add the line.
<script src="Scripts/less-1.7.0.min.js"></script>
3. Using Visual studio, create .less file and add line to HTML file before js-files.
<link rel="stylesheet/less" type="text/css" href="Content/custom/css/hello1.less">
4. Open web.config file and after(underneath) <system.web> add
<system.webServer>
<staticContent>
<mimeMap fileExtension=".less" mimeType="text/css" />
</staticContent>
</system.webServer>
Now you can play with .less files in .NET environment.
Friday, April 18, 2014
Border around inputs
Working on my project, I had problems with Chrome presentation of some elements. It creates border automatically around many elements. I had to find a cure for the problem. The answer is in such a good article. It works and removes border around elements in Chrome and Safari.
Tuesday, April 15, 2014
Disabled Tooltip
My last project runs on Bootstrap-Knockout platform. I'm learning a lot about presenting elements in this environment. One of the major problem is to hide tooltip for Mobile views.
I searched the Internet and did not find a lot of information about such problem. One of the articles was particularly good, but I still have to find my original solution. My code disables the tooltip for Mobile users and save button functionality.
Here's what I did.
HTML:
<button class="btn btn-default btn-primary" type="button" data-bind="text: RequiresConfig == true ? 'Create' : 'Add to Cart',tooltip: { title: RequiresConfig == true ? 'Create' : 'Add to Cart', placement: 'bottom', disable: false }"></button>
Javascript/jQuery (accompanies HTML).
<script type='text/javascript'>
jQuery(function ($) {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
ko.bindingHandlers.tooltip = {
options: {
disable: true
}
};
ko.applyBindings({});
}
});
</script>
I searched the Internet and did not find a lot of information about such problem. One of the articles was particularly good, but I still have to find my original solution. My code disables the tooltip for Mobile users and save button functionality.
Here's what I did.
HTML:
<button class="btn btn-default btn-primary" type="button" data-bind="text: RequiresConfig == true ? 'Create' : 'Add to Cart',tooltip: { title: RequiresConfig == true ? 'Create' : 'Add to Cart', placement: 'bottom', disable: false }"></button>
Javascript/jQuery (accompanies HTML).
<script type='text/javascript'>
jQuery(function ($) {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
ko.bindingHandlers.tooltip = {
options: {
disable: true
}
};
ko.applyBindings({});
}
});
</script>
Friday, April 11, 2014
It's not a bug!
This time QA was right. They discovered some differences in landscape and portrait views in iPhone. It's only Safari and only iPhone does this. It re-sizes the font and images going from portrait to landscape. It's not a bug, it's a iPhone feature. To fix the issue, I found an article and patched my code. Very simple line of code fixes the feature.
html {-webkit-text-size-adjust: auto;}
It was a very good learning experience for me.
html {-webkit-text-size-adjust: auto;}
It was a very good learning experience for me.
Friday, March 28, 2014
How create gradient color without images...
Working on a new assignment, I had to find a way to generate gradient color. I decided to educate myself and learn online gradient generator. First of all, I found a good one, for a second, using online tool, I generated a nice piece of code for my project.
Wednesday, February 26, 2014
Turn the arrow
Working in Bootstrap-Knockout environment, I had to find the way to implement movable arrow for mobile menu.
HTML:
<nav>
<div class="navbar navbar-inverse" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" id="caret-mobile">
<span class="sr-only">Toggle navigation</span>
<span id="caret-mobile" class="caret-down"></span>
</button>
<a class="navbar-brand" href="#">Menu</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href='#'>About</a></li>
<li><a href='#'>Contact Us</a></li>
<li><a href='#'>FAQ</a></li>
<li><a href='#'>View Cart</a></li>
</ul>
</div>
</div>
</div>
</nav>
CSS:
.caret-down {
display: inline-block;
width: 0px;
height: 0px;
margin-left: 2px;
vertical-align: middle;
border-bottom: none;
border-top: 10px solid #FFFFFF;
border-right: 10px solid transparent;
border-left: 10px solid transparent;
content: "";
}
.caret-up {
display: inline-block;
width: 0px;
height: 0px;
margin-left: 2px;
vertical-align: middle;
border-top: none;
border-bottom: 10px solid #FFFFFF;
border-right: 10px solid transparent;
border-left: 10px solid transparent;
border-top-width: 0px;
border-top-style: dotted;
content: "";
}
Javascript:
<script src="jquery-2.0.3.js"></script>
<script src="bootstrap.min.js"></script>
<script type='text/javascript'>
jQuery(document).ready(function () {
jQuery('#caret-mobile').click(function () {
$(".caret-down").toggleClass('caret-up');
});
});
</script>
Thursday, January 30, 2014
Web Page Ruler
On this project I work a lot with QA counting every pixel in my css-file. To finish my project I had to add new Chrome extension. It's a quite good and practical tool for Front-End Development. I hope, everybody will use this extension.
In addition I found a very good tool to compress HTML online. He it is: http://www.textfixer.com/html/compress-html-compression.php This site features more useful tools and tricks, which I will use in a future.
In addition I found a very good tool to compress HTML online. He it is: http://www.textfixer.com/html/compress-html-compression.php This site features more useful tools and tricks, which I will use in a future.
Labels:
Chrome,
Public information,
Software Development
Tuesday, January 14, 2014
Horizontal and Vertical Menu
One HTML code, which will serve desktop, tablet and mobile views.
HTML:
<nav>
<div class="col-xs-12 col-sm-12 col-md-12" id="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">FAQ</a></li>
</ul>
</div><!-- navigation -->
</nav>
CSS:
header, nav {
width: 976px;
margin-left: auto;
margin-right: auto;
}
nav {
height: 130px;
}
#navigation ul
{
margin: 0;
padding-top: 15px;
display: block;
padding-bottom: 15px;
height: 40px;
}
#navigation ul li
{
list-style-type: none;
display: inline;
}
#navigation li:before {
content: " | ";
padding-left: 30px;
padding-right: 30px;
color: white;
}
#navigation li:first-child:before {
content: none;
}
HTML:
<nav>
<div class="col-xs-12 col-sm-12 col-md-12" id="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">FAQ</a></li>
</ul>
</div><!-- navigation -->
</nav>
CSS:
header, nav {
width: 976px;
margin-left: auto;
margin-right: auto;
}
nav {
height: 130px;
}
#navigation ul
{
margin: 0;
padding-top: 15px;
display: block;
padding-bottom: 15px;
height: 40px;
}
#navigation ul li
{
list-style-type: none;
display: inline;
}
#navigation li:before {
content: " | ";
padding-left: 30px;
padding-right: 30px;
color: white;
}
#navigation li:first-child:before {
content: none;
}
#navigation ul {
background-color: #6FB4D3;
}
#navigation li a {
color: white;
}
#navigation li a:hover {
color: #000066;
text-decoration: none;
}
Media -query:
@media screen and (max-width : 480px)
{
#navigation ul li
{
display: block;
list-style-type: none;
height: 40px;
width: 300px;
padding-top: 15px;
padding-bottom: 15px;
margin: 0;
text-align: center;
border: solid 2px #FFFFFF;
}
#navigation li:before { content: none;}
#navigation li:first-child:before { content: none; }
#navigation ul {
background-color: #FFFFFF;
}
#navigation ul li {
background-color: #6FB4D3;
}
#navigation ul li
{
background-color: #6FB4D3;
}
#navigation li a {
color: white;
}
#navigation li a:hover {
color: #000066;
text-decoration: none;
}
}
Subscribe to:
Posts (Atom)