Solved

How to overlap div?

Posted on 2013-01-27
1
330 Views
Last Modified: 2013-01-27
How do I get div2 to overlap to the left?  I'd like "testing" to appear in the left margin and "this" to align with "testing" above and below it.

<div id="outer" style="width:300px;border-style:solid;border-width:5px;margin:auto;">
<div>testing this div 1.testing this div 1.</div>
<div id="div2" style="left:-50px;">testing this div 2.</div>
<div>testing this div 3.</div>
</div>

Open in new window

0
Comment
Question by:brettr
1 Comment
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 38824901
It may depend on the font but try this for starters:
<div id="div2" style="position:relative;left:-46px;">testing this div 2.</div>

Open in new window

EDIT: 46 seemed closer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 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