Thread: CSS and Forums
View Single Post
  #20 (permalink)  
Old October 15th, 2007, 01:40 PM
ViagraFalls ViagraFalls is offline
Friend of Wrox
 
Join Date: Sep 2003
Location: Copenhagen, , Denmark.
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:Originally posted by Maxxim
For the other images in forums you can do one of two things:
by css like:

Code:
<div class="postContent">
<%# Eval("Message") %>
</div>

css:
.postContent{
width:445px; /* td width */
overflow:auto; 
word-wrap: break-word;
}
//this css lines are very usefull! Because if some user post an url with 100 characters without spaces, your design will be corrupted!
//overflow:auto;word-wrap: break-word; avoid that making an horizontal scroll just for that div!
Thanks for that :) Very helpful. The only trouble I'm trying to solve now is not setting the value of the width as hardcoded. What works for me might not work for someone with a different resolution, and the CenterCol is defined as dynamic...

Any clues if I can dynamically determine the width? (Not a CSS guru. Have to get me a book :p).

Thanks.

Peter

http://entropia-online.blogspot.com/