Title: Adding a DIV
Last modified: July 2, 2023

---

# Adding a DIV

 *  [sacconi](https://wordpress.org/support/users/sacconi/)
 * (@sacconi)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/adding-a/)
 * In archive pages I have this code:
 *     ```wp-block-code
       <?
   
       get_header();
       ?>
       <BR></BR>
       <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
   
       	<main id="primary" class="site-main">
       ```
   
 * Instead of the broken rule, that works also on mobiles (and an extra space is
   too much), I thought I could create a div space to contain “the archive title”,
   so that I could give a little of padding top to the title only to bigger screens,
   instead of the broken rule. Other wise I should code something to make work the
   broken rule only on big screens
    -  This topic was modified 2 years, 11 months ago by [sacconi](https://wordpress.org/support/users/sacconi/).

Viewing 1 replies (of 1 total)

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/adding-a/#post-16862899)
 * Your page title already has enough markup to style it with CSS, there’s no need
   for the `<br>` tag or enclosing it in a `div` container.
 * You can add your padding with the following CSS selector:
 *     ```
       h1.page-title {
           padding-top: 10px
       }
       ```
   
 * If this doesn’t work, then some other CSS on the page is overriding it… and you’ll
   have to provide a live URL for us to check and give you the correct CSS code.

Viewing 1 replies (of 1 total)

The topic ‘Adding a DIV’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [style](https://wordpress.org/support/topic-tag/style/)
 * [underscores](https://wordpress.org/support/topic-tag/underscores/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [George Appiah](https://wordpress.org/support/users/gappiah/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/adding-a/#post-16862899)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
