₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,099 members, 8,420,333 topics. Date: Thursday, 04 June 2026 at 04:42 PM

Toggle theme

Why Float Instead Of Using Coordinates (top And Left) - Webmasters (2) - Nairaland

Nairaland ForumScience/TechnologyWebmastersWhy Float Instead Of Using Coordinates (top And Left) (2213 Views)

1 2 Reply (Go Down)

Re: Why Float Instead Of Using Coordinates (top And Left) by DualCore1: 5:39pm On Jan 09, 2010
lanbaba:
woo hoo, just like dual said, "saved by the babe" . i did all the stuff and it worked. actually , i was clearing outside the containing div, thanks guys
Now you see why I am about to confidently put my 5 million naira for yawa's head.


Gabry:
^^^ Yeah. Keep it real with your yeye attitude. I like it! tongue
Hey ex, stop posting offtopic hia angry
You can do this wen we're in the bedroom but not here. . . . oh well no more bedroom stuff for us, after you kissed all the NL Mods in PM angry
Re: Why Float Instead Of Using Coordinates (top And Left) by Gabry(f): 2:55am On Jan 10, 2010
Dual Core:
Hey ex, stop posting offtopic hia angry
You can do this wen we're in the bedroom but not here. . . . oh well no more bedroom stuff for us, after you kissed all the NL Mods in PM angry
na waaa ooo shocked shocked shocked
Re: Why Float Instead Of Using Coordinates (top And Left) by lanbaba(op): 7:10pm On Jan 10, 2010
I think i am really loving floating. How do i place the content of divA on divB using z-index . Cos in absolute positioning(top&left), you simply give values of coordinates that makes them intersect and then give a higher z-index value to divA. My question is 'how do u make divA appear on divB while floating?'
Re: Why Float Instead Of Using Coordinates (top And Left) by DualCore1: 7:49pm On Jan 10, 2010
Not sure i understand you clearly. Any further explanation to what you want will help.

What do you mean by "appear on"?
Re: Why Float Instead Of Using Coordinates (top And Left) by lanbaba(op): 9:29pm On Jan 10, 2010
I guess dey call it superimpostion.for example if u want the w word 'me' to appear on (be superimposed on) the word 'you', the paragraph that contains 'me' is given a z-index value of say 2.i use the following code for illustration <p style="position:absolute; top:1px; left:1px; z-index:2; ">me</p> <p style="position:absolute; top:1px; left:1px;">you</p> .in the above code,me and you will appear on top of each other,but me will appear on top because it has a higher z-index value,right? So my question is how will you do something similar if u are floating and not using coordinate(top and left) .thanks
Re: Why Float Instead Of Using Coordinates (top And Left) by yawatide(f): 9:42pm On Jan 10, 2010
simple answer: with floating, you can't. Elements either appear side-by-side or stacked on top of each other.
Re: Why Float Instead Of Using Coordinates (top And Left) by DualCore1: 9:48pm On Jan 10, 2010
yawa-ti-de:
simple answer: with floating, you can't.  Elements either appear side-by-side or stacked on top of each other.
Yea to do this properly you got to use a collabo of top, left and z-index.

however i just wrote this and it kinda does the work

<html>
<head>
<style>
#first{
color:#666;
float:left;
margin-right:-10px;
}

#second{
float:left;

}
</style>
</head>
<body>
<div id="first">
<p>Me</p>
</div>
<div id="second">
<p>You</p>
</div>
</body>
</html>


what i did was i used a negative value for the margin-right of the first div so it sucks some part of the second div into it.

not tested with IE tho.
Re: Why Float Instead Of Using Coordinates (top And Left) by lanbaba(op): 10:27pm On Jan 10, 2010
Wow!worked in both FF and IE. Wonderful peeps. Although z-index value didnt work,but it is doing wath i want it to do. Thanks so much. Pls i opened a thread on "lil prob i have with uploading my work". Pls check it out
1 2 Reply

7 Golden Rules That Left Adsense With A “yes” Option To Me [ Life Experience ]Are You Making Enough Money From Adsense? Try This Instead.What Are The Advantages And Disadvantages Of Using Table For Layout234

Body Language For Leaders | VIDEO Download | HugageekNEED A WEBSITE? Get One Within 7daysI Can't Pay For Facebook Ads With My UBA Master Card