/    Sign up×
Community /Pin to ProfileBookmark

How do i get both these values to print on the same line?

Hi,
Here is my html code

[code=html]<div class=”contentspan”>test</div><div class=”contentspanp”>1200</div>”[/code]

and here is my CSS definitions

[code=html].contentspan{
padding:0px 0px 0px 0px;
margin:0px;
font-size:10px;
color:#666666;
font-weight:normal;
line-height:24px;
}

.contentspanp{
font-size:10px;
color:#666666;
font-weight:normal;
line-height:24px;
float:right

}
[/code]

but for some reason, the 1000 is coming out on the line below, is there a way to fix this to get both items on the one line ?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@aj_nscDec 21.2008 — I may be wrong in assuming this, but something tells me if you want these two divs to line up side by side and you only have the small amounts of text in them that you have shown above, then you actually want to use spans instead of divs.

Now if you actually need to use the block level div elements then just float both elements to the left
Copy linkTweet thisAlerts:
@livewire1974authorDec 22.2008 — cool, i changed them to spans and it worked...
×

Success!

Help @livewire1974 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.28,
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,
)...