newbie can't position a data view
-
Thursday, February 04, 2010 7:52 AMhttp://lannaalterationstudio.com/howto/replacezipper.htm
Hi all, added a data view to a page of my site. The "position" command is greyed out when I select the data view. So the data view is stuck at the top of the page, underneath other content. Check above URL and you'll see the data view load first at the top before other content loads over it.
Not sure if this helps with solutioning at all, but the data view is for an RSS feed to a blog I have set up, following EW help topics. Feed appears to be working, it's just the positioning.
Also just to give as much info as I can... yes yes I know absolute position is dangerous, but I found it a really flexible way to move stuff around without impacting other content.
Any help appreciated.
Cheers
All Replies
-
Thursday, February 04, 2010 8:59 AM
In your page go to the EW code view editor. Find the <div> tag that is just before this:
<!-- PlaceHolderPreview MSDataViewXMLSrc="../test.xml" MSDataViewXSLSrc="test.xsl" -->
Edit the <div> and make it into this: <div style="position:absolute; top:700px; width:500px">
I object to all the absolute positioning on your page but you're stuck with it now. This move will just plop it down the page where you can see it. Maybe.
- Marked As Answer by Paul Bartholomew,Moderator Thursday, February 04, 2010 4:13 PM
-
Thursday, February 04, 2010 9:00 AM
I dont see a dataview on this page??
Yes, the absolute positioning is dangerous, asa result of which the page looks totally different in Chrome for example.
Dont try to run before you can walk. Take a look at some of the css layouts in EW and look at some tutorials on css and htm.
http://www.w3schools.com/css/default.asp for instance.
Ian
MS MVP Expression
Ian Haynes -
Thursday, February 04, 2010 10:54 AM
"I know absolute position is dangerous, but I found it a really flexible way to move stuff around without impacting other content."
Not true at all, I'm afraid. Your site is broken by your use of absolute positioning and of heights on text containers. Open Firefox and try Zoom set to Text Only, or use IE and use Page -> Text Size and see what happens.
Text isn't a fixed size on the web: users take advantage of their browser's ability to adjust text size when they are using small but high resolution screens, or just have eyes that are not as sharp as some. A couple steps of text resizing is not at all unusual.
You need to design a page that lets text containers grow without breaking the page, which means you remove the heights, and that you can't put position absolute content under them, which will get overwritten by the growing text.
Position content with margins, padding, floats and clears.- Marked As Answer by Paul Bartholomew,Moderator Thursday, February 04, 2010 4:13 PM
-
Friday, February 05, 2010 1:55 AM
Thanks Time Bandit, however still doest allow me to move/reposition it. Here's the code as it looks now :
<div style="position:absolute; top:700px; width:500px">
<!-- PlaceHolderPreview MSDataViewXMLSrc="../test.xml" MSDataViewXSLSrc="test.xsl" -->
<iframe onload="FP_xslview(this, /*url*/'../test.xml', /*url*/'test.xsl', 'Unsupported browser. Use Windows® Internet Explorer® 7, Internet Explorer 6, or Mozilla Firefox 1.5.')" style="display: none">
</iframe></div>
All other objects on the page I can do what you suggested and allows me to reposition. Seems to be just this one object/data view. The fact that the "position" feature on the "Format" menu is greyed when selecting this object only - suggests to me a 'feature' of EW simply doesnt allow it. Strange I know.
I here ya about absolute position. Will be looking at this shortly.
Any other advise on the positioning problem ?
Cheers
PS -
Friday, February 05, 2010 3:44 AM
It may need a position relative parent to get the position:absolute working and it turns out the MSData view is commandeering the inside most <div> element and placing the positioning style inside of it does nothing. So, add these four lines please:
<div style="position:relative">
<div style="position:absolute; top:700px; width:500px">
<div>
<!-- PlaceHolderPreview MSDataViewXMLSrc="../test.xml" MSDataViewXSLSrc="test.xsl" -->
<iframe onload="FP_xslview(this, /*url*/'../test.xml', /*url*/'test.xsl', 'Unsupported browser. Use Windows® Internet Explorer® 7, Internet Explorer 6, or Mozilla Firefox 1.5.')" style="display: none">
</iframe></div>
</div>
</div>
- Marked As Answer by Paul Stuttard Saturday, February 06, 2010 4:33 AM
-
Saturday, February 06, 2010 4:32 AMyou got it TB. many thanks.
-
Saturday, February 06, 2010 3:24 PM"you got it TB. many thanks."
Well, except that the site still looks like doo-doo because of absolute positioning. There are lines of text cut off, "Find Us" is almost totally hidden, the map looks dopey because the info balloon is cut off, etc.
That's the problem with using absolute positioning.
Furthermore, your little site (or any site) doesn't get to dictate to me (or anyone) what browser we can use--that's ridiculous. "'Unsupported browser. Use Windows® Internet Explorer® 7, Internet Explorer 6, or Mozilla Firefox 1.5." Nobody uses Firefox 1.5 any more, or IE6, which is disappearing fast; updated Windows computers are running IE8 (and thus can't run 6 or 7), Chrome and Opera are not addressed at all.
The point of web design is to serve the VISITOR, not do it whatever way you like. If the visitor has a poor experience (or if they notice amateur mistakes like cut off text), they won't come back--there's no reason to. They'll go elsewhere. Your work will be for naught. -
Saturday, February 06, 2010 5:48 PM"the site still looks like doo-doo because of absolute positioning".
That the site is so simple that a skilled web-smith could rewrite that thing properly in an hour or two. Still the guy is just learning and he came here and asked a simple question and he got his answer plus a bunch of lectures. Maybe he will graduate from absolute to table layout and next time we can whine about his use of tables.
-
Saturday, February 06, 2010 7:41 PMTB:
The "lectures" address the OP's saying "...yes yes I know absolute position is dangerous, but I found it a really flexible way to move stuff around without impacting other content."
He clearly doesn't know the dangers of absolute positioning, as evidenced by the site. He's using it only for his own convenience rather than learning the right way to do it. That's why people are "lecturing" him. He asked for help in something that's done incorrectly, and fixing that one thing is like putting a band-aid on a bullet wound. His site still doesn't work, even after applying the fix you suggested. What's the point of making that fix? Telling someone how to do something expediently (even if incorrectly) doesn't help them. -
Saturday, February 06, 2010 8:47 PMAfraid I'm going to have to go with Bill on this one. I just checked it, and the site is still broken, and it is still broken because of absolute positioning and heights on text containers, even without resizing text, and especially so when text is resized.
As stated, that site is dirt-simple, and could be built from scratch to be standards-compliant and accessible in about an hour by any competent developer, using exisitng images and content. That it seems destined to be left as is reflects expediency, not need.
cheers,
scott
C'mon, folks. This isn't rocket science, nor neurosurgery. It's "Expression" (singular) "Web" (singular), in that order, followed by a version numeral if you wish to be specific. It is often abbreviated "EW." It is not "Web Expression," "Expressions Web," "Web Expressions," or plain "Expression" or "Expressions." Not using the correct name indicates either ignorance or laziness. Most folks would rather avoid the appearance of either. -
Saturday, February 06, 2010 9:47 PMI concede that you are both correct on this. I only enabled him to persist in his bad habits.
-
Sunday, February 07, 2010 5:24 AMas time bandit mentioned a newbie came here looking for assistance and got some people responding with helpful comments and respectfully telling me my site had other problems which is great, then I got others who had a good old cry about it and disrespected me.
you really want what you say you want ? people to design good quality sites ? your words do nothing to encourage that in anyone reading this forum. -
Sunday, February 07, 2010 5:53 AMWell I'd have to say your treatment here was a bit shabby Paul but you did learn a few things, I trust, and the price was right.

