Updating unordered lists without altering sidebar menu

wilperegrine
wilperegrine
edited June 2016 in Campaign Portal Building
I defined the font size of unordered lists so that they'll match my updated paragraph font (the default just seems ridiculously large to me), but unfortunately, this also shrank the font on my sidebar menu. In fact, my sidebar menu text appears even smaller than the list size in my wiki, I'm guessing because the fonts are different. Is there a way to adjust these two font sizes independently?

Comments

  • Bortas
    Bortas
    Posts: 645
    The issue is specificity: you are telling it to change list items and it is doing it. If you want it to apply only to your main content, then your CSS needs to be more specific.

    @li {font-size:20pt !important;}@

    will make all kinds of wonkiness. I bet what you want looks something more like:

    @p ul {font-size:20pt !important;}@

    Which narrows it down to unordered lists inside a paragraph. There might also be a 'main-content' bit in there, but I haven't enough time to play with it at the moment.

    -bort
    "Morwindl":https://morwindl.obsidianportal.com
  • weasel0
    weasel0
    Posts: 36
    Bortas: have you found the !important tag mandatory here? I know sometimes it's practically unavoidable(I have two of them for "A Parade of Black":https://a-parade-of-black.obsidianportal.com/) but as ChainsawXIV used to put it, it works great...until it doesn't.
  • wilperegrine
    wilperegrine
    Posts: 6
    Hmm, "p ul {font-size" etc. doesn't work, so perhaps I need to specify "main-content" instead of paragraph (aren't "p" and "ul/li" two different designations)?
  • saethone
    saethone
    Posts: 13 edited June 2016
    the nav bar is not inside the main-content div so you should just be able to use a more specific selector, and then not worry about using !important. something like


    .main-content ul { font-size:20px;}


    should work just fine


    ------------------
    "Endurance of Hope":https://enduranceofhope.obsidianportal.com/ - Age of Rebellion

    "Age of the Dragons":https://age-of-the-dragons.obsidianportal.com/ - Homebrew Fantasy
    Post edited by saethone on
  • wilperegrine
    wilperegrine
    Posts: 6
    That worked perfectly, thank you!
Sign In or Register to comment.

April 2024
Season of Strife

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions