/    Sign up×
Community /Pin to ProfileBookmark

<div> positioning

I’m having trouble positioning a <div>, can anybody help??

I have a container <div> that holds the title of the text and the text outputted from a database. I would like to have a box nested in the text diplaying more information from the database, how can i do this?

At the moment i can either place a <div class=”other_text></div> before main text and set it to float left, and this almost gets the results i require. What i would like to do is move the div further down the page and slightly to the right. So i set position:relative; and top:100px; and left:25px; and it did move the <div class=”other_text”></div> but the text is now underneath it (obsured from view) and yet still wrapping around the blank space where the <div class=”other_text”></div> is in the order set in html.

Rich

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@ToonMarinerFeb 19.2007 — perhaps just giving it a top margin would be better..
Copy linkTweet thisAlerts:
@DurbsauthorFeb 19.2007 — By that i assume you mean margin-top:100px? I thought about that but then the text doesn't go above it leaving a large gap at the top of the document.?
×

Success!

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