Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 905
  • Last Modified:

Trick nested HREF in a DIV.

.headingTwo {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 8pt;
      display: block;
      margin: 0px;
      background-color: #CCCCCC;
      color: #6c6666;
      height: 25px;
      vertical-align: middle;
      line-height: 145%;
      text-indent: 10px;
      background-image: url(xxxxxxx);
      background-repeat: repeat-x;
      background-position: top;
      font-weight: bold;
}

<table>
     <tr><td>
          <div class="headingTwo" >My Title <a href="http://mydomain.com" >mydomain.com</a></div>
     </td></tr>
</table>


How do I style the HREF so that the link shows up on the right side of the DIV tag and the Title Shows up on the Left side?
I can't use tables and I need to work with what I have...

0
rpong
Asked:
rpong
1 Solution
 
callrsCommented:
Change
     display: block;
to
     display: inline;

and then use this:
          <div class="headingTwo" >My Title </div><a href="http://mydomain.com" >mydomain.com</a>
0
 
manav_mathurCommented:
cannot you create an additional div with horizontal-align=right, and enclose the link in that div??
0
 
VoteyDiscipleCommented:
If you want to style it without changing the HTML at all, I'd suggest

.headingTwo a {
     float: right;
}
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now