-16

I feel very stressful when I enter Stack Overflow because it is not useful for me. When I submit my question, it gives me this:

If you need to do something that Markdown can't handle, use HTML. Note that we only support a very strict subset of HTML!

Strikethrough humor is <strike>funny</strike>.
Markdown is smart enough not to mangle your span-level HTML:

<b>Markdown works *fine* in here.</b>
Block-level HTML elements have a few restrictions:

They must be separated from surrounding text by blank lines.
The begin and end tags of the outermost block element must not be indented.
Markdown can't be used within HTML blocks.

<pre>
    You can <em>not</em> use Markdown in here.
</pre>

Also this:

Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.

What is the meaning of these messages?

  • 4
    It means that you are trying to use HTML or other code that is not allowed or not correctly formatted. – Roddy of the Frozen Peas Jul 3 at 20:29
  • so what is the correct format? i paste the code then select them and click code button – Murat Deniz Jul 3 at 20:31
  • 4
    I do not know, because I do not know what you're trying to post. – Roddy of the Frozen Peas Jul 3 at 20:33
  • before i try to ask on stackoverflow, i asked it on that and you can control what is the mistake: – Murat Deniz Jul 3 at 20:36
  • Upload a sceenshot of what you post. – rene Jul 3 at 20:36
  • @rene can you look at the link i pasted? – Murat Deniz Jul 3 at 20:38
  • remove the --- before this code doesnt work: and make sure that last dangling closing style tag is indeed marked as code. Do note that doesnt is correctly spelled as doesn't. Your post can use some more explanation between each part and a closing sentence what you're looking for – rene Jul 3 at 20:40
  • @rene should i add tag before and after the code? can you explain with a example? – Murat Deniz Jul 3 at 20:43
  • there is nothing -- its automatic – Murat Deniz Jul 3 at 20:43
0

If you add enough substance with empty lines between code blocks and add enough non-code content it should post. Something like what is shown here. I've left the sloppy indentation, I suggest you fix that your self.

I have the following page on a WordPress site that looks like this on mobile screens:

![](https://i.ibb.co/gDBMwMs/2111.png)

As you can see the elements are not centered.

I use a `<nav>`  tag which is part of my header.php

### Header.php

    <nav class="navbar navbar-expand-md navbar-light  sticky-top" style="background-color:rgb(3, 0, 180);" role="navigation">
      <div class="container cep" >
        <!-- Brand and toggle get grouped for better mobile display -->

        <a class="navbar-brand"  > 
        </a>
      <?php $custom_logo_id = get_theme_mod( 'custom_logo' );
    $custom_logo_url = wp_get_attachment_image_url( $custom_logo_id , 'full' );
    echo '<img src="' . esc_url( $custom_logo_url ) . '" class="img-fluid" alt="Responsive image" style="max-height: 150px;
      max-width: 180px; padding-right:10px;">'; ?>


     <?php
               wp_nav_menu( array(
                   'menu'              => 'primary',
                   'theme_location'    => 'primary',
                   'depth'             => 2,
                   'container'         => 'div',
                   'container_class'   => 'collapse navbar-collapse',
           'container_id'      => 'bs-example-navbar-collapse-1',
                   'menu_class'        => 'nav navbar-nav',
                   'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
                   'walker'            => new wp_bootstrap_navwalker())
               );
           ?>
        </div>
    </nav>


I have the following CSS and I believe this does not work:

###CSS

<!-- language: lang-css -->

        @media screen and (max-width:900px) ,screen and (max-device-width:900px) {

      .cep{ 
          margin-left: auto;
      margin-right: auto;
           text-align: center;
            } 
    }


I'm not sure if I need to change the html, the CSS or both to have the elements centered. 

Result

The above markdown should come out as:


I have the following page on a WordPress site that looks like this on mobile screens:

As you can see the elements are not centered.

I use a <nav> tag which is part of my header.php

Header.php

<nav class="navbar navbar-expand-md navbar-light  sticky-top" style="background-color:rgb(3, 0, 180);" role="navigation">
  <div class="container cep" >
    <!-- Brand and toggle get grouped for better mobile display -->

    <a class="navbar-brand"  > 
    </a>
  <?php $custom_logo_id = get_theme_mod( 'custom_logo' );
$custom_logo_url = wp_get_attachment_image_url( $custom_logo_id , 'full' );
echo '<img src="' . esc_url( $custom_logo_url ) . '" class="img-fluid" alt="Responsive image" style="max-height: 150px;
  max-width: 180px; padding-right:10px;">'; ?>


 <?php
           wp_nav_menu( array(
               'menu'              => 'primary',
               'theme_location'    => 'primary',
               'depth'             => 2,
               'container'         => 'div',
               'container_class'   => 'collapse navbar-collapse',
       'container_id'      => 'bs-example-navbar-collapse-1',
               'menu_class'        => 'nav navbar-nav',
               'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
               'walker'            => new wp_bootstrap_navwalker())
           );
       ?>
    </div>
</nav>

I have the following CSS and I believe this does not work:

CSS

    @media screen and (max-width:900px) ,screen and (max-device-width:900px) {

  .cep{ 
      margin-left: auto;
  margin-right: auto;
       text-align: center;
        } 
}

I'm not sure if I need to change the html, the CSS or both to have the elements centered.

  • thank you but i have new problem which is that ask button is passive so i cant ask.how can i solve it? – Murat Deniz Jul 3 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .