Categories
python

Example of Python code – triangle star pattern

Python program description

Build a right angled triangle star pattern in Python Programming language.

Example source code

for i in range(1, 6):
    for j in range(1, i+1):
        print('*', end= " ")
    print ()

Output of program

* 
* * 
* * * 
* * * * 
* * * * * 

শেয়ার বাজারে ট্রেডিং শেখার বই : শেয়ার ট্রেডিং ক্যান্ডেলস্টিক চার্ট ও টেকনিক্যাল অ্যানালিসিস – বিক্রম চৌধুরীর লেখা ৩০০ পাতার বই।

Categories
CSS-Tutorial

Absolute Positioning in CSS – Learn CSS positioning

What is “position:absolute” in CSS ? To learn absolute positioning CSS property you must understand block level & inline elements, normal flow concept of CSS. You must know normal flow first, then learn absolute position concept.


Box model, Normal Flow > Absolute positioning


Absolute Positioning Explained

  1. An absolutely positioned element is removed from the normal flow. This positioning scheme applies to any element that has its position porperty absolute or fixed.
  2. This means you can put it anywhere, and it won’t affect or be affected by any other element in the flow.
  3. Normally absolutely positioned elements are positioned by the top and left property assigned to them.
  4. This top and left works with respect to the container block of this absolutely positioned element. This top and left are called offset positions.
  5. Absolute positioning always works w.r.t the container block of this absolutely positioned element.
  6. Absolute elements create a new coordinate system for child elements inside them.
  7. This is an exellent property of ABSOLUTE POSITIONING : Use all four offset properties (TOP, LEFT, BOTTOM, RIGHT), and you can stretch an element without defining any width or height—it’s bound only by its parent element or the document itself if there is no container.
Categories
CSS-Tutorial

Box model, inline & block elements & normal flow

Learn CSS box model first if you want to learn web designing, because all the HTML elements are either inline or block level elements. When we say a <p> tag (Paragraph element) or DIV tag (DIV element) or Hyperlink (anchor tag <a>), then we always refer to these HTML elements’ box model.

Categories
CSS-Tutorial

Centering text using CSS, Center inline & block DIV elements

Inline & Block elements >> Centering HTML elements

In this article I have describe which HTML elements are inline elements and which are block level HTML5 elements. How to center inline elements inside a container DIV or block level elements.

Centering text & inline elements

IMG, STRONG, SPAN elements in a webpage are examples of inline elements. Alos I have used the term inline content, which means inline elements. Inline content includes such things as text, images, <strong> and <span> tags. Now we need to center inline content inside a block element (Normally Inline elements resides inside a BLOCK element like DIV, H1 etc)

Just use text-align property applied to the next higher level block level container with the content to be aligned inside.

Categories
CSS-Tutorial

CSS Tutorial on Two column DIV layout problem where container DIV collapses

Here container DIV has two child DIVs. Container DIV is relatively positioned. After container DIV a footer DIV BOX exists which also relatively positioned. Inside container DIV there exists two column DIVs which are absolutely positioned. Left colummn is of 60% width of container and right column is of 30% width.

Categories
CSS-Tutorial

CSS circles – draw concentric Circles using CSS3

This is a CSS tutorial to draw concentric circles using pure CSS. Here Web Developer Mr Choudhury shown with free source code examples, the easiest ways to draw CSS circles & concentric circles with the help of pure CSS. Here DIV represent each circle having border-radius:50%;.

About this tutorial & author : Also Mr. Choudhury shown the formula, and he described and explained here developed by the renowned CSS layout expert and css template designer for web page layouts.

Categories
CSS-Tutorial

Vertical centering using CSS- when child DIV placed in a ‘container DIV of fixed height’

Vertically center a DIV inside a container DIV element. The container can be relatively positioned. The child DIV should be absolutely positioned and its top, right, bottom, and left offset properties specify the element’s position w.r.t the container block (what the element is positioned relative to) and this value should be 0. So now use these properties to vertically center a DIV inside a container DIV element.

Categories
CSS-Tutorial

Vertical Centering Problem found in IE9 for side by side two DIVs

Vertical Centering Problem found in IE9 when two DIV elements placed side by side. A tutorial by Bikram Choudhury, Web Design Tutor, Kolkata.

Categories
CSS-Tutorial

When container DIV collapses having multiple child DIV inside it

When container DIV collapses having multiple child DIV inside it. Here you will get a case study when container DIV has two child divs side by side they appears inside container DIV. Child DIVs are absolutely positioned inside a container DIV which is relatively positioned. Also know how to recover from the problem.

Categories
CSS-Tutorial

Create horizontal navigation menu with drop down submenu CSS tutorial

You will be able to create a top level horizontal navigation menu which may or may not have sub-menus. This type of menus sometimes called as NAV menu or suckerfish menu… when you will mouse over on them, then sub menu will be shown (if that menu item has sub level menu).