Page 1 of 2
div tag in html
Posted: Fri Jun 29, 2007 1:49 pm
by ekosoftco
hopefully someone knows this. im trying to make the layers i have position absolute so when someone resizes the window the layers stay where theyre supposed to, using this code.
Code: Select all
<div style="position:absolute; width:461px; height:-9px; left: 523px; top: 3px;">
but when i resize, it moves around on the screen like its a relative positioning, any ideas?
Posted: Fri Jun 29, 2007 1:58 pm
by Gente
Real coordinates of the container marked ''position:absolute' counts off the position of the closest parent container marked 'position:relative'. If no relative <div> specified relative container is body. But seems it's not you situation.
BTW. It's a 'Client Side' question.
Posted: Fri Jun 29, 2007 2:28 pm
by John Cartwright
Moved to Client-Side.
Posted: Fri Jun 29, 2007 2:43 pm
by ekosoftco
ok, sorry about the section i posted in, and i do have another div, that uses java to code the flash in, and i think its still relative (just noticed), so that must be why! Thank you!

Posted: Fri Jun 29, 2007 2:48 pm
by ekosoftco
actually, i went and changed the other and only div to absolute, and they both still move to the right when you minimize the screen.
if it helps, the url is
http://cyril.ulmb.com/community/community.php
Posted: Fri Jun 29, 2007 2:52 pm
by matthijs
Why do you (want to) use absolute positioning?
or
What are you trying to achieve? A fixed width centered box? (which stays centered)
[/syntax]
Posted: Fri Jun 29, 2007 3:03 pm
by ekosoftco
if you take a look on the page, i have a layer that has php code in it, it says login, and takes them there, and when they log in it has a logout and member cp link. i tried sticking it in the table with the register and sitemap links, but when i do it makes the table twice the size it is now.
the other div is the flash menu.
i think im going to just make the entire picture, logo, and menu one flash item to solve that problem, but originally i wanted the menu on top of the image, and be able to change the image, but its not a problem to do that in flash.
im still at the problem of having to make the "dynamic log in info" at the top, if theres a way to stick it in the table without making the table huge, then id love to do that, but like i said, everytime i put it in there the table size doubles. if it matters im using dreamweaver cs3
Posted: Fri Jun 29, 2007 3:04 pm
by Gente
Position of your <div> is absoulte now.
Do you mean <div> with 'login' with login link i the top of your page?
And one more notice... It seems that you have a troubles in FF. For example I don't see that link there.
Posted: Fri Jun 29, 2007 3:27 pm
by ekosoftco
ff? im still, technically, pretty new to coding correctly
the login is in the div im talking about, right now its a little to the right, overlapping another link, just because im trying to fix it before i make it look right. for me, that still doesnt have an absolute position. im using ie 6 if that makes any difference.
the flash may not show up right now, the menu i mean, just because im messing with it.
Posted: Fri Jun 29, 2007 3:30 pm
by superdezign
FF = Firefox.
Posted: Fri Jun 29, 2007 4:06 pm
by ekosoftco
oh xD i havent been using firefox.
gente what link do you not see there?
Posted: Fri Jun 29, 2007 4:21 pm
by Gente
I don't see 'Login' link. In IE (IE = Internet Explorer) it's an orange link in the top of the page.
Posted: Fri Jun 29, 2007 4:59 pm
by ekosoftco
this may not be the right place to ask, but my table code is this
Code: Select all
<table width="804" height="20" border="0" align="center" bgcolor="#000000" id="top"><table width="804" height="20" border="0" align="center" bgcolor="#000000" id="top">
its fine, and stays the height its supposed to, but when i put php code in it, the size doubles, is there a way to make the table size absolute with php code in it, so maybe i can go around using the div layer?
Posted: Fri Jun 29, 2007 5:09 pm
by feyd
Fx is the official abbreviation for Firefox. Just thought I'd throw that out there.
Posted: Fri Jun 29, 2007 5:13 pm
by Gente
Actually solution is following
Code: Select all
<div style="height:20px;overflow:hidden;">
...
</div>
But... I looked in your code and I think you should remake your page. There are a lot of garbage and if we try to fix your bugs will multiply it by 2. So I think this would be the best solution and good experience for you. Besides your page isn't really big.
If you hesitate about something you can ask
