/    Sign up×
Community /Pin to ProfileBookmark

right float last element, on the line!

Hi, can someone help me find the best way to do this?? I’m trying to use minimal markup to make designers happy on first release and don’t know the best way to do this. I would like to float a couple boxes right, even if the appear last in the markup.

Is there an easy way to float a span right on the same line as some normal-flow text? The code looks like:

[CODE]<li>
<div class=”lead”><strong>[Pro] Claxton</strong> Posted: 8/15/06 <a href=”#” class=”reply”>Reply</a></div>
<p>Hle a užláchle&#328; p&#345;íst, chast luvla&#345; slouti&#345;o pouškou dišt diti syti tlud&#283;ti&#357; tkask hlýst kl&#367;zi grýšt.</p>
</li>
[/CODE]

I’d like to apply CSS like

[CODE].lead a.reply {
display: inline;
flat: right;
}[/CODE]

Thanks for any help! I’m running into these everywhere…:eek:

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@FangDec 01.2007 — Here's one way:.lead {position:relative;}
.lead a.reply {
position:absolute;
right:0;
}
Copy linkTweet thisAlerts:
@webnick2007authorDec 02.2007 — We have a strictly css layout... when I use this and Yahoo's reset.css, the lead.div disapears under a unordered list? Are there any other rules you need with a relative-postition box to maker sure things clear??

..Thanks for your help
Copy linkTweet thisAlerts:
@FangDec 02.2007 — Clear the unordered list with [I]overflow:hidden[/I]
×

Success!

Help @webnick2007 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.11,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...