# CSS Clearfix for \`admin-contents\`

**URL:** https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424
**Category:** Bug
**Created:** [February 19, 2015, 8:22pm UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424 "2015-02-19T20:22:07Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [February 19, 2015, 8:22pm UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/1 "2015-02-19T20:22:07Z")

</div>

Can I get a CSS clearfix for `admin-content` `DIV` ?

 ![](https://global.discourse-cdn.com/meta/original/3X/7/a/7a8ad9277e3c250e1b8490cdf2c534a2c1b2ea4e.png) 

 ![](https://global.discourse-cdn.com/meta/original/3X/4/6/461b6e218dff8713872693489fb08f8345297b9f.png)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [February 20, 2015, 6:53am UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/2 "2015-02-20T06:53:23Z")

</div>

Aren’t CSS styles removed when you view the admin pages? Unless you apply the CSS in the `</head>` section I suppose. Is that how you got that bright blue background?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 20, 2015, 7:01am UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/3 "2015-02-20T07:01:12Z")

</div>

no, but I discussed this with @eviltrout before, we want to remove them unconditionally when you enter admin.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [February 20, 2015, 10:03am UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/4 "2015-02-20T10:03:29Z")

</div>

Why? I quite like having my admin interface match the main forum’s design.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [February 20, 2015, 10:17am UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/5 "2015-02-20T10:17:08Z")

</div>

You need, at minimum, an obvious way to recover if a CSS compilation error or CSS bonehead error occurs though.

(Boneheaded: `body { display: none; }`)

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [February 20, 2015, 10:18am UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/6 "2015-02-20T10:18:53Z")

</div>

Sure, but that’s why the admin interface is loaded sans customizations when it’s entered directly (i.e. browse to `/admin` in an empty tab) instead of via an Ember transition, no?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 20, 2015, 11:18am UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/7 "2015-02-20T11:18:06Z")

</div>

Yeah but that behavior isn’t consistent and is generating support requests.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [February 20, 2015, 11:35am UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/8 "2015-02-20T11:35:17Z")

</div>

This request does stem from admin having an issue directly because of “user styles” being applied in admin…  
… When visiting admin from an initial normal page load which happens frequently.

For these screenshots I simply added the blue background to the `<HTML>` tag in Chrome Dev tools after loading admin directly with a dark color only theme (no CSS).

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 20, 2015, 4:44pm UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/9 "2015-02-20T16:44:58Z")

</div>

I just pushed a fix that will **automagically** disable custom stylesheets when you’re entering the `/admin` section and enable them back when you’re leaving it 💐

[https://github.com/discourse/discourse/commit/7e1651a36e9d47f9a987b37481ef05057f8b497c](https://github.com/discourse/discourse/commit/7e1651a36e9d47f9a987b37481ef05057f8b497c)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 20, 2015, 4:45pm UTC](https://meta.discourse.org/t/css-clearfix-for-admin-contents/25424/10 "2015-02-20T16:45:02Z")

</div>


