adsense

How to Center Headers in CSS on WordPress





1. Open your browser and load the wp-admin directory of your WordPress website. Enter your username and password to log in to the dashboard.
2. Navigate to 'Editor' under 'Appearance' to load the 'Edit Themes' screen. Load the header.php template file in to the editor box by clicking on its link under the 'Templates' heading.

3. Locate the set of tags wrapping around your header. Depending on the theme and the standard of HTML used, you might find '
,' '
,' or '
' tags. Find the ID assigned to the wrapping tag:
Header content here...
In the above example, 'myheader' is the ID you need.
4. Load style.css in the editor by clicking its link at the bottom of the list of template files. Find the selector that targets your header. Here is an example using the 'myheader' ID:#myheader {background: URL(path/to/image.png) center no-repeat;width: 960px;height: 200px;}
5. Add the following CSS code between the curly braces for the '#myheader' selector:margin-left: auto;margin-right: auto;Click the blue 'Update File' button to save your work.

Comments

0 Responses to "How to Center Headers in CSS on WordPress"

Post a Comment

Popular Posts

About