5:29 PM
hi just noticed the invite
 
no worries, what was your previous message?
 
o yes i was saying now the image is set above the text and looking at firebug the image is set on the outside of the inner inner div lol (confusing i know)
 
Could you upload a screenshot?
 
<div><img style="border-width: 0px;" alt="Test image" src="userdata/2/uploadedimage/batman-for-facebook.jpg"><div>hello</div></div>
yup hold on
 
Did you change the outer div's Id?
 
5:31 PM
no its the same
 
ok, so the outer id is "test1"?
 
On the test1 div, can you set class="wall"
and then use this css
I forgot ASP.NET messed around with the Id generation.
Which is why nothing is being styled correctly...
 
yeah my code does it the right way but if you notice the comment is above the image
 
Ok, set the class on the div and let me know what that renders...
And actually, use this updated CSS: jsfiddle.net/5qBKW/6
I realized that I was generating a div around the image and text. So, I added the correct selector
 
5:37 PM
<div id="test1" class="wall" runat="server" />
asp is moaning
 
hmm..
CssClass="wall"
maybe..
I don't have an ASP.NET project on this to test...
You could change <div to <asp:Panel Id="test1" CssClass="Wall" runat="server" />
 
its just saying Warning 3 Validation (XHTML 1.0 Transitional): This attribute requires a value. If the value is enclosed in quotation marks, the quotation marks must match.
 
Hmm. Ok well just change it to the <asp:Panel (it generates a div anyway).
 
so this is combined with your code or either code?
 
yeah - use my CSS that I posted on jsfiddle and then use the panel code.
 
5:41 PM
no change
 
Can you post a picture?
 
yup one sec
o no wait there is a change
 
FYI - I have to leave in 10 minutes - sorry...
 
now the text is on the bottom
 
What's the HTML that's generated?
 
5:43 PM
<div><img style="border-width: 0px;" alt="Test image" src="userdata/2/uploadedimage/batman-for-facebook.jpg"><div>weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee</div></d­iv>
img still isnt inside the content div tho
this puts two divs inside test div which is inside test1 div
 
That's fine - The CSS selector says take all child div's of the wall class and then move them accordingly.
Can you paste your CSS?
 
yeah one sec
* { padding: 0; margin: 0; outline: 0; }

body {
font-size: 12px;
line-height: 1.2;
font-family: Arial, "Trebuchet MS", sans-serif;
color: #a0a0a0;
background: url(images/bg.gif) repeat 0 0;
text-align: left;
}
div#test1 {
}
div#test
{
width:90%;
z-index:1;
padding:27.5px;
border-top: thin solid #736F6E;
border-bottom: thin solid #736F6E;
color:#ffffff;
margin:0 auto;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
}
.wall div > img
{
float: left;
height: 100px; /* You shouldn't resize images here. Should be done in C#*/
 
Can you also paste the html for that test1 div? (include the parent html)
 
one sec
<div id="ctl00_ContentPlaceHolder1_ContentPlaceHolder2_test1"><div><img style="border-width: 0px;" alt="Test image" src="userdata/2/uploadedimage/batman-for-facebook.jpg"><div>weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee</div></d­iv>
strange it wouldnt let me past it all
paste*
 
Ok it's still not setting the css class.
Are you using the panel code?
 
5:50 PM
yes
 
Can you paste it here?
 
<asp:Panel Id="test1" CssClass="Wall" runat="server" />
System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
//div.ID = "test";
//string url = "~/userdata/2/uploadedimage/batman-for-facebook.jpg";
//div.InnerHtml = "<img src=\"" + url + "\" />" + reader.GetString(0);
//test1.Controls.Add(div);


System.Web.UI.HtmlControls.HtmlGenericControl literal = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
literal.InnerHtml = reader.GetString(0);

Image img = new Image();
img.ImageUrl = "~/userdata/2/uploadedimage/batman-for-facebook.jpg";
 
Change CssClass="Wall" to CssClass="wall"
should be lowercase
 
ok
oooo
almost
 
5:53 PM
your css i copied in is messing it up abit
al post an image to show you
 
Is the text beside the image?
ok
 
YUP :D text is beside the image
but its abit haywire
 
Ok.
Literal break = new Literal();
break.Text = "<br />";
div.Controls.Add(break;
Add that code right before test1.COntrols.Add(div)
Controls*
I have to go though - Have to catch a bus. Let me know on the SO post if it works for you :)
Cheers
 
ok thanks very much man!!!
 
No problem. Good luck!