Challenges with aligning CSS family tree due to varying name lengths

I initially utilized the experimental multi-parent version of the CSS3 Family Tree, which can be found at:

Presently, I am encountering some alignment discrepancies with multiple parents (partners in a family tree), primarily attributed to varying text lengths within the boxes. When two boxes contain text of equal length, they align properly; however, when the texts differ in length, the longer one appears higher and the height disparity is proportional to the difference in length.

In addition, individual children seem to drift off to the left instead of being centered as expected. EDIT: THIS ISSUE HAS BEEN RESOLVED

Examples can be viewed here: http://jsfiddle.net/7g7fz2tL/5/

* {
  margin: 0;
  padding: 0;
}

.tree ul {
  padding-top: 20px;
  position: relative;
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  transition: all 0.5s;
}

.
.
.(The code for CSS styling continues)
.
.

Would anyone have insights into what might be causing this issue and how it could potentially be rectified?

Answer №1

Correcting the vertical alignment issue.

http://codepen.io/xyz123/9/

.tree li a {
  height: 80px;
  width: 80px;
  vertical-align: top; /*THIS*/
}

Answer №2

To apply a CSS class to the great grandchildren elements and remove their float property, you can do the following:

ul li.great-grandchild {
    float: none;
}

For a live example, click here

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Apply design to a dynamically generated JavaScript id using Stylus

Currently, I am utilizing a jquery datepicker widget, and my goal is to customize the CSS for its input field. However, it seems that the id assigned to that field is dynamically generated upon page load: <input type="text" id="dp1382434269539" style= ...

Unseen components and columns with Bootstrap 4

I am attempting to hide a checkbox input in the middle of some column elements using Bootstrap 4. <div class="container"> <div class="row"> <a class="col-2"> 1 of 2 </a> <input type="checkbox" class="invisibl ...

Experiencing difficulties when attempting to access a relative URL in a Javascript xmlhttp object

Recently, I took on the task of managing an HTML/PHP/Javascript application that lacked proper directory structure; everything was crammed into one folder. My goal was to organize and modularize the files, so I decided to move them around. (*.inc files ...

What are some ways to optimize a range slider for touch screen usage?

I'm currently working on a small project and encountering an issue where the animation duration of an element needs to be changed using a range slider. The functionality works fine on desktop screens but doesn't seem to work on mobile devices. ...

Function call fails when parameters are passed

I've been grappling with this conundrum for a few weeks now, on and off. Perhaps someone else will spot the glaringly obvious thing that I seem to be overlooking. At the present moment, my primary goal is to simply confirm that the function is operat ...

JavaScript undefined error occurred during runtime

Greetings! I come from a background in VB6 and VB.Net, and I am currently delving into Bootstrap/MVC with C#. Please pardon my beginner queries as I journey through this new territory. I have searched on SO and watched YouTube tutorials, but I am still fin ...

Make sure to always retrieve the previous state in your React application

After researching and experimenting based on my previous inquiry, I have devised a solution to properly store the state: if (value === 'checkpoint') { if (checked1) { this.setState({checked1 : false}) localStorage.setObject('che ...

Is there a way to incorporate an 'ended' feature into the .animate() function?

I'm currently working on a jQuery statement where I want to activate pointer events once the button animation is finished. However, I'm unsure how to incorporate an ended or complete function. Any suggestions on how to approach this? $('#ce ...

Leveraging custom properties in HTML elements with JavaScript

I am in the process of creating a straightforward battleships game that utilizes a 10x10 table as the playing grid. My goal is to make it easy to adjust the boat length and number of boats, which is why I'm attempting to store data within the HTML obj ...

the optimal approach to determine character spacing in SCSS

I am currently working on an input field that is styled using CSS for digit entry. However, I am facing issues with the variations in character or digit width, causing them to misplace upon rendering. My project involves VUE and Laravel development, and I ...

Troubleshooting my PHP MSQL Update function in CRUD operations

Having trouble with the Update function when trying to implement CRUD on my website. Can anyone assist me? I can successfully Create, Read and Delete, but updating is giving me issues especially for Admin users. Below is the code snippet: <?php // Inc ...

How can I execute a function when ng-click is triggered on an <a> tag, and ensure it opens in a new tab?

I am facing an issue with an element in my code, which is as follows: <a ng-click="vm.openPage(page)">{{page.pageId}}</a> Within the vm.openPage() function, there are validations that need to be performed before redirecting to the page refere ...

How can I make a div using jQuery fade in when an input field is in

I want to create a tooltip that changes its innerHTML and fades in when an input on my form is focused. Additionally, I need to check if the tooltip has been faded in as it initially loads faded out. In essence, I am looking to switch the tooltip content ...

How can I customize the appearance of an iframe using CSS?

Simply put, I've uploaded a video to Google Drive that I want to embed on my website. The embed code I got from the shared-video page for the video is: <iframe src="https://drive.google.com/file/d/0B8DK7pele_HjWUR6Ym9KNFU5YTQ/preview" width="640" ...

Image proxy for Gmail

My html emails are ready to go, but I've encountered an issue where one of the png images won't display. Oddly enough, when I attempt to access the image through a proxy link, I receive a 404 error even though the image is accessible for public v ...

What's the difference in width between Inline-Block and Float?

HTML <ul> <li><a href="#">Item #1</a></li> <li><a href="#">Item #2</a></li> <li><a href="#">Item #3</a></li> <li><a href="#">Item #4</a></li> & ...

Using hover to show a block from a sibling parent step-by-step tutorial

My ScSS task involves displaying the block with the parent2 class when hovering over child 1 of the block with the parent1 class. <div classname="main"> <div className="parent1"> <span> Child 1 ...

Utilizing Vue's string-based class binding feature?

Can Vue class binding work with strings? For example: <div :class={open: target == 'myString'}></div> var app = new Vue({ target: null }) It works when I don't use quotes <div :class={open: target == myString}></div ...

The browser is not displaying the HTML correctly for the Polymer Paper-Menu component

I attempted to implement a paper-menu, but I am facing issues with the rendered HTML and its interaction. When I click on a menu item, the entire list disappears due to the paper-item elements not being properly placed inside a key div within the paper-men ...

How to create interactive SVG animations on hover

Currently, I have successfully animated an SVG file using the default svg functions like the following: <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 16 30" ...