10 replies
  • WEB DESIGN
  • |
Hi all struggling with HTML code with WordPress i would like to float text hyperlink with left right center option can anyone please help with code required.
#align #hyperlink
  • Profile picture of the author ronc0011
    Can you show the code you're using. and the code for the element where the hyperlink is nested. Well if it's inside of a Wordpress element i.e. text widget or inside of a post then it's just a matter of giving it a float i.e. float:left; and any margins that you may need.
    {{ DiscussionBoard.errors[6630578].message }}
  • Profile picture of the author BillyW
    You could also use <span> element.

    Example would be: <span align="center"> Here is where your hyperlink would be </span>
    Signature
    Qosso.com - Exceptional Branding At Affordable Prices
    {{ DiscussionBoard.errors[6630813].message }}
    • Profile picture of the author scrapcar
      This is the code i am using at the moment its just sitting in the left corner of my footer would like to align it center. </div><a href="http://www.scrapcarslegally.co.uk/privacy-policy" target="_blank">Privacy Policy</a><br />
      Signature

      {{ DiscussionBoard.errors[6631033].message }}
      • Profile picture of the author ronc0011
        You might try this, when you apply margins left and right use equal values and the element should center itself However you might have to tweak the values to fine tune it. I find that this method isn't always predictable but it does work. I used to give them a value of auto and for some reason that stopped working ... Who knows? go figure.

        So anyway try this. It should work


        Code:
         
        <ahref="http://www.scrapcarslegally.co.uk/privacy-policy"target="_blank"style="float:left; margin-left:400px; margin-right:400px;">Privacy Policy</a>
        




        BTW your example shows a closing </div> so is this link just sitting loose on the page like between other div elements?
        {{ DiscussionBoard.errors[6631781].message }}
  • Profile picture of the author scrapcar
    Thanks ronc0011, will give that a go.
    Signature

    {{ DiscussionBoard.errors[6632134].message }}
  • Profile picture of the author BillyW
    </div><div align="center"><a href="http://www.scrapcarslegally.co.uk/privacy-policy" target="_blank">Privacy Policy</a></div><br />

    This code will work as well.
    Signature
    Qosso.com - Exceptional Branding At Affordable Prices
    {{ DiscussionBoard.errors[6632217].message }}
    • Profile picture of the author ronc0011
      Hey I just noticed the editor took the space out from between the <a and the href="... That should be corrected to <a href="... or else it wont work. Really it's just soooo aggravating you have to double check, r4echeck every last thing because the system just works overtime to screw up what you write. First you have to write it and then you have to rewrite/correct it and then you have to correct the corrections etc...
      {{ DiscussionBoard.errors[6632307].message }}
  • Profile picture of the author scrapcar
    Hey BillyW, that worked great would you also know what code to add for different colour text
    Signature

    {{ DiscussionBoard.errors[6632817].message }}
  • Profile picture of the author BillyW
    Are you wanting to change the color of just that particular link?
    Signature
    Qosso.com - Exceptional Branding At Affordable Prices
    {{ DiscussionBoard.errors[6638597].message }}
    • Profile picture of the author scrapcar
      Not to worry Billyw, managed to find code last night thanks for everyone's help with this much appreciated.
      Signature

      {{ DiscussionBoard.errors[6639584].message }}

Trending Topics