Showing posts with label WebDesign. Show all posts
Showing posts with label WebDesign. Show all posts

Monday, July 7, 2014

jQuery - Setting dynamic equal height of a floated div

<script>
$(document).ready(function(){
    $('aside').height($("article").height());
});
</script>

Helpful URL: http://tech.pro/tutorial/1262/simplifying-dynamic-positioning-with-jquery-ui

Friday, May 23, 2014

Stick Menu Code

Jquery Code:

<script type="text/javascript">
$(window).scroll(function () {
    var iCurScrollPos = $(this).scrollTop();
    if (iCurScrollPos > 130) {
        $('nav').css('position','fixed');
$('.sticky-logo').css('display','none');
    } else {
        $('nav').css('position','relative');
$('.sticky-logo').css('display','block');
    }
    //iScrollPos = iCurScrollPos;
});
</script>

=====================================


CSS Code:
nav {
background: url(images/menu_bg.png) 0 0 repeat-x;
z-index:99999;
top:0px;
left:0;
width:100%;
}
.menu {
display: inline-block;
min-width: 100%;
list-style:none;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-bottom: 1px solid #ccc;
position: relative;
background-color:#666;
text-align: center;
z-index:99999999;
}

Wednesday, January 16, 2013

The 4 Types of CSS Layouts: Which One is Right for You?

One of the first, and often overlooked, elements to decide upon when building a CSS-based website is the type of CSS layout you plan on using. Wait… There is more than one type of CSS layout? Yep, in fact there are 4 primary CSS layout types. Each CSS layout is based on a different methodology and serves a different purpose. As a whole, the different types of CSS layouts provide added flexibility when designing websites.
Let’s take a look at each CSS layout, define the advantages and disadvantages of each, and review various examples so you can determine which type of CSS layout is best for you.

1. Fixed Width

Fixed CSS layouts are simply layouts that have a definite width specified in pixels. Furthermore, the size of the layout does not resize based on the size of the browser or the site visitor’s browser text settings.
Advantages
  • The layout or column is controlled (stays the same) which can be helpful to ensure your content remains easily read even when the browser window is shrunk or expanded.
  • In some cases specific designs can be more easily achieved without having to make accommodations for a layout that re-sizes.
Disadvantages
  • Oftentimes the layout size must be kept to a minimum to accommodate for smaller or low resolution computer screens. If you choose a large fixed width CSS layout visitors may have to scroll horizontally to read content.
  • With a set width you may not be taking advantage of the real estate larger or higher resolution screens provide. Additionally, your site may look tiny to visitors with these types of screens.
  • The content area may become awkward looking and hard to read if the visitor has their browser text size set larger than “normal” as this type of layout cannot easily accommodate for this scenario.
Example: WebAssist.com


2. Liquid or Fluid

A liquid CSS layout, otherwise know as a fluid layout, is one where the layout width is specified as a percentage of the site visitor’s browser width. Therefore, the design will adapt or change if the site visitor adjusts the size of their browser to be narrower or wider. The width will not change based on the site visitor’s text settings.
Advantages
  • Will help ensure the width of your site is proportionate to the size of your site visitor’s browser – universal as it will adapt to all screen sizes.
  • Allows your site to maximize the amount of real estate available within each site visitor’s browser.
  • You can set a max width CSS property to ensure your layout does not grow too large.
Disadvantages
  • If a layout is stretched the content areas will stretch and cause paragraphs of text to lengthen to one line making it less readable.
  • Some older browsers such as IE 6 do not support a max width CSS property so in some larger screens your site’s width may grow too large making content hard to read.
Example: Google News

3. Elastic

With an elastic CSS layout the layout width is specified as a unit of measurement (ems) relative to the size of the text set by the site visitor in their browser. The layout will adapt if the site visitor changes their text settings, however the layout will not change based on the size of the browser window.
Advantages
  • Site layout will grow proportionately with size of the text site visitors have set in their browsers. This can help ensure your content stays readable.
Disadvantages
  • If a browser’s text display settings are set too large your site may become unusable.
Example: Whitley Journalism
Note: To test the elasticity of this example you will need to set your browser text settings to a larger font size.

4. Hybrid

As you may have guessed a hybrid layout is any combination of CSS layout types mentioned above. For example, in a two-column hybrid, the right sidebar layout can have a liquid main column that scales to the size of the browser, and an elastic column on the right that scales to the size of the site visitor’s text settings.
Advantages
  • You can combine multiple benefits of the various layout types mentioned above.
