|
-
Sep 26th, 2009, 11:09 PM
#1
Thread Starter
Addicted Member
Css fixed position problem
hi guys, any one can give an idea for this problem.. i had this code..
Code:
<STYLE type="text/css" media="screen">
div#fixtop
{
margin-top:400px;
position:fixed;
}
</style>
and call this one on html like this
Code:
<div id="fixtop" >
<A href="#pagetop">Page Top </A>
</div>
above code works fine..but if i change the margin-top to 600px the text is not displayed on the screen.. any ideas for this? why if the margin-top value is increased text is not visible... thanks..
The taller the bamboo grows the lower it bends... 
-
Sep 26th, 2009, 11:52 PM
#2
Re: Css fixed position problem
You are moving the div down the page when you use margin-top. Do you really need to use margin-top for what you are attempting to achieve?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Sep 27th, 2009, 12:06 AM
#3
Thread Starter
Addicted Member
Re: Css fixed position problem
yes, i want to put margin-top at that particular height at 600px..or is there any work around on this? or it's not possible...thanks for the reply..
The taller the bamboo grows the lower it bends... 
-
Sep 27th, 2009, 12:28 AM
#4
Re: Css fixed position problem
Using the following the link falls just off the page:
HTML Code:
<style type="text/css" media="screen">
div#fixtop
{
margin-top:600px;
position:absolute;
}
</style>
Edit:
Maybe reduce 600 to 550?
Reducing margin-top to 550px will put the link at the bottom of the page (without scrolling) exactly if you are using a display of 1024 by 768 pixels. If you are using a different resolution just change "550" to suit.
Last edited by Nightwalker83; Sep 27th, 2009 at 01:57 AM.
Reason: Adding more!
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Sep 30th, 2009, 05:11 AM
#5
Thread Starter
Addicted Member
Re: Css fixed position problem
Hi, thanks for the help..i find a workaround using jquery...from this site..
http://stackoverflow.com/questions/1...-which-part-of
The taller the bamboo grows the lower it bends... 
-
Sep 30th, 2009, 06:50 PM
#6
Re: Css fixed position problem
Instead of top use bottom:
Code:
div#fixtop
{
bottom: 0;
position:fixed;
}
Other than that you just have to live with JavaScript (or jQuery).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|