hello designers,
recently had a task which could not suffice with old traditional tables(obsolete)
and had to ditch them for divisions. to make the outlook similar to how a table appeared before requires much use of css styles; a couple of them that were of use;
float:left /* to make two divs appear adjacent to each other(no break) */
position:relative/absolute /* can be used to set div position, handy for div shadows */
filter:alpha(opacity=60); /* transparent div in IE */
-moz-opacity: 0.6; /* transparent div for Netscape earlier versions */
opacity: 0.6; /* transparent div for mozilla and other gecko browsers */
to be sure use all in your css;
be careful with nested divs as styles can be inherited if not set inline for inner divs.
complete reference at www.w3schools.com.
Saturday, March 14, 2009
Adding custom properties to webparts
Another handy tip for beginners; ever seen those properties that show up in the toolpane when u want to edit webpart? there is much more that can be added to suit your customization needs.
the general format of c# properties consists of a get and set method for the required value
if u add the following piece of code to the existing you shd get what u want;
[Personalizable(PersonalizationScope.Shared)] //enable personal views
[WebBrowsable(true)]
[System.ComponentModel.Category("My Properties")] /*create category for new property, will default to miscellaneous if undefined */
[WebDisplayName("Another Property")]
private string _anotherProperty;
public string AnotherProperty
{
get { return _anotherProperty; }
set { _anotherProperty = value; }
}
watch out for differences between sharepoint and asp.net webparts
Good luck!
the general format of c# properties consists of a get and set method for the required value
if u add the following piece of code to the existing you shd get what u want;
[Personalizable(PersonalizationScope.Shared)] //enable personal views
[WebBrowsable(true)]
[System.ComponentModel.Category("My Properties")] /*create category for new property, will default to miscellaneous if undefined */
[WebDisplayName("Another Property")]
private string _anotherProperty;
public string AnotherProperty
{
get { return _anotherProperty; }
set { _anotherProperty = value; }
}
watch out for differences between sharepoint and asp.net webparts
Good luck!
Subscribe to:
Posts (Atom)