I'm relatively new to CSS and have been working on various WordPress template projects. I've encountered a seemingly simple issue that I can't seem to find solutions for in the documentation or previous questions. My apologies if this has been addressed before!
My current challenge involves formatting a <ul>
list and links within it in a specific manner. The <ul>
is generated by the "Pages" widget in WordPress, residing in
<aside id="pages-2" class="widget widget_pages">
located within
<div id="secondary" class="widget-area" role="complementary">
Within my stylesheet, I've included these lines:
.widget-area ul {
list-style-type: none;
}
.widget-area a {
color: black;
}
.widget-area a:visited {
color: red;
}
.widget-area a:hover,
.widget-area a:focus,
.widget-area a:active {
color: midnightblue;
}
Despite this, the elements are still styled according to default ul
and a
styles, rather than the specificity of .widget-area
. Interestingly, the following lines have been successful:
.widget-area {
position: fixed;
max-width: 247px;
}
Any assistance would be greatly appreciated!
You can view the site here: