# Need border or underline Heading/Section

I am using the article class and need to underline or put a box around the section. It's a resume heading so it needs to be neat.

\documentclass{article}
\usepackage[a4paper,bottom = 0.6in,left = 0.56in,right = 0.56in,top = 0.6in]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{array}
\usepackage{enumitem}
\usepackage{wrapfig}
\usepackage{microtype}
\usepackage{titlesec}
\usepackage{textcomp}
\usepackage[table]{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{verbatim}
\newcommand{\xfilll}[2][1ex]{
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}
\renewcommand\labelitemi{\raisebox{0.4ex}{\tiny$\bullet$}}
\renewcommand{\labelitemii}{$\cdot$}
\pagenumbering{gobble}
\begin{document}
\section*{\colorbox{lightgray!50}{\hspace{57.5mm}\Large Professional Experience\hspace{57.5mm}}}
\end{document}


I tried shifting /hline in the upward direction but couldn't do it either.

• Welcome to TeX SX! Is it for a single section? – Bernard Jul 24 '19 at 15:18
• It is for all the sections. I have found a solution not very elegant though. \section*{\framebox(516,16){\colorbox{lightgray!50}{\hspace{57.5mm}\Large Professional Experience\hspace{57.5mm}}}} – Anurag Gupta Jul 24 '19 at 16:35
• This is not a code for a section \ it will the vertical spacing around sections. – Bernard Jul 24 '19 at 16:41
• Do the headings have to be centred? – Bernard Jul 24 '19 at 16:45
• Yes, and It work – Anurag Gupta Jul 24 '19 at 19:09

I propose this:

\documentclass{article}
\usepackage[a4paper, bottom=0.6in, left=0.56in, right=0.56in, top=0.6in]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{array}
\usepackage{enumitem}
\usepackage{wrapfig}
\usepackage{microtype}
\usepackage{titlesec}
\usepackage{textcomp}
\usepackage[table, svgnames]{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{verbatim}
\newcommand{\xfilll}[2][1ex]{

\renewcommand\labelitemi{\raisebox{0.4ex}{\tiny$\bullet$}}
\renewcommand{\labelitemii}{$\cdot$}
\pagenumbering{gobble}

\begin{document}

Some text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

\section*{Professional Experience}

Some other text. Some other text. Some other text. Some other text…

\end{document}