Topic on Project:Support desk

Jump to navigation Jump to search

Can't get css child selector to apply style through common.css

5 (talkcontribs)

I have a wiki page;

I'm trying to style all div elements under the 'mainpage-elements' class but I can't get their styles applied at all.

I successfully applied a style directly to 'mainpage-elements'. Using developer tools I can see that divs are indeed direct descendants of 'mainpage-elements'.

I've added the following to common.css

.mainpage-elements > div { margin-bottom: 30px; width: 25%; }

Any idea why this might not be working? I must be missing something obvious.

Jackmcbarn (talkcontribs)

I don't see any elements with class 'mainpage-elements' on the page you linked to. (talkcontribs)

Sorry Jack, it's there now. It was there when i made the post asking for help but after several changes and attempts at fixing it I rolled the page back to an earlier state (before i tried to move from inline styling to common.css styling) where the class was not present

Jackmcbarn (talkcontribs)
TiltedCerebellum (talkcontribs)

This is unrelated. Nice wiki. :)

You might want to change the color of the TOC numbers to match your other light text, they are not currently visible

.tocnumber {
    color: #c1c1c1;

I can do some CSS fixes for you if it's available to logged in users and you want the help.

Nope user's cant edit or create talk pages, too bad and no one has any talk pages to comment on.

Reply to "Can't get css child selector to apply style through common.css"