Log In · Register

 
 
Closed TopicStart new topic
Postioning Divs Question
bah
post Dec 2 2005, 08:43 PM
Post #1


Newbie
*

Group: Member
Posts: 6
Joined: Sep 2005
Member No: 225,723



Alright, Im positioning my divs on this layout:

http://www.xanga.com/HPlayouttesting

Here's the code, so far.
QUOTE
<center>
<img src="http://makeshiftwings.org/HPLayout.png">
</center>

<div style="overflow:auto; width:400px; height:550px; margin-top:-350px;
margin-left:-1px;">
<style type=text/css>
/* remove regular modules */
table.footer, texttable.left, td.mainleft, table.left, table.navigation, table.search{display:none}
table.blogbody tr td {width:0px; padding: 0px;}
</style>


And yes, I've ended my div in the Website stats.

Here's my problem:
It only allows me to edit margin left in negative pixels. The problem is, I've made it to -1, and I haven't aligned it as far to the left as I would like it to be. If you look at it right now, the text is as far left as I can get it to go.
If I try aligning it in postive numbers, it just doesn't move from it's current position.
I tried setting the alignment to left, then postioning it, and it let me do that in positive numbers, and it worked, and I got it to the right place. However, the ad got moved to the left, and it was just bugging me.
So can someone either expain why its only aligning in negative numbers, and what I can do to fix that. Or, how to align the ad into the center when I have th alignment set at left.

Thanks a bunch!
 
YourSuperior
post Dec 2 2005, 08:46 PM
Post #2


;)
*******

Group: Staff Alumni
Posts: 9,573
Joined: Feb 2005
Member No: 99,124



Try the code below, I added position absolute to your div; try using negative or positive numbers now.

HTML
<center>
<img src="http://makeshiftwings.org/HPLayout.png">
</center>

<div style="position: absolute; overflow:auto; width:400px; height:550px; margin-top:-350px;
margin-left:-1px;">
<style type=text/css>
/* remove regular modules */
table.footer, texttable.left, td.mainleft, table.left, table.navigation, table.search{display:none}
table.blogbody tr td {width:0px; padding: 0px;}
</style>


Try not closing your div in webstats. Just leave it open.
 
bah
post Dec 2 2005, 09:01 PM
Post #3


Newbie
*

Group: Member
Posts: 6
Joined: Sep 2005
Member No: 225,723



I just put in your code and it's still the same, positive numbers still don't work. =/

This is odd, because in the past, I never editted in negatives. A friend coded my previous layout for me with negative numbers., and I just copied her code for my new layout and editted it a bit.
 
YourSuperior
post Dec 2 2005, 09:14 PM
Post #4


;)
*******

Group: Staff Alumni
Posts: 9,573
Joined: Feb 2005
Member No: 99,124



Try the code below, I added position absolute to your div; try using negative or positive numbers now.

HTML
<center>
<img src="http://makeshiftwings.org/HPLayout.png">
</center>


<style type=text/css>
/* remove regular modules */
table.footer, texttable.left, td.mainleft, table.left, table.navigation, table.search{display:none}
table.blogbody tr td {width:0px; padding: 0px;}
</style>

<div style="position: static; overflow:auto; width:400px; height:550px; margin-top:-350px;
margin-left:-1px;">


I change the position to static, and moved it to the bottom, now try moving it.
 
talcumpowder
post Dec 2 2005, 09:58 PM
Post #5


You'll find me in your dreams.
*******

Group: Official Member
Posts: 8,536
Joined: Mar 2005
Member No: 114,010



You page alignment shouldn't be center for this sort of thing. mellow.gif It's quite easier without.....
CODE
<div style="position: static; overflow:auto; width:400px; height:550px; margin-top:-350px; margin-left: 250px;">
 
bah
post Dec 2 2005, 10:15 PM
Post #6


Newbie
*

Group: Member
Posts: 6
Joined: Sep 2005
Member No: 225,723



QUOTE(fishcake-y @ Dec 3 2005, 7:28 AM)
You page alignment shouldn't be center for this sort of thing. mellow.gif It's quite easier without.....
CODE
<div style="position: static; overflow:auto; width:400px; height:550px; margin-top:-350px; margin-left: 250px;">

*

Yeah..I don't mind the layout being to the left, but the ad being on the left annoys me, so yeah.
Hm..I don't really understand your code, because it doesn't really help me.

Sorry, positioning in static didn't change anything either.
 
ryanoman
post Dec 2 2005, 10:23 PM
Post #7


=]
*****

Group: Member
Posts: 712
Joined: May 2004
Member No: 15,626



Have you tried -15px or something like that?
 
bah
post Dec 2 2005, 10:34 PM
Post #8


Newbie
*

Group: Member
Posts: 6
Joined: Sep 2005
Member No: 225,723



QUOTE(ryanoman @ Dec 3 2005, 7:53 AM)
Have you tried -15px or something like that?
*

I'm not sure that would help me, as -1 is more to the left than -15 px.
 
ryanoman
post Dec 2 2005, 10:43 PM
Post #9


=]
*****

Group: Member
Posts: 712
Joined: May 2004
Member No: 15,626



try adding padding-top: 0px; padding-left: 0px; to the style of the DIV.
 
talcumpowder
post Dec 2 2005, 11:09 PM
Post #10


You'll find me in your dreams.
*******

Group: Official Member
Posts: 8,536
Joined: Mar 2005
Member No: 114,010



There's a reason I gave it. When you set the alignment to left, you use that and it's fairly lined up. And........ Positive numbers work. But the centering prevents it from being moved properly, because everything is being moved from the center. If you were going to keep it on center, then take out the center tags for the image, which are redundant, but it won't do anything....
 
bah
post Dec 3 2005, 11:01 PM
Post #11


Newbie
*

Group: Member
Posts: 6
Joined: Sep 2005
Member No: 225,723



QUOTE(fishcake-y @ Dec 3 2005, 8:39 AM)
There's a reason I gave it. When you set the alignment to left, you use that and it's fairly lined up. And........ Positive numbers work. But the centering prevents it from being moved properly, because everything is being moved from the center. If you were going to keep it on center, then take out the center tags for the image, which are redundant, but it won't do anything....
*

Well, I've said in my original post that I've already tried that, but I don't like the ad being on the left while the rest of the layout is in the center. Do you have a code to put my ad in the center?
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: