My Blog

Author:Philip BeadleCreated:Monday, September 15, 2008 10:40 AM
This blog is more general than my Blog at http://www.dotnetnuke.com/Community/Blogs/tabid/825/Default.aspx. You'll find mostly technical tips and tricks and things i am doing in the MS user group community.

After a mammoth effort Lorraine Young has finished the Help for DNN 4.6.  The Help is very comprehensive and is now 680 pages!!  Check it out at http://www.dotnetnuke.com/Resources/Documentation/DotNetNukeOnlineHelp/tabid/787/Default.aspx.

 

We have set up a new mailing list at listserver@ozdnn.com.  If you'd like to subscribe just put subscribe in the subject. 

I had a blast doing the RDN Sessions.  As expected the session got more and more polished over the course of the 3 days, I tweaked it a little each time and have had pretty good feedback.  The content will be up on the Readify site this week for you to download.

Even though it was called an Introduction to Silverlight the content I presented was a bit more low level then intro level but most attendees seemed to get the gist of what i was talking about which was to look at Silverlight not jsut as a XAML technology but also as a way to manipulate the DOM on the client.

In case you aren’t aware (or you’ve forgotten) you might be interested to know that Readify are conducting a series of free events for developers covering the various new .NET technologies.  No strings attached, no sales pitches.  Just our way of contributing to the local developer community.
 
It’s a great opportunity for you to get your head around some of the new stuff coming out of Redmond, and even if you can’t use it for your current projects it makes for some good professional development time J
 
These events get under way in a few weeks so it might be worth having a think about which ones are of interest to you and registering.
 
For a bit more of a run down on why we’re doing it have a look at Greg Low’s blog entry.
 

You can also see the calendar of events on the Readify site.  The first one is my session October 2, 3 and 4 on Silverlight.

 

Jon Flanders will come down under, 13-16 November 2007 to Melbourne to deliver his 4 day Applied WF intensive course which affords experienced .NET developers training in WF tools and services needed to add rich workflow capabilities to their ASP.NET and Smart Client applications as well as Web and Windows services.
For More information and to book your place http://www.readify.net.au/Default.aspx?tabid=281 or email training@readify.net.au

Juval Lowy is returning to Australia by popular demand to deliver his best-of-breed WCF Master Class from 15-19 October 2007 in Sydney. This 5 day intensive course covers WCF programming, design guidelines, pitfalls, original techniques and best practices.
For More information and to book your place http://www.readify.net.au/Default.aspx?tabid=241 or email training@readify.net.au

Just made it to Star Contributor on ASP.Net after countless hours of moderating and posting.

asp.net star contributor

So next target is an All Star....

I have been using more and more CSS in my designs lately and decided to do an all CSS form.  This worked fine for normal labels and text boxes but when I used the DotNetNuke label control the form got all messed up.  This is because the DNNLabel has a hidden div with a break in it that messed up the layout.  So to get around this I developed the form like this:

<div id="inputform">
<
fieldset>
    <legend>Person of Interest</legend>
    <div class="dnnlabel">
        <dnn:Label ID="lblLastName" ControlName="txtLastName" ResourceKey="lblLastName" runat="server" />
    </div>
    <asp:TextBox ID="txtLastName" runat="server" TabIndex="2"></asp:TextBox>
    <asp:RequiredFieldValidator ID="rfvLastName" runat="server" ErrorMessage="Last name is required."
        Text="*" ControlToValidate="txtLastName" CssClass="NormalRed"></asp:RequiredFieldValidator><br />
    <div class="dnnlabel">
        <dnn:Label ID="lblFirstName" ControlName="txtFirstName" ResourceKey="lblFirstName"
            runat="server" />
    </div>
    <asp:TextBox ID="txtFirstName" runat="server" TabIndex="3"></asp:TextBox>
    <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ErrorMessage="First name is required."
        Text="*" ControlToValidate="txtFirstName" CssClass="NormalRed"></asp:RequiredFieldValidator><br />
    <div class="dnnlabel">
        <dnn:Label ID="lblDateOfBirth" ControlName="txtDateOfBirth" ResourceKey="lblDateOfBirth"
            runat="server" />
    </div>
    <asp:TextBox ID="txtDateOfBirth" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="rfvDateOfBirth" runat="server" ErrorMessage="Date of birth is required."
        Text="*" ControlToValidate="txtDateOfBirth" CssClass="NormalRed"></asp:RequiredFieldValidator>&nbsp;<asp:HyperLink
            ID="cmdDOBCalendar" CssClass="CommandButton" runat="server" TabIndex="4" >[cmdDOBCalendar]</asp:HyperLink><br />

