Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6003239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:05:36+00:00 2026-05-23T01:05:36+00:00

I have the following html (inside ASP.NET Repeater): <div class=team_member> <a class=teamMemberLink href='<%# Profile.aspx?uID=

  • 0

I have the following html (inside ASP.NET Repeater):

<div class="team_member">
    <a class="teamMemberLink" href='<%# "Profile.aspx?uID=" + Eval("ID") %>' target="_blank"><%# Eval("Name")%></a> 
    <asp:Image ID="teamMemberProfileImage" CssClass="teamMemberImg" runat="server" ImageUrl='<%# "ImageHandler.ashx?id=" + Eval("ID") %>' />                                      
    <input id="rateTeamMember" class="teamMemberRating" type="button" value="" runat="server" />
    <input id="teamMemberID" type="hidden" value='<%# Eval("ID") %>' />
</div>

My problem is that I need the anchor’s text to be exactly above the picture and at the middle.

Because the anchor’s text is not a fixed length, how can I accomplish this when my image width is 96px?

How can I get the width in pixels of the anchor’s text?
If I would know it, I could position it using jQuery (setting the ‘left’ property, because i’m using ‘position:relative’).

EDIT – my css code:

.team_member { float: left; margin-left: 10%; margin-top: 10%; text-align:center; }
.teamMemberLink { float: left; clear: left; position: relative; top: -20px; }
.teamMemberImg { width: 96px; height: 96px; float: left; border: 1px solid #d1c7ac; }
.teamMemberRating { float: left; }

Thanks a lot 🙂

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:05:37+00:00Added an answer on May 23, 2026 at 1:05 am

    The problem is, you have far too many unessential floats. I would change the CSS to the following:

    .team_member { 
        float: left; 
        margin-left: 10%; 
        margin-top: 10%; 
        text-align:center; 
        width:96px; 
     }
    .teamMemberLink { display:block; }
    .teamMemberImg { 
        display:block; 
        width: 96px; 
        height: 96px; 
        border: 1px solid #d1c7ac; 
    }
    .teamMemberRating { display:block; }
    

    Basically, to remain < IE8 compatible, the ‘floating’ team-member should really have a width set.

    Setting float:left; on .teamMemberLink was breaking the alignment due to the float. I also removed a lot of uneeded floats from the CSS.

    JS Fiddle here:

    http://jsfiddle.net/NuSHQ/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Inside my aspx file, I have the following html code inside an repeater: <div
I have the following html inside a <div> : <span class=footer-icons> <a href=#; class=facebook
I have the following html : <div class=mainmenu> <ul class=blue> <li class=><a href=tst/ id=a1_up><span
I have the following HTML code inside a div: <a href=http://www.mysql.com> <img src=images/php-power-micro2.png alt=Image
I have the following html structure: <div class=divClass> <a class=aClass href=#> <img src=xxxx.jpg <span
I have the following code: <div id=parentDiv> <a href=someurl> ... </a> </div> HTML inside
I have following HTML: <div class=olympics style=display: block; position: absolute; left: 250px; top: px;>
I have the following HTML <div class=myclass value=1> <div> <div class=myclass value=> <a class=popup
I have the following bit of HTML <div class=article>this is a div article content</div>
I have following HTML markup, <div id=subcontent_l> <p> <a href=/membership-packages/><img height=202 width=644 alt= src=http://74.52.72.231/wp-content/uploads/2010/06/banner1.jpg

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.