trumso
2015-05-13T14:50:55Z
Originally Posted by: Zero2Cool 


Add this to the very top of you theme.css file in the /themes/YafVision/ directory.

.yafnet
{
	background-color: #008800;
}


If it worked, you'll see green in the background.



Yes, it worked smoothly, but I mean this background :cheesy:
Sorry for any confusing.

UserPostedImage

2015-05-13T14:52:11Z
Originally Posted by: trumso 

Originally Posted by: Zero2Cool 


Add this to the very top of you theme.css file in the /themes/YafVision/ directory.

.yafnet
{
	background-color: #008800;
}


If it worked, you'll see green in the background.



Yes, it worked smoothly, but I mean this background :cheesy:
Sorry for any confusing.

UserPostedImage



Are you running YAF by itself or within another environment such as DotNetNuke or maybe your own ASP.NET program? Do you have the site online?

trumso
2015-05-13T15:19:21Z
2015-05-13T15:45:18Z
Originally Posted by: trumso 

Yes, Zero2Cool. It's still testing.

http://mvatoi-001-site1....terasp.net/testingforum/ 




Remember where you added that last snippet of CSS? Add , body like below and that'll make the whole thing Green.

.yafnet, body {
  background-color: #008800;
}
trumso
2015-05-13T16:15:04Z
Originally Posted by: Zero2Cool 


Remember where you added that last snippet of CSS? Add , body like below and that'll make the whole thing Green.

.yafnet, body {
  background-color: #008800;
}



wow it's working perfectly.
Many thanks.
trumso
2015-05-15T19:53:08Z
Hello Zero2Cool,
Could you please teach me how I can center YAF.NET forum? I used your code which you posted before and add on the top of theme.css but it didn't word. Thanks

.ctr {
    margin-left: auto;
    margin-right: auto;
}
2015-05-15T19:56:03Z
Originally Posted by: trumso 

Hello Zero2Cool,
Could you please teach me how I can center YAF.NET forum? I used your code which you posted before and add on the top of theme.css but it didn't word. Thanks

.ctr {
    margin-left: auto;
    margin-right: auto;
}



You have to wrap a <div class="ctr"> </div> around your YAF forum in the default.aspx page.
trumso
2015-05-15T23:13:25Z
Thanks, Zero2Cool,
Here is my code following your instruction but it doesn't work.

<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Inherits="YAF.ForumPageBase" %>
<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<script runat="server">
	
</script>
<div class="ctr">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="YafHead" runat="server">
    <meta id="YafMetaScriptingLanguage" http-equiv="Content-Script-Type" runat="server"
        name="scriptlanguage" content="text/javascript" />
    <meta id="YafMetaStyles" http-equiv="Content-Style-Type" runat="server" name="styles"
        content="text/css" />
    <meta id="YafMetaDescription" runat="server" name="description" content="Yet Another Forum.NET -- A bulletin board system written in ASP.NET" />
    <meta id="YafMetaKeywords" runat="server" name="keywords" content="Yet Another Forum.net, Forum, ASP.NET, BB, Bulletin Board, opensource" />
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width,user-scalable=yes"/>
    <title></title>
</head>
<body style="margin: 0; padding: 5px">
    <asp:HyperLink runat="server" id="BannerLink" >
        <img src="~/forumlogo.gif" runat="server" alt="logo" style="border: 0;" id="imgBanner" />
    </asp:HyperLink>
    <br />
    <form id="form1" runat="server" enctype="multipart/form-data">
    <YAF:Forum runat="server" ID="forum" BoardID="1">
    </YAF:Forum>
    </form>
</body>
</html>
</div>


.ctr {
    margin-left: auto;
    margin-right: auto;
}

/* Change forum's background color */
.yafnet, body {
  background-color: #E0FFFF; 
}

.yafnet .EditorDiv td
{
    padding: 0 !important;
    border: 0 !important;
}
2015-05-15T23:22:01Z
Originally Posted by: trumso 

Thanks, Zero2Cool,
Here is my code following your instruction but it doesn't work.

<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Inherits="YAF.ForumPageBase" %>
<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<script runat="server">
	
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="YafHead" runat="server">
    <meta id="YafMetaScriptingLanguage" http-equiv="Content-Script-Type" runat="server"
        name="scriptlanguage" content="text/javascript" />
    <meta id="YafMetaStyles" http-equiv="Content-Style-Type" runat="server" name="styles"
        content="text/css" />
    <meta id="YafMetaDescription" runat="server" name="description" content="Yet Another Forum.NET -- A bulletin board system written in ASP.NET" />
    <meta id="YafMetaKeywords" runat="server" name="keywords" content="Yet Another Forum.net, Forum, ASP.NET, BB, Bulletin Board, opensource" />
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width,user-scalable=yes"/>
    <title></title>
</head>
<body style="margin: 0; padding: 5px">
    <asp:HyperLink runat="server" id="BannerLink" >
        <img src="~/forumlogo.gif" runat="server" alt="logo" style="border: 0;" id="imgBanner" />
    </asp:HyperLink>
    <br />
    <form id="form1" runat="server" enctype="multipart/form-data">
    <YAF:Forum runat="server" ID="forum" BoardID="1">
    </YAF:Forum>
    </form>