Disadvantages
  • This type of layout can become difficult to implement as there are more variables.
Example: Amazon.com
Note: As you stretch the Amazon.com home page the right and left columns will remain fixed, while the center column is liquid and stretches as you increase the size of your browser.

As you can see each type of layout will provide you with various advantages and disadvantages. Hopefully through the information provided in this article you can better select the layout type that will fit your next project. Looking to more easily design CSS layouts within Dreamweaver? Check out Eric Meyer’s CSS Sculptor our which will help you design each of the above layout types without CSS knowledge or experience.

Wednesday, May 16, 2012

CSS FONT-SIZE: EM VS. PX VS. PT VS. PERCENT

It’s easy to understand the difference between font-size units when you see them in action. Generally, 1em = 12pt = 16px = 100%. When using these font-sizes, let’s see what happens when you increase the base font size (using the body CSS selector) from 100% to 120%.

Font-sizes as they increase from 100% to 120%.

Font-size as the client changes the text size in their browser.


1em = 12pt = 16px = 100%--------------------------------------------------------------------------------------
<body style="font-family:Arial, Helvetica, sans-serif; font-size:12px;">
<div style="font-size:1em;">I am the web designer</div> /* here 1em=12px because body font-size is set to 12px. */
<div style="font-size:1.2em;">I am the web designer</div> /* here 1em=14px because body font-size is set to 12px. */
</body>
--------------------------------------------------------------------------------------

Make the Footer Stick to the Bottom of a Page through the CSS


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style>
<!--
html, body{ height:100%; }
#main{ min-height:100%; position:relative; }
#header{ height:80px; background:#ccc; }
#content{ padding-bottom:100px; }
#footer{ position:absolute; bottom:0px; background:#ff0000; width:100%; height:100px; }

-->
</style>
</head>

<body style="padding:0px; margin:0px;">
<div id="main">
<div id="header">Header Section</div>
<div id="content">Container section</div>
<div id="footer">Footer Section</div>
</div>
</body>
</html>

Thursday, March 15, 2012

Meta code for IE8( IE8 treat as a IE7 with this meta )

IE8 treat as a IE7 with this meta:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Thursday, January 12, 2012

How To Make Facebook Page

Facebook fan page is easy, but just creating a fan page is not enough. If you’re looking for the Facebook Page to work for you or your business you need to create a page that not only provide users with information but also gives them an opportunity connect directly with the brand or business.
Social media can be related to storytelling which is one of the oldest forms of word of mouth communication and we can say Facebook marketing works on a similar principle. So let get started with some smart tips that will help you build your Facebook page.

Check out more on this website: http://www.39articles.net/how-to-make-facebook-page/

Tuesday, December 27, 2011

Block Quotes and Pull Quotes: Examples and Good Practices

Quotes are used to emphasize excerpts of text. Since users almost never read but scan we need to provide them with some focus anchors to fix their attention to the most important parts of our articles. Furthermore, quotes are always used for testimonials and sometimes for blog comments. They can be styled using graphics, CSS and a little bit of JavaScript. Sometimes, creative dynamic solutions can be applied as well.
This post presents creative examples and best practices for design of pull quotes. We’ve tried to identify some common solutions and interesting approaches you may want to use or develop further in your projects.

Read More and take a look at the sample quotes designs >>

Few Samples :

Quotes and indentation

Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote

Lines and indentation

Screenshot Pullquote

Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote

Quotations highlighted with a color

Screenshot Pullquote
Natalie Jost displays a random quote from the Bible on her blog
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote

Pull Quotes

Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote

Creative solutions

Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote

Quotations as a standalone element

Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote
Screenshot Pullquote

Saturday, May 7, 2011

Website Layout Examples - 10 Rock Solid

Three Boxes
screenshot
screenshot

3D Screenshotsscreenshotscreenshot

Advanced Grid

screenshotscreenshot

Featured Graphic

screenshotscreenshotscreenshot

Five Boxes
screenshotscreenshotscreenshot

Fixed Sidebar

screenshotscreenshot

Headline & Galleryscreenshotscreenshot

Featured Photo

screenshotscreenshot

Power Grid
screenshotscreenshotscreenshot

Full Screen Photo
screenshotscreenshot

http://designshack.co.uk/articles/layouts/10-rock-solid-website-layout-examples