Title: Flexbox doesnt recognize second element
Last modified: June 7, 2019

---

# Flexbox doesnt recognize second element

 *  Resolved [alextmfk](https://wordpress.org/support/users/alextmfk/)
 * (@alextmfk)
 * [7 years ago](https://wordpress.org/support/topic/flexbox-doesnt-recognize-second-element/)
 * Hello there!
 * Sorry, this is a css-question, not really wordpress related
    but I couldn’t find
   a good css-forum… So Im new to flexbox and trying to realise a simple layout,
   where my list of articles begins under my slider, but the second element (my 
   list of articles) seems to not be a direct child of my flex although in the html
   its just the slider and the articles each in their own div and the whole thing
   inside my flex-div
 * Here’s the html:
 *     ```
       <div class="lay-main" >
   
       		 	<div class="myslider">
               	<?php get_template_part('template-parts/content/content', 'slider' ); ?>
            		</div>	
   
       		 	<div class="article-excerpt">
       		 	<?php get_template_part('template-parts/content/content', 'short-article' ); ?> 
            		</div>
       		 </div>
       ```
   
 * and here’s the css:
 *     ```
       .lay-main{
       	display: flex;
       	flex-direction: column;
       	justify-content: flex-start;
       }
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fflexbox-doesnt-recognize-second-element%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Stef](https://wordpress.org/support/users/serafinnyc/)
 * (@serafinnyc)
 * [7 years ago](https://wordpress.org/support/topic/flexbox-doesnt-recognize-second-element/#post-11615559)
 * The best place to learn flex css is [here](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)
 * Anything you want to know about CSS in general is there.

Viewing 1 replies (of 1 total)

The topic ‘Flexbox doesnt recognize second element’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [flexbox](https://wordpress.org/support/topic-tag/flexbox/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Stef](https://wordpress.org/support/users/serafinnyc/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/flexbox-doesnt-recognize-second-element/#post-11615559)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