</body>
</html>
</div>


.ctr {
    margin-left: auto;
    margin-right: auto;
}

/* Change forum's background color */
.yafnet, body {
  background-color: #E0FFFF; 
}

.yafnet .EditorDiv td
{
    padding: 0 !important;
    border: 0 !important;
}



Check out line 30ish...
<div class="ctr">
<YAF:Forum runat="server" ID="forum" BoardID="1"></YAF:Forum>
</div>
trumso
2015-05-16T03:56:35Z
Thank you so much.
Maybe I do something wrong, and it still doesn't work. Could you please help to edit code directly below original default.aspx file?
<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Inherits="YAF.ForumPageBase" %>
<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<script runat="server">
	
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="YafHead" runat="server">
    <meta id="YafMetaScriptingLanguage" http-equiv="Content-Script-Type" runat="server"
        name="scriptlanguage" content="text/javascript" />
    <meta id="YafMetaStyles" http-equiv="Content-Style-Type" runat="server" name="styles"
        content="text/css" />
    <meta id="YafMetaDescription" runat="server" name="description" content="Yet Another Forum.NET -- A bulletin board system written in ASP.NET" />
    <meta id="YafMetaKeywords" runat="server" name="keywords" content="Yet Another Forum.net, Forum, ASP.NET, BB, Bulletin Board, opensource" />
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width,user-scalable=yes"/>
    <title></title>
</head>
<body style="margin: 0; padding: 5px">
    <asp:HyperLink runat="server" id="BannerLink" >
        <img src="~/forumlogo.jpg" runat="server" alt="logo" style="border: 0;" id="imgBanner" />
    </asp:HyperLink>
    <br />
    <form id="form1" runat="server" enctype="multipart/form-data">
    <YAF:Forum runat="server" ID="forum" BoardID="1">
    </YAF:Forum>
    </form>
</body>
</html>


Just double check. Should I add below code on top of theme.css?
.ctr {
    margin-left: auto;
    margin-right: auto;
}
Thanks
2015-05-16T15:15:13Z
<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Inherits="YAF.ForumPageBase" %>
<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<script runat="server">
	
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="YafHead" runat="server">
    <meta id="YafMetaScriptingLanguage" http-equiv="Content-Script-Type" runat="server"
        name="scriptlanguage" content="text/javascript" />
    <meta id="YafMetaStyles" http-equiv="Content-Style-Type" runat="server" name="styles"
        content="text/css" />
    <meta id="YafMetaDescription" runat="server" name="description" content="Yet Another Forum.NET -- A bulletin board system written in ASP.NET" />
    <meta id="YafMetaKeywords" runat="server" name="keywords" content="Yet Another Forum.net, Forum, ASP.NET, BB, Bulletin Board, opensource" />
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width,user-scalable=yes"/>
    <title></title>
</head>
<body style="margin: 0; padding: 5px">
    <asp:HyperLink runat="server" id="BannerLink" >
        <img src="~/forumlogo.jpg" runat="server" alt="logo" style="border: 0;" id="imgBanner" />
    </asp:HyperLink>
    <br />
    <form id="form1" runat="server" enctype="multipart/form-data">
<div class="ctr">
    <YAF:Forum runat="server" ID="forum" BoardID="1">
    </YAF:Forum>
</div>
    </form>
</body>
</html>


This is what you should have in the default.aspx page.
trumso
2015-05-16T16:16:24Z
Nothing change 😞
Could you please confirm what I need to do on theme.css? Thanks
2015-05-16T16:48:29Z
Originally Posted by: trumso 

Nothing change 😞
Could you please confirm what I need to do on theme.css? Thanks



Remove that div ctr class from your default.aspx.

Then in your theme.css

add margin:0 auto; to the yafnet, body element.

/* Change forum's background color */
.yafnet, body {
background-color: #E0FFFF;
margin:0 auto;
}

trumso
2015-05-16T17:08:39Z
Found out the answer 🙂
trumso
2015-05-29T04:43:45Z
Dear tha_watcha & Zero2Cool,

I really appreciate if you could you please help to write a BB code for below music website? Many thanks.

<object width="300" height="286">  <param name="movie" value="http://www.nhaccuatui.com/m/WwaehzZ8yV" />  <param name="quality" value="high" />  <param name="wmode" value="transparent" />  <param name="allowscriptaccess" value="always" /> <param name="allowfullscreen" value="true"/> <param name="flashvars" value="autostart=true" />  <embed src="http://www.nhaccuatui.com/m/WwaehzZ8yV" flashvars="target=blank&autostart=true" allowscriptaccess="always" allowfullscreen="true" quality="high" wmode="transparent" type="application/x-shockwave-flash" width="300" height="286"></embed></object>

PS. The number "m/WwaehzZ8yV" is a variable.
Users browsing this topic

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved