December 31, 201114 yr Hello, Could someone please advise me what i could do.. What i would like to do is move the line bellow the image (see attachment). The reason why I can just add break tags, is because for every 'author' the paragraph will be diffrent, and i don't want to push the line to far down.. Live Example My CSS is... #author-bio { border-top: 1px dotted #cccccc; border-bottom: 1px dotted #cccccc; padding: 15px 0; } #author-bio h3 { font-size: 18px; margin: 0 0 10px 0; } #author-bio h4 { font-size: 14px; margin: 0 0 3px 0; } #author-bio img { float: left; width: 75px; height: 75px; padding: 2px; border: 1px solid #cccccc; margin: 5px 15px 0 0; } The php code... <div id="author-bio"> <h3>About The Author</h3> <?php echo get_avatar(get_the_author_id(), 48); ?> <h4><?php the_author(); ?></h4> <?php the_author_description(); ?> </div><!--end author-bio--> Edited December 31, 201114 yr by JackDanielTracy
December 31, 201114 yr #author-bio { border-top: 1px dotted #cccccc; border-bottom: 1px dotted #cccccc; /*delete this line*/ padding: 15px 0; }
January 1, 201214 yr Author #author-bio { border-top: 1px dotted #cccccc; border-bottom: 1px dotted #cccccc; /*delete this line*/ padding: 15px 0; } Won't that deleate the line completely? I want to keep it..
January 1, 201214 yr Author i think u got it fixed? Nope:( It was just because I was using a diffrent author, who had a longer bio... Check now..
January 1, 201214 yr <div id="author-bio"> <h3>About The Author...</h3> <img src="as_files/70000000.jpg" alt="ChloeF" width="64" height="80" class="photo"> <h4>ChloeF</h4> Chloe Field is aged 16 currently doing her Silver award (completed Bronze). Chloe’s favourite part of DofE is the volunteering aspect, and during her free time she enjoys to dance and cook. <div class="au_bio"></div> </div><!--end author-bio--> add this in css div.au_bio{border-bottom: 1px dotted #cccccc;width:100%x;clear:both;margin:10px 0 0 0;height:10px; } <div id="author-bio"> <h3>About The Author</h3> <?php echo get_avatar(get_the_author_id(), 48); ?> <h4><?php the_author(); ?></h4> <?php the_author_description(); ?> <div class="au_bio"></div> </div><!--end author-bio--> Edited January 1, 201214 yr by sash_oo7
January 1, 201214 yr Nope:( It was just because I was using a diffrent author, who had a longer bio... Check now.. You are getting the line mid-way because the image you used it floated left. You can set a min-height attribute and mimic it with Javascript in IE. BTW, you have a good WordPress theme. Do you have it on the WordPress Theme Directory?
January 1, 201214 yr Author You are getting the line mid-way because the image you used it floated left. You can set a min-height attribute and mimic it with Javascript in IE. BTW, you have a good WordPress theme. Do you have it on the WordPress Theme Directory? Thanks, the min-height tag worked fine.
January 4, 201214 yr It's always good practice to clear your floats (that includes floating images). In this case it will work better than the min-height attribute. What you need to do is add a clearfix element before the closing of your parent container. Heres how: HTML: <div id="author-bio"> <h3>About The Author</h3> <?php echo get_avatar(get_the_author_id(), 48); ?> <h4><?php the_author(); ?></h4> <?php the_author_description(); ?> <br class="clearfix"/> </div><!--end author-bio--> CSS: br.clearfix { clear:both; display:block; height:1px; margin:-1px 0 0 0; }
Create an account or sign in to comment