homepage Welcome to WebmasterWorld Guest from 54.237.184.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Contact form that scrolls up and down in the browser
CodeMonk3y




msg:4441075
 4:01 pm on Apr 15, 2012 (gmt 0)

Hi Everyone
I am looking for a code sample or some pointers to create the effect of a form that scrolls down and up in the browser (probably to the right of the main text) as the user scrolls up and down.
At the moment my page has a contacts form at the bottom

I have no idea if its Java or AJAX that's used to perform this task or if its straight forward html but I have seen it on other peoples web sites and quite fancy it for my own.

Many Thanks

 

birdbrain




msg:4441089
 6:13 pm on Apr 15, 2012 (gmt 0)

Hi there CodeMonk3y,

and a warm welcome to these forums. ;)

Your problem can be resolved with CSS....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">

<title>position fixed</title>

<style type="text/css">
body {
background-color:#f0f0f0;
}
#container {position:relative;
width:960px;
height:1000px;
padding:20px;
border:1px solid #999;
margin:auto;
background-color:#fff;
box-shadow:#666 4px 4px 12px;
}
form {
position:fixed;
top:200px;
right:15px;
width:300px;
padding:10px;
border:1px solid #999;
background-color:#fff;
box-shadow:#666 4px 4px 12px;
}

</style>

</head>
<body>

<div id="container">
this is for the page contents.
</div>

<form action="#">
<fieldset>
<legend>this is the form</legend>
</fieldset>
</form>

</body>
</html>

birdbrain

CodeMonk3y




msg:4443303
 8:35 am on Apr 20, 2012 (gmt 0)

Thanks for that birdbrain and sorry for taking so long to get back to you. What you provided did work and I played with it quite a bit, then gave up

In a full browser window its fine but if the user plays with the window size it all gets a bit messy

Thanks again
James

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved