WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] twentyeleven child: footer text left and right formats differently (6 posts)

  1. kubegusa
    Member
    Posted 1 year ago #

    Hi

    I have a twentyeleven child theme - here http://bric-consultancy.com/

    I want to have the signature in the footer (#site-generator) in 2 parts, aligned left and aligned right. This is the code I have in the footer.php:

    <footer id="colophon" role="contentinfo">
    
    			<div id="site-info">
    
    				<?php do_action( 'twentyeleven_credits' ); ?>
    
    				<a href="<?php echo esc_url( __( 'http://www.bric-consultancy.com/', '' ) ); ?>" title="<?php esc_attr_e( 'BRIC Consultancy', '' ); ?>" rel="generator"><?php printf( __( '© 2012 BRIC Consultancy |', '' ), 'BRIC Consultancy' ); ?></a> <a href="mailto:info@bric-consultancy.com" style="color:#F2DA8E">info@bric-consultancy.com</a>
    
    			</div>
    
    			<div id="site-generator">
    				<?php do_action( 'twentyeleven_credits' ); ?>
    
    				<a href="<?php echo esc_url( __( 'http://www.sparklynx.be/', '' ) ); ?>" title="<?php esc_attr_e( 'Sparklynx', '' ); ?>" rel="generator"><?php printf( __( 'development & design:', '' ), 'development & design:' ); ?></a> <a href="http://www.sparklynx.be" style="color:#F2DA8E">Sparklynx</a>
    			</div>
    
    	</footer>

    but I can't seem to figure out how to get both the #site-generator and the #site-info to be formatted the same way completely. What is not working is to get the text on the left to underline as you hover over it, like the text on the right. I suspect it has to do with the fact that I added a new element #site-info
    I've searched for this for days... Any pointers would be much appreciated! Thanks.

    [Also, for the experts: when you look at this site, would you say it would be more worth it to just create a theme from scratch by converting html to WP, or would customizing Twentyeleven still be more efficient and faster in your opinion? I'm hesitating to teach myself to create new themes but not sure how complicated it will be to learn compared to fiddling with child themes. Thanks for any advice!]

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    There is styling set that specifically counters the default underline [screenshot]. Override that.

  3. kubegusa
    Member
    Posted 1 year ago #

    Thanks for the feedback!

    I was searching in that directino too, but the text on the right (#site-generator) has the same styling and does not have the problem...
    Also, to 'override' that, I've been looking in the twentyeleven style.css where the formatting of hyperlinks is defined, I've also tried to use chrome dev tools to find more info on where the styling came from - to no avail so far. Any other ideas?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    I don't understand your dilemma. Surely you've been making new styles in your Child Theme stylesheet instead of modifying the theme's original stylesheet?
    There's no need to look for where the style originates, all you need to do is override it in your Child Theme style.css file.

    Are you wondering what CSS overrides it?

  5. kubegusa
    Member
    Posted 1 year ago #

    Ok made it work.
    I was indeed focused on the logics rather than just making it work. I still don't understand why the left text behaved differently than the right text, since they both had the default formatting from the parent css. But by just tuning the child css and footer.php, it's all happening now. Thanks for your feedback, I really appreciate it!

    This is the child css code now for the footer.php

    <div id="site-info">
    
    				<?php do_action( 'twentyeleven_credits' ); ?>
    
    				<a href="<?php echo esc_url( __( 'http://www.bric-consultancy.com/', '' ) ); ?>" title="<?php esc_attr_e( 'BRIC Consultancy', '' ); ?>" rel="generator"><?php printf( __( '© 2012 BRIC Consultancy |', '' ), 'BRIC Consultancy' ); ?></a> <a href="mailto:info@bric-consultancy.com" style="color:#F2DA8E"	>info@bric-consultancy.com</a>
    
    			</div>
    
    			<div id="site-generator">
    				<?php do_action( 'twentyeleven_credits' ); ?>
    
    				<a style="text-decoration: none" href="<?php echo esc_url( __( 'http://www.sparklynx.be/', '' ) ); ?>" title="<?php esc_attr_e( 'Sparklynx', '' ); ?>" rel="generator"><?php printf( __( 'development & design:', '' ), 'development & design:' ); ?></a> <a href="http://www.sparklynx.be" style="color:#F2DA8E">Sparklynx</a>
    			</div>

    and I removed the text-decoration from the child css

    #site-info a {color: #FFFFFF;
    }
  6. kubegusa
    Member
    Posted 1 year ago #

    *they had the SAME default formatting, I meant to say

Topic Closed

This topic has been closed to new replies.

About this Topic