Sign in to your account



This field is required


forgot your password?


New to the site? Create an account →

Floating is different than alignment

tcr! · Jun 22, 2015 at 1:40 pm

Below is a screenshot of some CSS code I stumbled on a few hours ago:

floating is different than alignment

When I saw it, I just wanted to smack the nearest “hacker” with a keyboard.

Floating elements have text content wrapped around it and then alignment is to control the text direction for the whole element. So you float an image left or right and then have the text wrap around the image. Or you center align your text or left align it.

See better examples on CSS-Tricks: float and text-align.

This may be semantics but when you’re writing code other people are going to deal with, using proper and meaningful naming conventions can save them hours of time.

#devhell #webdev

Add a comment

It’d be better if you signed in before commenting


Post



Latest articles for #webdev

JSON Feed for the Podcast

JSON Feed for the Podcast

Dec 17, 2018 at 8:42 am

And then I finally got around to adding a JSON Feed for the Podcast…

Mapped podcast listener locations

Mapped podcast listener locations

Dec 3, 2018 at 2:12 pm

A few months back I started keeping track of where my podcast…

JSON Feed for the Blog

JSON Feed for the Blog

Nov 29, 2018 at 10:57 am

I finally got around to adding a JSON Feed for the Blog. Because that’s…

tcr! diaries podcast survey

tcr! diaries podcast survey

Aug 24, 2018 at 8:47 am

I’m interrupting the regularly scheduled episodes to announce a…