NeedFul (+/-)

Useful sites or...

25-August-2010 by Daniel

웹마스터에게 필요한 기본적인 사이트, 도구 모...

전세계 브라우저 ...

14-August-2010 by Daniel

전세계인의 브라우저 사용률을 보기 쉽게 그래프...

Bolg (+/-)

나의 사이트에서 ...

26-September-2010 by Daniel

Your info message goes here! Your tips goe...

슬라이딩 웹진 위...

25-August-2010 by Daniel

새로운 위젯스킨을 만들어 보았다. 예전에 만들...

<?xml version="1.0" encoding="utf-8"?>
<!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" xml:lang="en-us">
<head>
    <title>Vertical Align JQuery Plugin</title>
<script src="http://jquery.com/src/jquery.js"></script>
<script type="text/javascript">
(function ($) {
$.fn.vAlign = function() {
    return this.each(function(i){
    var h = $(this).height();
    var oh = $(this).outerHeight();
    var mt = (h + (oh - h)) / 2;    
    $(this).css("margin-top", "-" + mt + "px");    
    $(this).css("top", "50%");
    $(this).css("position", "absolute");    
    });    
};
})(jQuery);

(function ($) {
$.fn.hAlign = function() {
    return this.each(function(i){
    var w = $(this).width();
    var ow = $(this).outerWidth();    
    var ml = (w + (ow - w)) / 2;    
    $(this).css("margin-left", "-" + ml + "px");
    $(this).css("left", "50%");
    $(this).css("position", "absolute");
    });
};
})(jQuery);

$(document).ready(function() {
    $("#content").vAlign();
    $("#content").hAlign();
});
</script>

<style type="text/css">
html { background: #fafafa; }

#content
{
background: #fff;
border: 10px solid #eee;
padding: 20px;
color: #666;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 25px;
text-align: justify;
}

#content { width: 400px; }
</style>
</head>

<body>
<div id="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu dui eget nulla condimentum gravida. Vivamus erat leo, ultricies quis, gravida a, fringilla eu, urna. Pellentesque a mauris ac nisl semper egestas. Pellentesque ut elit in pede mattis gravida. Donec ac lectus a nisi suscipit placerat. Maecenas quis ipsum. Pellentesque mattis tellus. Suspendisse sollicitudin accumsan tortor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed metus. Quisque et leo at erat rutrum lobortis. In tempus lectus eget ligula convallis tristique.
</div>
</body>
</html>
Share
profile

Think twice before you speak,
then say it to yourself first.

태그
엮인글 :
http://www.webmake.ca/index.php?document_srl=1520&act=trackback&key=4a3
문서 첨부 제한 : 10.00MB (2.00MB/*.*)
문서 첨부 제한 : 0Byte/ 10.00MB
파일 제한 크기 : 2.00MB (허용 확장자 : *.*)
List of Articles
번호 제목 글쓴이 날짜
48 Others Easily change webfont your site. (Use google webfonts your site) Daniel 2011-04-02
47 Others How to Activate Windows XP Without a Genuine Product Key file Daniel 2010-12-04
46 Others How To Put Picture In Front Of Flash Movie Daniel 2010-11-17
45 HTAccess Leverage browser caching Daniel 2010-10-11
44 XpressEngine 게시판 내용하단 기본형태를 원하는 형태로 바꾸기 Daniel 2010-10-06
43 HTML Get Directions Form (Google Maps) Daniel 2010-10-01
42 CSS Basic Link Rollover as CSS Sprite image Daniel 2010-10-01
41 HTML The Common DOCTYPES Daniel 2010-10-01
40 HTML Make IE6 Crash Daniel 2010-10-01
39 JavaScript “Go Back” Button Daniel 2010-10-01
38 HTAccess Custom Error Pages Daniel 2010-10-01
37 HTAccess Set Expires Daniel 2010-10-01
36 HTAccess WWW / No-WWW Daniel 2010-10-01
35 CSS 웹 폰트 Daniel 2010-09-23
34 JavaScript Popup Code Daniel 2010-08-25
33 XpressEngine 닉네임 길이 제한방법 Daniel 2010-08-25
32 XpressEngine 확장변수의 textarea에 Html 태그 사용 Daniel 2010-08-25
31 XpressEngine 게시판내 링크 색상과 확장변수 url 색상 바꾸기 Daniel 2010-08-25
30 XpressEngine 회원가입시 원하는 레이아웃에서 나타나게 하기 Daniel 2010-08-25
29 XpressEngine 내용값을 입력하지 않아도 글작성이 되게 하는 법 Daniel 2010-08-25
28 XpressEngine 댓글 프로필 이미지 사이즈 줄이기 Daniel 2010-08-25
27 CSS CSS Menu with a image file Daniel 2010-08-24
26 JQuery Simple Drop Down Menu Daniel 2010-08-24
25 CSS IE Double Margin Float Bug Daniel 2010-08-23
24 JavaScript IE CSS - Conditional Daniel 2010-08-23
23 CSS Simple Scalable CSS Based Breadcrumbs Daniel 2010-08-23
» JQuery Vertical Align JQuery Plugin Daniel 2010-08-23
21 CSS Font Family List Daniel 2010-08-23
20 JavaScript Popup Center Daniel 2010-08-23
19 CSS IE6 Fixed Position Fix Daniel 2010-08-23

A Little Something About Me

아직 완성되지 않은 웹사이트입니다.
어쩌면 결코 완성되지 못할 웹사이트가 될수도 있읍니다.

소개