YAFLogo

soxfandoug
  • soxfandoug
  • 53% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Hello all! I was just wondering how I can force the width of the forum pages to a certain amount of pixels. I've looked at the theme XML and CSS files, and can't seem to find anything. Thanks in advance!

Doug

Sponsor
TechLawyer
16 years ago
I tried fiddling with the CSS as well, but with no luck.

What I did instead: In the "forum.default.aspx" page (or whatever you've renamed it to), add HTML style attributes to the tag:

The above code will give you 80% browser width with the content centered.

Hope this helps.

TechLawyer

thagemoser
15 years ago
Hello TechLawyer,

The body style that you entered seems to work for FireFox but does not seem to work in IE. Can somebody please provide a suggestion that could work in both?

I was able to figure out how to modify the width for the Forums and everything except the NAV menu across the top. That remains the full width of the page regardless.

Please advise.

Thank you,

Todd

Dariuss
  • Dariuss
  • 52.4% (Neutral)
  • YAF Forumling
15 years ago
I added a table into my default.aspx page, and it seems to control the width ok (but not the height as I had hoped). I haven't extensively tested it yet, but here's what i did:


<%@ Page Language="C#" %>
<%@ Register TagPrefix="yaf" Namespace="yaf" Assembly="yaf" %>
<%@ Register TagPrefix="yc" Namespace="yaf.controls" Assembly="yaf" %>

<script runat="server">
public void Page_Error(object sender,System.EventArgs e)
{
	Exception x = Server.GetLastError();
	string exceptionInfo = "";
	while ( x != null )
	{
		exceptionInfo += DateTime.Now.ToString( "g" );
		exceptionInfo += " in " + x.Source + "\r\n";
		exceptionInfo += x.Message + "\r\n" + x.StackTrace + "\r\n-----------------------------\r\n";
		x = x.InnerException;
	}
	yaf.DB.eventlog_create( forum.PageUserID, this, exceptionInfo );
	yaf.Utils.LogToMail(x);
}
</script>

<html>




<head runat="Server" id="YafHead">
<meta name="Description" content="A bulletin board system written in ASP.NET" />
<meta name="Keywords" content="Yet Another Forum.net, Forum, ASP.NET, BB, Bulletin Board, opensource" />
<!-- If you don't want the forum to set the page title, you can remove runat and id -->
<title runat="server" id="ForumTitle">This title is overwritten</title>
</head>


<table width="826" height="350" border="0">
<tr>
<td>
<body>

<!-- <img src="images/logo.png" runat="server" id="imgBanner" alt="" /> -->
<br />

<form runat="server" enctype="multipart/form-data">
	<yaf:forum runat="server" id="forum" />
</form>

</td>
</tr>
</table>
</body>
</html>

You can see it in action here: www.whatshouldihavefordinnertonight.com 

test2005
15 years ago
The simplest way to control the width, overall, is to place the forum control inside a table (1 row, 3 columns with the contol in the center column) then style the table to whatever you need.

You can do it using a DIV wrapper, just make sure you deal with cross browser issues for scaling. This can be difficult, hence the table approach.

For an example, have a look at www.djdiscoveryworld.com (click on the forum). Then just view source.

HTH

:)


.....the man in black fled across the desert..........and the gunslinger followed.....

Bulletman
15 years ago
http://elitetacticalrecon.net/yetanotherforum/  🙂
tiger
  • tiger
  • 55.4% (Neutral)
  • YAF Forumling
15 years ago
The Lite version does not support this. Please purchase the full version if you'd like to have access to templates.