• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

A Bit of CSS Help

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › A Bit of CSS Help

This topic is: resolved

Tagged: align, css, float, position

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 7 months ago by Porter.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • August 2, 2014 at 8:21 pm #116781
    Porter
    Participant

    Hey everyone, I'm trying to get some content aligned a certain way, but my css knowledge is somewhat limited (I prefer the logical languages, such as php 😀 ).

    Take a look here - http://anightinburlington.com/bars

    I'm trying to have the following:

    -Image to left
    -Bar title to the right of the image, float left.
    -Icon that says which city the bar belongs to, just to the right of the title (and vertically centered with the title text).
    -Description below the title, with the same float left as the title.

    I've got everything to work without the icon, but as soon as I try to get that in there the text also joins the icon, rather than staying below. I'm sure the solution is simple, like I said, I'm just not good with css / do more guess work than anything. Here's my current code (needs cleaning up).

    .post_thumbnail {
    	float: left;
        padding: 6px;
        background: #111;
        border: 1px solid #333;
        margin: 0px 24px 10px 0px;
    }
    
    .full-width-post {
    	padding-bottom: 12px;
    	float: left;
    }
    
    .directory-title {
    	float: left;
    }
    
    .city-icon {
    	float: left;
    }
    
    .directory-entry {
    	text-align: justify;
    	line-height: 20px;
    	padding-top: 8px;
    	font-size: 20px;
    }
    
    .directory-wrapper {
    	padding: 40px 0px;
    }

    Feel free to minimize the number of classes, or change anything there. Part of it is copied from an old theme, the rest is me guessing at how to get this working.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    http://anightinburlington.com/bars
    August 2, 2014 at 9:53 pm #116787
    Genesis Developer
    Member

    Try this CSS once

    .directory-title {
        display: inline-block;
        margin-right: 10px;
    }
    .city-icon {
        display: inline-block;
        float: right;
    }
    
    .directory-entry {
        font-size: 20px;
        line-height: 20px;
        overflow: hidden;
        padding-top: 8px;
        text-align: justify;
    }

    Hope that this will help you. Good Luck & HAPPY WEEKEND!!


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    August 3, 2014 at 7:33 am #116848
    Porter
    Participant

    Everything worked perfectly except for the float: right on .city-icon. I tried left, didn't work, got rid of float all together, works perfectly - many thanks!


    Buy me a beer? | Try DigitalOcean VPS Hosting

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘A Bit of CSS Help’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble