/    Sign up×
Community /Pin to ProfileBookmark

Float right and then go down

I wish to have text rap around an image. I have assigned a class to the image, and then used float:right. The paragraph and the image are then at the same level, but what I really want is one or two lines of the first paragraph to go above the image. I thought I could add position:relative;top:-2em; but this doesn’t do it. Any pointers would be much appreciated. Thanks

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyJan 02.2007 — You have to place the image two lines into the paragraph then:
<p>This is a test paragraph. This is a test paragraph. This is a test paragraph. This is a test paragraph. This is a test paragraph. <img src="images/image.gif" style="float:right;"> This is a test paragraph. This is a test paragraph. This is a test paragraph. This is a test paragraph. This is a test paragraph. This is a test paragraph. This is a test paragraph. </p>
Copy linkTweet thisAlerts:
@NotionCommotionauthorJan 02.2007 — Thanks, works perfect. While thanks to you, no immidiate need, it would seem that there would be an easy way to push down so one wouldn't have to know how many words equals two lines.
Copy linkTweet thisAlerts:
@bathurst_guyJan 02.2007 — Not with CSS (to my knowledge). Maybe use PHP or JavaScript to count a certain amount of words in the paragraph and insert it.
Copy linkTweet thisAlerts:
@ray326Jan 02.2007 — What's special about those two lines or are they just a couple of lines like all the rest?
Copy linkTweet thisAlerts:
@NotionCommotionauthorJan 03.2007 — My new years resolution is keep it simple. No js or php unless there is good reason.

Nothing special about the top two lines. Just didn't want to hug the top, and want to better educate me on how to change appearance.

Thanks
×

Success!

Help @NotionCommotion 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.20,
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,
)...