I have a situation where the subfigure caption doesn't start at the start of the line. \captionsetup[table]{width=\textwidth} is added to try to have the caption take up the whole line rather than wrap at the boundaries of the table as recommended in Prevent wrapping of subtable captions in lyx.

%% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{caption}
\usepackage{subfig}
\captionsetup[table]{width=\textwidth}
\@ifundefined{showcaptionsetup}{}{%
\PassOptionsToPackage{caption=false}{subfig}}
\usepackage{subfig}
\makeatother
\usepackage{babel}
\begin{document}
%
\begin{table}
\caption{Valleys in promoters of genes correlated with overexpression by breast
cancer subtype}
\label{tab:vlyTallyUniqVlyMtchCntrlOvrExp}
\subfloat[Number of valleys in the promoter region marking overexpresses genes
in breast cancer by subtype]{\begin{raggedright}
\par\end{raggedright}
\begin{raggedright}
\label{tab:vlyTallyUniqCombinedVlyMtchCntrlOvrExp}
\par\end{raggedright}
\raggedright{}\begin{tabular}{|c|c|c|c|}
\cline{3-4}
\multicolumn{1}{c}{} & & \multicolumn{2}{c|}{Over-expression}\tabularnewline
\cline{3-4}
\multicolumn{1}{c}{} & & Basal & Luminal \tabularnewline
\hline
Marked & Basal & 131 & 116\tabularnewline
\cline{2-4}
Cell line & Luminal & 100 & 104\tabularnewline
\hline
\end{tabular}}
\subfloat[Directly overlapping valleys in promoters of genes correlated with
overexpression by breast cancer subtype]{\begin{raggedright}
\par\end{raggedright}
\begin{raggedright}
\label{tab:vlyTallyUniqOverlappingVlyMtchCntrlOvrExp}
\par\end{raggedright}
\raggedright{}\begin{tabular}{|c|c|c|c|}
\cline{3-4}
\multicolumn{1}{c}{} & & \multicolumn{2}{c|}{Over-expression}\tabularnewline
\cline{3-4}
\multicolumn{1}{c}{} & & Basal & Luminal \tabularnewline
\hline
Marked & Basal & 26 & 18\tabularnewline
\cline{2-4}
Cell line & Luminal & 20 & 10\tabularnewline
\hline
\end{tabular}}
\end{table}
\end{document}
\widthwhich causes an overfull\hbox. It overflows symmetrically to the left and the the right, which is why when everything is centered it looks alright. But now that you have everything flush left, overflowing to the left and right symmetrically causes a problem. Suggestion: look at the other things you are allowed to set with\captionsetup. See if you can actually set the right margin to some negative value to compensate. – Willie Wong Jan 25 '11 at 19:56