Note that there are some explanatory texts on larger screens.

plurals
  1. POPseudo Elements disappear in chrome but not firefox
    primarykey
    data
    text
    <p>I'm currently working on a project which requires a border on the top of the element and on the bottom and for it to be extended to the edge of the page. I have a wrapper that is at 960px wide, i've set the overflow-x to hidden on body and html. and i'm using the following styles.</p> <pre><code>#profile-page{ position:relative; overflow:hidden; } #profile-page .bottom:after, #profile-page .bottom:before { content: ""; position: absolute; left: 0px; right: 0px; height: 5px; background-image: -webkit-linear-gradient(0deg, #7ad100 95px, #00bce8 95px, #00bce8 190px, #ffde00 190px, #ffde00 285px, #ff5942 285px, #ff5942 380px); background-image: -ms-linear-gradient(0deg, #7ad100 95px, #00bce8 95px, #00bce8 190px, #ffde00 190px, #ffde00 285px, #ff5942 285px, #ff5942 380px); background-image: -moz-linear-gradient(0deg, #7ad100 95px, #00bce8 95px, #00bce8 190px, #ffde00 190px, #ffde00 285px, #ff5942 285px, #ff5942 380px); background-size: 380px; } #profile-page .bottom:before{ top: -2px; } #profile-page .bottom:after{ bottom: -2px; } #profile-page .bottom{ padding-left:3000px; margin-left:-3000px; padding-right:3000px; margin-right:-3000px; position:relative; background: #ffffff; } </code></pre> <p>The styling shows up fine in firefox, it doesn't show up in chrome or ie9(haven't tested others). I've included screenshots so you can see the actual output. </p> <p>If i remove the styling to make .bottom stretch to the edge of the screen, the styling shows up in chrome. I can not figure what piece of that styling is messing with my pseudo elements but hoping someone here would know. Thanks in advance.</p> <p><strong>EDIT: Just wanted to clear this up, if I remove the following rules that I put REMOVE next to the psuedos show up. But then my div no longer reaches the edge of the screen and is contained to the wrapper, which can't happen</strong></p> <pre><code> #profile-page .bottom{ padding-left:3000px; -REMOVE margin-left:-3000px; -REMOVE padding-right:3000px; -REMOVE margin-right:-3000px; -REMOVE position:relative; background: #ffffff; } </code></pre> <p><em>CSS is sort of written in less, Tried to take out any Less shortcuts but might have missed some just incase people think they see something wrong.</em></p> <p><strong>EDIT: As requested, HTML Structure</strong></p> <pre><code>&lt;html&gt; &lt;body id="profile-page"&gt; &lt;div id="wrapper"&gt; &lt;div class="top"&gt;&lt;/div&gt; &lt;div class="item bottom"&gt; &lt;div id="profile-content"&gt;PROFILE LINKS&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><img src="https://i.stack.imgur.com/sfuY8.png" alt="Firefox"></p> <p><img src="https://i.stack.imgur.com/iqqzr.png" alt="Chrome"></p> <p>Top is firefox, bottom chrome</p>
    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.
 

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