Solved

CSS floats, how can I get these to line up (ie left float up a bit) when the left/right column is bigger thatn its neighbour

Posted on 2014-11-13
5
109 Views
Last Modified: 2014-11-14
I have a list of links which fit together nicely but when some are bigger they obviously increase the min-height of the others and drop the next floated item down.

original
Is there any way I can get any that wrap over and leave a gap to "shift upwards" to keep everything neat? a bit like this...

required
0
Comment
Question by:Neil Thompson
5 Comments
 
LVL 18

Accepted Solution

by:
Greg Alexander earned 500 total points
ID: 40441384
0
 
LVL 18

Expert Comment

by:Greg Alexander
ID: 40441388
Or you could just run the items down two independent columns.
0
 
LVL 9

Expert Comment

by:Brandon Lyon
ID: 40441583
Depending on your required browser support you can:

Use javascript as the previous poster mentioned
Use  HTML tables
Try some of the new CSS3 features like column layouts : How to use CSS3 columns
0
 
LVL 33

Expert Comment

by:Slick812
ID: 40441607
According to the developers for the firefox browser, you should NOT use the CSS float as a method to to allow non concerned alignment, you may find that using the  CSS  display:inline-block;  gives a more correct relative positioning, however as all browser output, there will still be alignment PER LINE, the display shown in your second PNG image, does not have a PER LINE alignment, so a two column approach, as galexander07 suggested, might be the way to get that visual display.

Can you show us the HTML and CSS you use for your output, then we can have a better idea of what to do for a better end result.
0
 
LVL 3

Author Closing Comment

by:Neil Thompson
ID: 40442313
Thanks all for your comments, this one will suit my needs best :)
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now