Solved

How to overlap div?

Posted on 2013-01-27
1
366 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WordPress navigation menus: how to change color when clicked 10 42
toggle content 12 39
What is the best SEO Web Analytics tool/program 3 51
Disabling a Faux Submit Button 4 35
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

739 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