• I don’t know why this is such a problem but I am unable to center an image in my text widget, along with a text link aligned up right underneath it I’ve tired <center> body of codes</center> but why wont my image center in the text widget, also the image is html coding (img src=”)
    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I think this will work ok in a text widget.

    <div style="text-align:center;"><img src="yoursource" /></div>

    <p style="text-align:center;">Your text here</p>

    Thread Starter mjc21

    (@mjc21)

    I just tried it, but still will not center the image in the text widget, I don’t know why this is so difficult.

    very strange. a link to your site where the image can be viewed?

    Thread Starter mjc21

    (@mjc21)

    https://thesportsweekly.com (its the only image on the side)

    It’s centered. Your image is just wider than the sidebar/widget. Your sidebar div is only 260px wide. The text widget fits inside that, then the image fits inside the widget, but your image is 280px wide. See the problem?

    Take 100px off both the height and the width and you will see what I mean.

    Thread Starter mjc21

    (@mjc21)

    okay, so what you’re saying, is the image needs to be smaller in width and height?

    Yes. 170 x 200 looks like the largest size that remains proportionate and still gives you a couple px of padding on either side of the image.

    Try this and see if it looks any better.

    <div style="text-align: center;">
    <a href="https://affsrv.stubhub.com/cc/sports-tickets/0/3668721/10651932"><img height="170" border="0" width="200" alt="Get The Best Sports Tickets at StubHub!" stubhub!="" at="" tickets="" sports="" best="" the="" get="" src="https://affsrv.stubhub.com/ca/regular-season-nfl-tickets/182/3668721/10652264' height='1' width='1' alt="/></a><br />
    <a style="font-family: verdana; font-size: xx-small;" href="https://affsrv.stubhub.com/cc/sports-tickets/0/3668721/10651932">Get The Best Sports Tickets at StubHub!</a>
    </div>

    Thread Starter mjc21

    (@mjc21)

    Alright, yeah looks good… Thanks man appreciate your help, took me forever lol Thanks

    You’re welcome.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘centering images in widgets’ is closed to new replies.