Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML HTML Basics

Div position

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Div position

Postby victor123 » Wed Jun 08, 2005 7:39 am

Hi,

I have several divs in a page and some of them are superposed so i use z-index=0 for the one at the very botton and z-index=1 for the ones that have to be over it.
In IE6 it works fine, but not in Mozilla. Can somebody please suggest a way of displaying them ok in both browsers? (it could be solver by positioning the div that goes at the bottom the first one in the code, but i wonder if it could be done in some other way).

Thanks in advance.
victor123
New php-forum User
New php-forum User
 
Posts: 192
Joined: Mon Sep 06, 2004 1:23 am
Location: Madrid, Spain

Postby gesf » Wed Jun 08, 2005 5:18 pm

Hey vitor123, can you show us the CSS class (or passed style you're using) for that divs ?
It will be easier for us to see what's wrong.
User avatar
gesf
Moderator
Moderator
 
Posts: 1718
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden

Postby victor123 » Wed Jun 08, 2005 11:29 pm

The part of the code is:

Code: Select all
<td valign="top">
    <div style="position:relative; top:10px; left:10px;">
      <div style="position: relative; top:50px; left:310px; z-index=1;"><a href="quienes.php" class="e_textoEntrada">Qui&eacute;nes somos</a></div>
      <div style="position: relative; top:50px; left:160px; z-index=1;"><img src="<?php echo $dir_imagenes;?>quienes.gif"></div>
      <div style="position: relative; top:70px; left:280px; z-index=1;"><a href="servicios.php" class="e_textoEntrada">Servicios</a></div>
      <div style="position: relative; top:70px; left:90px; z-index=1;"><img src="<?php echo $dir_imagenes;?>quienes.gif"></div>
      <div style="position: relative; top:90px; left:210px; z-index=1;"><a href="presupuestos.php" class="e_textoEntrada">Presupuestos</a></div>
      <div style="position: relative; top:90px; left:50px; z-index=1;"><img src="<?php echo $dir_imagenes;?>quienes.gif"></div>
      <div style="position: relative; top:110px; left:125px; z-index=1;"><a href="admin.php" class="e_textoEntrada">Administraci&oacute;n</a></div>
      <div style="position: relative; top:110px; left:20px; z-index=1;"><img src="<?php echo $dir_imagenes;?>quienes.gif"></div>
      <div style="position: relative; top:130px; left:190px; z-index=1;"><a href="contactar.php" class="e_textoEntrada">Contactar</a></div>
      <div style="position: relative; top:130px; left:5px; z-index=1;"><img src="<?php echo $dir_imagenes;?>quienes.gif"></div>
      <div style="position: relative; top:-60px; left:250px; z-index=0"><img src="<?php echo $dir_imagenes;?>imagenentrada.gif"></div>
  </div>
</td>


The div with z-index=0 is the one that has to appear below all the others...

Thanks
victor123
New php-forum User
New php-forum User
 
Posts: 192
Joined: Mon Sep 06, 2004 1:23 am
Location: Madrid, Spain

Postby SummerBoyZz » Thu Sep 29, 2005 6:21 am

My DIV tag display in different position in IE and Mozilla too ? Maybe it is like that .
SummerBoyZz
New php-forum User
New php-forum User
 
Posts: 2
Joined: Thu Sep 29, 2005 6:16 am
Location: Malaysia

Re: Div position

Postby willyamPax » Sun Jul 13, 2008 10:56 pm

sometime its not like that...maybe its the margins...
my teacher said to me before that its the margins..
coz IE and mozilla handles marging differently....
thats why i use clearmargins in javascript..
in css/html just 0 ur margins...coz each browsers use their default margin
willyamPax
New php-forum User
New php-forum User
 
Posts: 17
Joined: Sun Jul 13, 2008 5:34 pm


Return to HTML Basics

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.