Solved

Trick nested HREF in a DIV.

Posted on 2006-10-31
3
888 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

770 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