Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Way to align our layout (easy)

Featured Replies

Hi there, I was working with some website designers and I figure out that plenty of them are still positioning with tables, perhaps it works but it is too much confusing for who does it or who read's it...

I used to use floats, left, right and both or positioning absolute, but I realized another way to do and perhaps it is a well-known technique but I want to share here for who doesn't know, and I'll give an example..

Just align using the css property "display: block-inline", that property just turns a block element to inline, now the example...

<div style="width:120px; height:200px; background-color:#f00"> This is a block div </div>
<div style="width:120px; height:200px; background-color:##313131"> this is another div </div>


In this example we didn't used any position property so the div's still one above the other, and still in the format of block,

if we use in the css the property of "display:block-inline" in both div's we transform them into inline element so it would be like one next to the other, who didn't know, just try it, it's simple, fast and easy to use.

Thanks for the attention and I hope u understood me, I'm not english...

Inline-block is used in most modern frameworks, I've been using it for ages and I'm so glad I've ditched the whole float: left; crap when possible.

 

Also:

 

<div> Is a block element (display:block;).

<span> Is an inline element (display:inline-block). It is in between inline and block so it can have margins and padding, but semantically should not have block elements inside. Although the element can be placed inline with items, it isn't display:inline; by default.

 

<div>

<span></span>

</div>

 

<span>

<div></div>

</span>

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.