Solved

Trick nested HREF in a DIV.

Posted on 2006-10-31
3
891 Views
Last Modified: 2012-06-27
.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
Comment
Question by:rpong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 30

Expert Comment

by:callrs
ID: 17847247
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
 
LVL 16

Expert Comment

by:manav_mathur
ID: 17847257
cannot you create an additional div with horizontal-align=right, and enclose the link in that div??
0
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 500 total points
ID: 17847386
If you want to style it without changing the HTML at all, I'd suggest

.headingTwo a {
     float: right;
}
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question