Solved

Float : Right problem with display on next line.

Posted on 2006-11-14
3
250 Views
Last Modified: 2008-03-06
<style>
.headingTwo .li-viewall{
               float:right;
}
td.rMod1 .headingTwo {
            font-family: Arial, Helvetica, sans-serif;
            text-transform: uppercase;
            font-size: 8pt;
            display: block;
            margin: 0px;
            background-color: #000000;
            color: #000000;
            height: 25px;
            vertical-align: middle;
            line-height: 145%;
            text-indent: 10px;
            letter-spacing: 0.05em;
            background-image: url(/gaming/gameTab_left.jpg);
            background-repeat: no-repeat;
            background-position: top;
            font-weight: bold;
      }
</style>


<table cellspacing=1 cellpadding=0 border=0 width="100%">
<tr><td class="rMod1" width="100%">
            <div class="headingTwo" >Favorites <a href="/user_bookmarks" class="viewall">Edit</a></div>
       </td>
</tr>
</table>


I'm right to float the "EDIT" to the right but when I do it displays on the next line and messes everything up.
I thought it was because the float puts the text in a block so I placed the div in a block and it's still not working.
can you think of anything?

            



      
0
Comment
Question by:rpong
  • 2
3 Comments
 
LVL 49

Expert Comment

by:Roonaan
ID: 17940692
Use:

<a href="/user_bookmarks" class="viewall">Edit</a>
<div class="headingTwo" >Favorites </div>

+

td.rMod1 .viewall {float:right;}

-r-
0
 

Author Comment

by:rpong
ID: 17940795
I don't think that works
0
 
LVL 49

Accepted Solution

by:
Roonaan earned 500 total points
ID: 17941308
For an element to float right of content, the element should be defined in front of all content it should float right to.

-r-
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now