Index: /FCKeditor/branches/features/div_container/editor/dialog/fck_div.html
===================================================================
--- /FCKeditor/branches/features/div_container/editor/dialog/fck_div.html	(revision 2103)
+++ /FCKeditor/branches/features/div_container/editor/dialog/fck_div.html	(revision 2104)
@@ -79,13 +79,21 @@
 	// Popuplate the style menu
 	var styles = FCKStyles.GetStyles() ;
+	var match = null ;
+	var selectableStyles = {} ;
 	for ( var i in styles )
 	{
-		if ( ! /^_FCK_/.test( i ) )
+		if ( ! /^_FCK_/.test( i ) && styles[i].Element == 'div' )
 		{
-			AddStyleOption( i ) ;
 			if ( ActiveEl && styles[i].CheckElementRemovable( ActiveEl, true ) )
-				GetE( 'selStyle' ).value = i ;
+				match = i ;
+			selectableStyles[i] = styles[i] ;
 		}
 	}
+	if ( !match )
+		AddStyleOption( "" ) ;
+	for ( var i in selectableStyles )
+		AddStyleOption( i ) ;
+	if ( match )
+		GetE( 'selStyle' ).value = i ;
 
 	if ( ActiveEl )
@@ -131,9 +139,6 @@
 
 	var styleName = GetE( 'selStyle' ).value ;
-	var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
-	range.SetStart( ActiveEl, 3 ) ;
-	range.SetEnd( ActiveEl, 4 ) ;
 	if ( styleName )
-		FCKStyles.GetStyle( styleName ).ApplyToRange( range, false, true ) ;
+		FCKStyles.GetStyle( styleName ).ApplyToObject( ActiveEl ) ;
 
 	return true ;
@@ -154,5 +159,4 @@
 					<span fcklang="DlgDivStyle">Style</span><br />
 					<select id="selStyle" style="width: 100%;">
-						<option value="">&nbsp;
 					</select>
 				</td>
