Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS Creating a menu-div-box?
    primarykey
    data
    text
    <p>I am trying to create some simple menu links. I tried something like this:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>div.menulinkboxaround { height: 25px; } a.menulinkbox { font-family: Verdana, Helvetica; padding-left: 50px; padding-left: 50px; padding-bottom: 5px; padding-top: 5px; background-color: Green; } a.menulinkbox:hover { background-color: Red; } a.menulinkbox:visited { background-color: Yellow; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="menulinkboxaround"&gt;&lt;a href="asdf.gif" class="menulinkbox"&gt;Link 1&lt;/a&gt;&lt;/div&gt; &lt;div class="menulinkboxaround"&gt;&lt;a href="asdf.gif" class="menulinkbox"&gt;Link 2&lt;/a&gt;&lt;/div&gt; &lt;div class="menulinkboxaround"&gt;&lt;a href="asdf.gif" class="menulinkbox"&gt;Link 3&lt;/a&gt;&lt;/div&gt; &lt;div class="menulinkboxaround"&gt;&lt;a href="asdf.gif" class="menulinkbox"&gt;Link 4&lt;/a&gt;&lt;/div&gt;</code></pre> </div> </div> </p> <p>What i am trying to accomplish is to create menu elements that has a touch of style to em, so each link should be inside a div box with a padding 50 px on each side. When i run this, they get clumped up on top of each other. I don't want to specify a width since the text inside the menu box should determine the size of it automatically.</p> <p>Ex. (50px+text size+50px)</p> <pre><code>50px space (just green area) | Sample Text | 50px space (just green area) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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