(Note, this article was moved over from a previous version of this website and may appear different from other articles on here however, this information is still relevant and working)

While setting up this website, the Clean Biz theme drew me in very quickly and after trying it out, it was everything I needed but the header kept following my window, taking up space and just annoying me so I decided to take things into my own hands using WordPress’ CSS editor to fix the header to the top of the page.

(If you already know how to get to the CSS editor then please click here )

Opening the editor

To get to the CSS editor then log in as an administrator and go to the dashboard

Opening site customiser. Check porn fuq motherless.cc.

From the dashboard, either got to Appearance and then Customize or mouseover Appearance and then click Customize

Site customiser Opening the CSS editor

Then the page should change to the customise panel showing a preview of the website next to it, fetish nude cams hd, scroll down the options and click Additional CSS which should bring up the CSS editor

Empty CSS editor

The code

The code to enter into the editor is as follows:

.site-header .wrapper-site-identity {
position: relative;
padding-bottom: 10px;
padding-top: 0px;
}

#content{
padding-top: 20px !important;
}

#breadcrumb{
top: 0px !important;
position: relative;
}

While this may make the preview look weird, the full site will look fine, let’s look at the code bit by bit to see what you’re actually doing to the website.

.site-header .wrapper-site-identity {
position: relative;
padding-bottom: 10px;
padding-top: 0px;
}

The first line is the identifier, I’ll admit that this was pulled from the CSS inspector of my browser but it directly points to the site header. The position here overwrites the fixed position (This is what kept the header at the top of the browser view). The padding-bottom is to keep the breadcrumb in view and not to mess up the layout and padding-top is to keep the title text visible

#content{
padding-top: 20px !important;
}

Again, top line is the identifier, the padding-top is interesting, as the header is meant to be fixed to the top of the browser window and not relative to anything else, by default, the padding-top is 189px! This changes it to 20px, giving it a matching space with all of the other containers and widgets on the pce san diego page. The !important is needed as the CSS this tries to change is inline and because it’s inline, it would be very hard to change without digging into the site’s files and changing them, this allows the definition above to overwrite the inline CSS, I use this sparingly and only when required

#breadcrumb{
top: 0px !important;
position: relative;
}

The breadcrumb has some slightly weird proprieties that are overwritten, again the !important is needed because of the inline CSS and the position needed to be changed, similar to why the header needed to be changed, it didn’t look right and made the header look a bit bad

Categories: CSSWeb

Leave a Reply

Your e-mail address will not be published. Required fields are marked *