</fieldset>

</div>

With the corresponding CSS:

#inputform/* set width in inputform, not fieldset (still takes up more room w/ fieldset width */
 font:100%;
 font-family: Tahoma, Arial, Helvetica;
 margin: 0;
 padding: 0;
 min-width: 500px;
 max-width: 600px;
 width: 560px;
 text-align:left;
}
 
#inputform fieldset {
 /* clear: both; note that this clear causes inputs to break to left in ie5.x mac, commented out */
 border-color: #000;
 border-width: 1px;
 border-style: solid;
 margin-top:10px;
 padding:20px;
}
 
#inputform fieldset legend {
      font-size:1.1em; /* bump up legend font size, not too large or it'll overwrite border on left */
                       /* be careful with padding, it'll shift the nice offset on top of border */
}
 
.dnnlabel {
      display: block/* block float the labels to left column, set a width */
      float: left;
      width: 150px;
      padding: 0;
      text-align: right;
      margin-right:10px;
      margin-top:5px;
}
 
.inputspan
{
}
 
#inputform input, textarea, select {
      /* display: inline; inline display must not be set or will hide submit buttons in IE 5x mac */
      width:auto;      /* set width of inputform elements to auto-size, otherwise watch for wrap on resize */
      margin-top:5px;
}
 
#inputform br {
      clear:left; /* setting clear on inputs didn't work consistently, so brs added for degrade */

}

This gives a nicely laid out form with not a table in sight.

 

 

 

 

After my last post I got a response from Joseph Sak.  Joseph told me that I could achieve the same outcome of the

div.float-clear {
   clear: both;
   height: 0px;
   overflow: hidden;
}

<div class="float-clear">div>

by simply adding overflow: hidden; to the parent div of the one with the floating divs.  I tried this out and voilà you get the same effect without having to add the extra div to clear the floats.

So now I have changed the HTML to this

<div class="float-clear">
        <div id="links">
            <a class="SkinObject>Home> | 
            <a class="SkinObject>Contact Us>
        div>
        <div id="user">
            Content goes here
        div>
div>

and the CSS now looks like this

div.overflow-hidden{
 
   overflow: hidden;
}

Less markup for the same effect.

I have been building some new skins using CSS to do the layout.  This is a bit of a challenge but worth it once you get the hang of it.  One of the neat tricks I learnt from Damian Edwards is that when you float a div this can behave differently in IE and Fire Fox.  So a good way to get the divs to behave is to add a clearing div like this:

Add this to your CSS

div.float-clear {
   clear: both;
   height: 0px;
   overflow: hidden;
}

and then add a div like this

<div class="float-clear"></div>

just inside the enclosing div like this

<div>
        <div id="links">
            <a class="SkinObject>Home</a>&nbsp;|&nbsp;
            <a class="SkinObject>Contact Us</a>
        </div>
        <div id="user">
            Content goes here
        </div>
        <div class="float-clear"></div>
</div>

The links and user divs are floated in the CSS and the float-clear div makes the layout work correctly in Fire Fox.

To get my fixed width site design to be centre aligned I used two methods together.  For Fire Fox i used

<div id="pagecontent" style="width:1003px; margin:0px auto 0px auto;">And for Internet Explorer i used

#pagemaster
{
 
      text-align:center;
}

in the CSS file.

So there you have it how to make your CSS layouts behave perfectly in both IE and FF.

 

  
DNN Template Maker

Artisteer - Web Design Generator

  
UsersOnline
MembershipMembership:
Latest New UserLatest:andpro
Past 24 HoursPast 24 Hours:0
Prev. 24 HoursPrev. 24 Hours:0
User CountOverall:32

People OnlinePeople Online:
VisitorsVisitors:13
MembersMembers:0
TotalTotal:13

Online NowOnline Now:
  
Talk to me
  
Good Books
My Logos


MVP Logo
From: 2004-2009

Lorraine Young's DNN Site

DotNetNuke Sponsor and Platinum Benefactor logo

 Microsoft ASP.net logo

microsoftcertifiedprofessional.gif

vicnet_logo.gif