The location of the div within the markup bears zero relevance to where it will appear on the page. It could either be moved by styles or javascript or it could simply be displayed near the top because all of the preceding markup has no height (either because
it is empty or any number of css reasons).
It is also possible that this Unobtrusive AJAX you are using is somehow altering the attributes of this div to make it move.
"Dream as if you'll live forever, live as if you'll die today." --James Dean
The location of the div within the markup bears zero relevance to where it will appear on the page. It could either be moved by styles or javascript or it could simply be displayed near the top because all of the preceding markup has no height (either because
it is empty or any number of css reasons).
It is also possible that this Unobtrusive AJAX you are using is somehow altering the attributes of this div to make it move.
Well, when I View Source, the <div> is where it should be, but I don't even see the text returned via Unobtrusive AJAX!
I don't use JavaScript because I don't really know JavaScript but I am attempting to use jqurey.
Also I have Blog View and Unobtrusive AJAX doesn't alter the placement of that element but then again it is in a <table>.
AJAX uses javascript, whether you are doing it directly, or using a 3rd party library. From a technical standpoint, AJAX doesn't necessarily have to do anything to the markup, but typically 3rd party AJAX packages include other design things that modify
placement and style of elements because people like the term "web 2.0" and AJAX somehow got involved with that whole thing.
jQuery also uses javascript, its main purpose is to provide a more powerful method of finding elements in the DOM, but it also has quite a bit of methods for DOM manipulation as well. That all said, I suppose it all depends on what exactly is happening.
Is it the only div with content in it? If so, then it'll appear on the top of your screen. Or is it overlapping, or somehow being displayed above content that is coded earlier in markup? Are those elements having their positions modified?
"Dream as if you'll live forever, live as if you'll die today." --James Dean
using elements need right style. your div maybe is in a parrent above of other divs. u should use float in your style, or if its exactly buttom of the page, u can use absolute position for your element
The greatest pleasure in life is doing what people say you can not do.
Saeed Saedvand
eric2820
Contributor
2777 Points
1161 Posts
Why does a div at the bottom of the file show up near the top?
Dec 31, 2012 08:18 PM|LINK
I have a <div> in my _Layout.cshtml file that uses Unobtrusive AJAX to show the logged in users member names and times.
This <div> is two <div>'s up from the bottom of the file and looks like this:
Question: Why does this show up near the top of the site when it is created???
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
AceCorban
Star
12318 Points
2269 Posts
Re: Why does a div at the bottom of the file show up near the top?
Dec 31, 2012 08:45 PM|LINK
The location of the div within the markup bears zero relevance to where it will appear on the page. It could either be moved by styles or javascript or it could simply be displayed near the top because all of the preceding markup has no height (either because it is empty or any number of css reasons).
It is also possible that this Unobtrusive AJAX you are using is somehow altering the attributes of this div to make it move.
eric2820
Contributor
2777 Points
1161 Posts
Re: Why does a div at the bottom of the file show up near the top?
Dec 31, 2012 08:55 PM|LINK
Well, when I View Source, the <div> is where it should be, but I don't even see the text returned via Unobtrusive AJAX!
I don't use JavaScript because I don't really know JavaScript but I am attempting to use jqurey.
Also I have Blog View and Unobtrusive AJAX doesn't alter the placement of that element but then again it is in a <table>.
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
AceCorban
Star
12318 Points
2269 Posts
Re: Why does a div at the bottom of the file show up near the top?
Dec 31, 2012 09:09 PM|LINK
AJAX uses javascript, whether you are doing it directly, or using a 3rd party library. From a technical standpoint, AJAX doesn't necessarily have to do anything to the markup, but typically 3rd party AJAX packages include other design things that modify placement and style of elements because people like the term "web 2.0" and AJAX somehow got involved with that whole thing.
jQuery also uses javascript, its main purpose is to provide a more powerful method of finding elements in the DOM, but it also has quite a bit of methods for DOM manipulation as well. That all said, I suppose it all depends on what exactly is happening. Is it the only div with content in it? If so, then it'll appear on the top of your screen. Or is it overlapping, or somehow being displayed above content that is coded earlier in markup? Are those elements having their positions modified?
eric2820
Contributor
2777 Points
1161 Posts
Re: Why does a div at the bottom of the file show up near the top?
Dec 31, 2012 09:27 PM|LINK
It's showing up underneath the left side "foating-menu" div but is part of the "content" div because it scrolls with the main "content"
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
Song-Tian - ...
All-Star
43699 Points
4304 Posts
Microsoft
Re: Why does a div at the bottom of the file show up near the top?
Jan 02, 2013 02:27 AM|LINK
Hi,
I strongly suggest you debug that with IE Developer Tools. Any question, please feel free to reply.
Feedback to us
Develop and promote your apps in Windows Store
saeed_saedva...
Member
408 Points
74 Posts
Re: Why does a div at the bottom of the file show up near the top?
Jan 02, 2013 08:30 AM|LINK
using elements need right style. your div maybe is in a parrent above of other divs. u should use float in your style, or if its exactly buttom of the page, u can use absolute position for your element
Saeed Saedvand