Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

div tramping

Posted on 2008-10-08
3
Medium Priority
?
142 Views
Last Modified: 2012-05-05
how i can specify div location in a way that one wont be over the other?

i mean for example i have already one image that have a specific location on the page
how i can insure that the other image that i will add wont run over?



this it the situation that i am trying to avoid:
<div style="position: absolute; top: 70px; left: 255px; width: 50px; height:20px;background-color: yellow;">
<img src=google.gif border=0>
</div>
<div style="position: absolute; top: 80px; left: 255px; width: 50px; height:20px;background-color: yellow;">
<img src=google.gif border=0>
</div>

Open in new window

0
Comment
Question by:Sasha-N
[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
3 Comments
 
LVL 16

Accepted Solution

by:
rbudj earned 1000 total points
ID: 22671216
you would prevent this by using your absolute positioning.  absolute positioning will place the div exactly where you want it so if you dont want it overlapping, it wont.  as a beginner though, I would stay away from absolute positioning... you will end up with different layouts across different browsers.
0
 
LVL 44

Assisted Solution

by:scrathcyboy
scrathcyboy earned 1000 total points
ID: 22672163
I agree that using absolute positioning will cause this problem, so simply don't use it.  You can either use relative positioning, or if you don't need to specifically position the image, put in a <BR> or two between them, without any positioning specified, and that will guarantee your images will not conflict.
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

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.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

730 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