Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS fixed position on X axis but absolute on Y axis?
    primarykey
    data
    text
    <p>My container, <code>#topmenu</code> is in fixed position. I just added a phone number (image) that I want to move with this bar, but it doesn't move with the fixed bar.</p> <p>I've absolutely positioned it within a relatively positioned element, but it just doesn't stick.</p> <p>If I just make the phone number position:fixed then it moves around with the viewport width. What's the best way to accomplish what I'm doing?</p> <p>CSS fragment:</p> <pre class="lang-css prettyprint-override"><code>.topsocial a { margin-left: 15px; } #topmenu {position:fixed; z-index:220; } #topmenu .ktwrap {padding-top: 3px; padding-bottom: 3px; color: #fff;} #topmenu ul li { display:inline; list-style-type: none; padding: 0px 10px 0 0; font-size: 13px; } #topmenu .widget-container { margin-top: 5px;} .topsocial .widget-containter {margin-top: 0px!important;} #menu-menu li a span { display:block; line-height:14px; margin-right: 4px; text-transform: lowercase!important; } .menu-menu ul li a span { line-height:14px; margin-right: 4px; text-transform: lowercase!important; } .topsocial {margin-top: 5px; color: #fff;} .ktlogo {float: left; width: auto; margin-top:-35px; margin-left: 137px; font-family: 'HoneyScriptLight'; font-size: 60px; padding-top: 22px; } .ktlogo img:hover {background: none;} #navigationtop { font-size: 12px; color: #fff;} #navigationtop ul li strong { display: block; padding-bottom: 7px; font-size: 14px; } #navigationtop .ktwrap { padding-top: 60px; padding-bottom: 5px; height:71px; } #floatnumber { position: absolute; top: -3px; right: 150px; z-index : 270; } </code></pre> <p>PHP fragment:</p> <pre><code>&lt;?php get_template_part( 'includes/template-parts/topbar' ); ?&gt; &lt;?php } ?&gt; &lt;?php $disable_sidebar = of_get_option('disable_footer', '' ); if( $disable_sidebar['navbar']==0 ) { ?&gt; &lt;div class="ktfullwidth" id="navigationtop"&gt; &lt;div class="ktwrap"&gt; &lt;div id="floatnumber"&gt;&lt;img src="http://combined-effort.com/wp-content/uploads/telephone-18005174660.png" alt="Phone Number 1-800-517-4660"&gt;&lt;/div&gt; &lt;div class="ktlogo"&gt; &lt;?php $disable_sidebar = of_get_option('disable_parts', '' ); if( $disable_sidebar['logo']==0 ) { ?&gt; &lt;?php if ( of_get_option('logo') ) { ?&gt; &lt;a href="&lt;?php echo home_url() ?&gt;"&gt;&lt;img src="&lt;?php echo of_get_option('logo'); ?&gt;" /&gt;&lt;/a&gt; &lt;?php } else { ?&gt; &lt;a href="&lt;?php echo home_url() ?&gt;"&gt; &lt;?php if ( of_get_option('logotext') ) { ?&gt; &lt;?php echo of_get_option('logotext', ''); ?&gt;&lt;/a&gt; &lt;?php } else { ?&gt; Combined Effort&lt;/a&gt; &lt;?php } ?&gt; &lt;?php } ?&gt; &lt;?php } ?&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload