div tag in html

JavaScript and client side scripting.

Moderator: General Moderators

ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

div tag in html

Post 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?
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post 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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Moved to Client-Side.
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post 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! :)
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post 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
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post 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]
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post 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
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post 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.
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post by ekosoftco »

ff? im still, technically, pretty new to coding correctly :P

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.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

FF = Firefox.
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post by ekosoftco »

oh xD i havent been using firefox.

gente what link do you not see there?
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post by Gente »

I don't see 'Login' link. In IE (IE = Internet Explorer) it's an orange link in the top of the page.
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Fx is the official abbreviation for Firefox. Just thought I'd throw that out there.
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post 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 :)
Post Reply