background preloader

CSS Floats 101

CSS Floats 101
The float property is a valuable and powerful asset to any web designer/developer working with HTML and CSS. Tragically, it can also cause frustration and confusion if you don’t fully understand how it works. Article Continues Below Also, in the past, it’s been linked to some pretty nasty browser bugs so it’s normal to get nervous about using the float property in your CSS rule sets. Let’s calm those nerves and ease that frustration. I’ll show you exactly what the float property does to your elements and how incredibly useful it can be once you master it. We see floats in the print world every time we pick up a magazine article with an image on the left or right with text flowing nicely around it. The definition#section1 Let’s start with the definition of a float. A float is a box that is shifted to the left or right on the current line. The float property has four values that we can apply to it: left, right, inherit, and none. How floats behave#section2 Let’s look at a few more examples.

The Mystery Of The CSS Float Property Advertisement Years ago, when developers first started to make the transition to HTML layouts without tables, one CSS property that suddenly took on a very important role was the float property. The reason that the float property became so common was that, by default, block-level elements will not line up beside one another in a column-based format. The CSS float property allows a developer to incorporate table-like columns in an HTML layout without the use of tables. In this article, we’ll discuss exactly what the float property is and how it affects elements in particular contexts. Definition and Syntax The purpose of the CSS float property is, generally speaking, to push a block-level element to the left or right, taking it out of the flow in relation to other block elements. Flickr photo by presentday The effectiveness of using floats in multi-columned layouts was explained by Douglas Bowman in 2004 in his classic presentation No More Tables: No More Tables Syntax Float in Practice

Learn CSS Positioning in Ten Steps: position static relative absolute float 1. position:static The default positioning for all elements is position:static, which means the element is not positioned and occurs where it normally would in the document. Normally you wouldn't specify this unless you needed to override a positioning that had been previously set. 2. position:relative If you specify position:relative, then you can use top or bottom, and left or right to move the element relative to where it would normally occur in the document. Let's move div-1 down 20 pixels, and to the left 40 pixels: Notice the space where div-1 normally would have been if we had not moved it: now it is an empty space. It appears that position:relative is not very useful, but it will perform an important task later in this tutorial. 3. position:absolute When you specify position:absolute, the element is removed from the document and placed exactly where you tell it to go. Let's move div-1a to the top right of the page: What I really want is to position div-1a relative to div-1. Footnotes 10.

CSS Positioning 101 If you’re a front end developer or a designer who likes to code, CSS-based layouts are at the very core of your work. In what might be a refresher for some, or even an “a-ha!” for others, let’s look at the CSS position property to see how we can use it to create standards-compliant, table-free CSS layouts. Article Continues Below CSS positioning is often misunderstood. Sometimes, in a bug-fixing fury, we apply different position values to a given selector until we get one that works. The CSS specification offers us five position properties: static, relative, absolute, fixed, and inherit. Get with the flow#section1 First, let’s take a step back to recognize the world we’re working in. Boxes in the normal flow belong to a formatting context, which may be block or inline, but not both simultaneously. Think of a “box,” as described by the spec as a wooden block—not unlike the ones you played with as a young whippersnapper. Static and relative—nothing new here#section2 In action#section6

Branding, Identity & Logo Design Explained A logo is not your brand, nor is it your identity. Logo design, identity design and branding all have different roles, that together, form a perceived image for a business or product. There has been some recent discussion on the web about this topic, about your logo not being your brand. What is brand? To explain this in more detail, let’s start at the top – the brand. What is branding? Branding is certainly not a light topic – whole publications & hundreds of books have been written on the topic, however to put it in a nutshell you could describe a ‘brand’ as an organisation, service or product with a ‘personality’ that is shaped by the perceptions of the audience. Many people believe a brand only consists of a few elements – some colours, some fonts, a logo, a slogan and maybe some music added in too. It is the consistency of this core idea that makes up the company, driving it, showing what it stands for, what it believes in and why they exist. What is identity design? What is a logo?

What is Vertical Align? CSS has a property called vertical align. It can be a bit confusing when you first learn about it, so I thought we could go through it's use a little bit. The basic usage is like this: Notice in this usage case, it is being applied to the img element. The valid values are: baseline, sub, super, top, text-top, middle, bottom, text-bottom, length, or a value in percentage. The confusion, in my opinion, sets in when people try to use vertical-align on block level elements and get no results. Baseline The default value of vertical-align (if you declare nothing), is baseline. Middle Perhaps the most common use for vertical-align is setting it to 'middle' on icon-size images. The browser does the best job it can centering the pixel height of the text with the pixel height of the image: Be aware that if the image is larger than the current font-size and line-height, it will push the following lines down if need be: Text-bottom Text-top Top & Bottom Sub & Super Vertical Align on Table Cells Share On

Choosing a Grid System This entry is part 13 of 13 in the Design School for Developers Session - Show All « Previous In the previous article , I introduced you to grid systems. With any luck, by now, you should have a good understanding of what they are and why they’re a good weapon to have in your design arsenal. Today, I’m going to explain about choosing a grid system – from creating your own, to working with pre-made CSS frameworks. By the end of this article, you’ll have a good idea of the way you might like to walk your path with grid systems – and hopefully feel confident enough to do so. Our Choices Let’s begin by narrowing things down. Framework or D.I.Y.? We have two choices before us: do we go with a pre-made framework that somebody else has already built, or do we create our own grid system and work with that? I would always recommend that if you’re just starting out with designing for the web, then it may be more beneficial for you to start designing with pre-made frameworks. Pre-Made Frameworks D.I.Y.

All About Grid Systems – Web Design – Tuts+ Tutorials Now you know all about colour, typography and various things you should undertake before you start a design project, it’s time to start getting down and dirty with some of the basics of working with grids in your designs. Grids enable you to build solid structure and form into your designs. Much like we looked at typographic hierarchies and rhythm, we can effectuate the same feelings through using a grid structure. Just as with coding, there are recommended ways to organise modules and sections of code, and a grid system can help similarly when designing for the web. Grids aren’t just useful for us as designers or developers - they’re good for the user, too. If your website is well designed, a grid will help you to project that confidence further to your users - however consciously or sub-consciously that projection may be. What is a Grid System? ..a structure comprising a series of horizontal and vertical lines, used to arrange content. Advantages of Using Grid Systems Assignments

Add in PackDog to link Emily Shields 10 Completely Free Wireframe and Mockup Applications Every web designer and developer should have a good and reliable wireframe (mockup or prototype) tool at there disposal. The importance of such a tool differentiates amongst web designers and developers, some use them, some don’t. Personally, I use them. It is in this initial stage of development that makes web design enjoyable, the coming together of the clients needs and your own creative ideas onto a blank canvas, allowing you to plan effectively the visual arrangement of the sites content. The downside is that a good and reliable wireframe application can come at a heavy price, have you seen the cost of a good wireframe application? So, what options do you have? Please note that this post really old, so some of the below apps may not longer be free or available. Hot Gloo – The Online Wireframe App HotGloo is an easy to use and intuitive Flash built web-based wireframe app, that can create conceptual interactive prototypes of a website in the early development stages. Pencil Project

Related: