First: do your compensations. If not done right this will affect all gatings.
Second: exclude dead cells and doublets before gating on T-cells.
The CD4+CD8+ cells will be in the upper right corner. Most publication gate closely around this double positive population ; everything to the left or below are your CD4+ or CD8+ thymocytes.
For phenotyping or looking at the percentage of CD4 and CD8 positive T cells care should be taken as monocytes also do express CD4 marker while a fraction of NK cells also express CD8. So i would suggest to introduce CD3 marker as well.
Then grating strategy would be as. 1) First gate CD3 positive cells. 2) then from this you can plot fluorescence for CD4 on x-axis and fluorescence for CD8 on y-axis. this would give you four populations DP, DN, CD4+ and CD8+.