trumso
  • Posts: 33
  • Joined: 02/05/2015
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

Zero2Cool
  • Posts: 1077
  • Joined: 26/04/2011
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
  • Posts: 33
  • Joined: 02/05/2015
Yes, Zero2Cool. It's still testing.

http://mvatoi-001-site1....terasp.net/testingforum/ 
Zero2Cool
  • Posts: 1077
  • Joined: 26/04/2011
Originally Posted by: trumso



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
  • Posts: 33
  • Joined: 02/05/2015
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
  • Posts: 33
  • Joined: 02/05/2015
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;
}
Zero2Cool
  • Posts: 1077
  • Joined: 26/04/2011
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
  • Posts: 33
  • Joined: 02/05/2015
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;
}
Zero2Cool
  • Posts: 1077
  • Joined: 26/04/2011
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
  • Posts: 33
  • Joined: 02/05/2015
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
Zero2Cool
  • Posts: 1077
  • Joined: 26/04/2011
<%@ 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
  • Posts: 33
  • Joined: 02/05/2015
Nothing change 😞
Could you please confirm what I need to do on theme.css? Thanks
Zero2Cool
  • Posts: 1077
  • Joined: 26/04/2011
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
  • Posts: 33
  • Joined: 02/05/2015
Found out the answer 🙂
trumso
  • Posts: 33
  • Joined: 02/05/2015
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
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    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