Is it possible to achieve a two-color border like the one in the following picture (black/gray) using Qt styles?
I've already tried to set the border style to groove (see my example below) but in this case the "2nd" color seems to be automatically generated based upon the first color setting. When I set the border color to black, the resulting "2nd" color becomes black, too.
QFrame#MainWorkspace{
background-color: #3a3a3a;
border: 2px groove #000000;
border-radius: 4px;
}
So, how can I achieve a two-colored border where each color is settable individually?
body{background-color: #3a3a3a;}
.MainWorkspace{
width:30px;
height:24px;
background-color: #3a3a3a;
border: 2px groove #000000;
border-radius: 4px;
color:#FF0000;
text-align:center;
padding-top:6px;
box-shadow: inset 0px 0px 3px rgba(234,234,234,0.9);
margin:5px 1px;
float:left;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div id="MainWorkspace" class="MainWorkspace">
<i class="fa fa-bars"></i>
</div>
<div class="MainWorkspace">
<i class="fa fa-th"></i>
</div
Related
I've run across a problem when creating a custom template for MailChimp - when editing links inside the emails content MailChimp overrides their styles. Here's a part of the template,
<a mc:edit="cta_link" target="_blank" href="*|CUSTOM_URL|*" style="font-family: 'Helvetica', 'Arial', sans-serif !important; font-size: 11px; color: #000000 !important; border-bottom: 1px solid #000000 !important; text-transform: uppercase !important; padding-bottom: 1px;">Read more</a>
As you can see I've also added !important rules to some of the styles to try and avoid any overrides but with no effect. I've switched between having a static example href src and the MailChimp custom url variable, doesn't seem to make any difference.
After updating the link the font changes to a default Times typeface.
Anything I'm missing?
4 years later and it's still happening.
The styles you apply to a link element are overridden by the global link styles.
My solution: insert a span tag inside the link.
<a mc:edit="cta_link" target="_blank" href="*|CUSTOM_URL|*"><span style="font-family: 'Helvetica', 'Arial', sans-serif !important; font-size: 11px; color: #000000 !important; border-bottom: 1px solid #000000 !important; text-transform: uppercase !important; padding-bottom: 1px;">Read more</a>
When hovering over an item how do I make it so the border wont change?
In the css I don't do anything to the borders,
#ALink:hover #SubMenu {
display: block;
position: relative;
top: 20px;
left: -18px;
}
As you can see in this JSFiddle, when you hover over A the border extends to the submenu. How do I make it not happen? (keep the border where it is)
JSFiddle
You are making #SubMenu visible, and SubMenu is wrapped in #ALink. When you make a child visible, parent re-sizes to show child element.
One solution can be as following. Of course you need to cleanup your css and make it beautiful again:
<a id="ALink" href="#">
<label>A</label>
<ul id="SubMenu">
<li class="items-2">Item 1</li>
<li class="items-2">Item 2</li>
<li class="items-2">Item 3</li>
</ul>
</a>
a > label {
display: block;
padding-left: 17px;
margin-top: 5px;
line-height: 40px;
font-size: 20px;
border: 1px solid #4f5058;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
color: #f3f3f3;
}
Check it out: http://jsfiddle.net/Zuct2/1/
I have an unordered list navigation menu in which I'm using css3 to fade in the background image on hover. The swapping of the images is working, but there is no transition or fade. Instead its just immediate. You can see here http://bokushucom.ipage.com/Miltonkarate/karate_test/
this is the mark up I'm using
<div id="header">
<div id="navMenu">
<div class="table">
<li>Home</li>
<li>Lil' Dragons</li>
<li>Junior Program</li>
<li>Adult Program</li>
<li>Kendo</li>
<li>Tai Chi</li>
<li>Contact</li>
</div>
</div><!--end of navMenu-->
</div><!--end of header-->
and the CSS
#navMenu {
position:absolute;
height:34px;
width:940px;
bottom:18px;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
left:0;
font-size: 12px;
list-style:none;
}
.table {
display: table; /* Allow the centering to work */
margin: 0 auto;
}
#navMenu li {
display: block;
float:left;
height:34px;
border-left:1px solid #5A5A5A;
border-right:1px solid #333;
position:relative;
line-height: 34px;
}
#navMenu li a {
display:block;
height:34px;
position:relative;
color:#FFF;
padding-left:15px;
padding-right:15px;
background:url(../images/navMenuBG.jpg) repeat-x;
-webkit-transition: background 2s 3s ease-in;
-moz-transition: background 2s 3s ease-in;
-o-transition: background 2s 3s ease-in;
transition: background 2s 3s ease-in;
}
#navMenu a:hover {
background:url(../images/navMenu_shadow.png);
height:35px;
color: #666;
}
I'm pretty new to CSS3. Perhaps I'm missing something?
There are a few things you need to correct on your code,
Change #navMenu a:hover to #navMenu li a:hover. This is just to make it more specific.
You are specifying duration two times on your transition line. Change transition: background 2s 3s ease-in; to transition: background 2s ease-in;. And consequently change all the transition lines.
Here's a Live Demo.
I hope this resolved your issue.
Just to note: 2s or 3s in the transition makes the effect look very slow. Make it less and it'll definitely look better.
Ok, I'm trying to tinker with my navigation menu. I want something like this website:
http://aleksfaure.com/
He has a single image (logo) centered with 2 menu links on either side. I've tried a couple of different things, including just using my logo as an image centered at the top, in between the menu. No dice.
Here's the relevant HTML and CSS I have with my current nav menu. I'm still kind of a intermediate beginner at this.
HTML
<nav role="navigation">
<ul id="nav">
<li>Home</li>
<li>About Me</li>
<ul id="nav-right" style="float:right;">
<li>Portfolio</li>
<li>Contact</li> </ul>
</ul></nav>
CSS
#header nav {
position: relative;
width: 700px;
height: 163px;
display: block;
margin: 0 auto;
text-align: center;
}
#header nav ul li {
float: left; list-style: none;
}
ul#nav li a {
display: block;
width: 100px;
height: 100px;
padding: 50px 0 0 0;
margin: 0 10px 0 10px;
font-family: 'MuseoSlab-500', Helvetica, sans-serif;
font-size: 16px;
text-transform: uppercase;
color: #000;
text-shadow: 0 2px 1px #bbbaba;
text-decoration: none;
}
ul#nav li a.mainnav:hover {
color: #13cad1;
text-shadow: 0 2px 1px #fff;
}
You don't need to use two separate lists. Treat the entire menu, including your image, as one list. Consider something like this for your HTML:
<div>
<ul id="nav">
<li>Home</li>
<li>About Me</li>
<li><img src="images/yourLogo.png"></li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div>
And make sure you have your style set to float: left;
#nav li { float: left; list-style: none;}
Then, just center the entire div on the page, and style your links as you want.
SEPARATE NOTES:
In your code, you are missing the closing tag for your first unordered list.
The navigation element is not very widely supported, so depending on your audience you may want to use a div.
I have a grid of 12 boxes created from an unordered list as below. Border radius works fine, but IU can't get the shadow to appear. Does the box-shadow property only work on divs, but not display block elements?
<ul id="treatments">
<li id="eyelash"></li>
<li id="massage"></li>
<li id="tanning"></li>
<li id="facials"></li>
<li id="waxing"></li>
<li id="tinting"></li>
<li id="threading"></li>
<li id="nails"></li>
<li id="makeup"></li>
<li id="hair"></li>
<li id="courses"></li>
<li id="bespoke"></li>
</ul>
#content #treatments li {
height: 125px;
width: 125px;
display: block;
float: left;
margin-right: 13px;
margin-bottom: 13px;
-moz-box-shadow: 1px 1px 2px #777;
-webkit-box-shadow: 1px 1px 2px #777;
box-shadow: 1px 1px 2px #777;
-moz-border-radius: 8px;
border-radius: 8px;
behavior: url(/scipts/PIE.php);
}
Be sure that the margin of <li> is not set to zero.
The box-shadow is rendered in the margin. No margin -> no shadow.
You shouldn't have any issues with using box-shadow on li elements since box-shadow can be applied to all elements. Here's the section on box-shadow on the W3C site.
I had same problem... box-shadow didn't work... The reason was in rbga instead of rgba in my css code! :D