I can get rootmenuitemlefthtml and rootmenuitemrighthtml to emit but not separator. Tried CDATA wrapping and setting SeparatorCssClass. I just want pipes between root menu items.
<dnn:SOLPARTMENU runat="server" id="dnnSOLPARTMENU" Separator="<![CDATA[|]]>" SeparatorCssClass="MainMenu_SeparatorCSS"
usearrows="false"
userootbreadcrumbarrow="false" usesubmenubreadcrumbarrow="false"
rootmenuitemlefthtml=" <span> " rootmenuitemrighthtml=" </span>" rootmenuitemcssclass="rootmenuitem"
rootmenuitemselectedcssclass="rootmenuitemselected" rootmenuitembreadcrumbcssclass="rootmenuitembreadcrumb"
submenucssclass="submenu" submenuitemselectedcssclass="submenuitemselected" submenuitembreadcrumbcssclass="submenuitembreadcrumb"
CSSNodeSelectedRoot="rootmenuitembreadcrumb" CSSNodeSelectedSub="submenuitembreadcrumb"
MouseOverAction="False" MouseOutHideDelay="0"
delaysubmenuload="true" level="Root" />
While not a direct answer - you might want to shift to the DotNetNuke menu rather than using SolPart. SolPart is no longer officially supported and development work on this menu ceased almost two years ago. Jon Henning, the author of SolPart, wrote the DotNetNuke menu from the ground up and tried to address many of the shortcomings in the original SolPart menu.
Check this for Solpartmenu:
<dnn:SOLPARTMENU runat="server" ID="dnnHorizontalSolpart" ProviderName="SolpartMenuNavigationProvider"
ClearDefaults="True" MenuBarCssClass="Hmain_dnnmenu_bar" MenuContainerCssClass="Hmain_dnnmenu_container"
MenuItemCssClass="Hmain_dnnmenu_rootitem" MenuItemSelCssClass="Hmain_dnnmenu_itemhoverRoot"
MenuIconCssClass="Hmain_dnnmenu_icon" MenuBreakCssClass="Hmain_dnnmenu_break"
SubMenuCssClass="Hmain_dnnmenu_submenu" SubMenuItemSelectedCssClass="Hmain_dnnmenu_subselected"
CSSNodeSelectedRoot="Hmain_dnnmenu_rootselected" MenuEffectsMouseOverDisplay="None"
Separator="|" SeparatorCssClass="Hmain_dnnmenu_separator" UseArrows="False" UseRootBreadCrumbArrow="False" />
.Hmain_dnnmenu_separator
{
background-color: Transparent;
color: #C55203;
font-family: Arial;
font-size: 11px;
}
.Hmain_dnnmenu_bar
{
cursor: pointer;
cursor: hand;
height: 30px;
background-color: Transparent;
}
.Hmain_dnnmenu_container
{
background-color: Transparent;
}
.Hmain_dnnmenu_rootitem
{
background-color: #DBDBDB;
cursor: pointer;
cursor: hand;
color: #C55203;
font-family: Arial;
font-size: 11px;
_height: 30px;
_padding: 5px;
vertical-align: middle;
text-decoration:underline;
}
.Hmain_dnnmenu_rootitem td
{
font-family: Arial;
font-size: 11px;
_height: 30px;
_padding: 5px;
vertical-align: middle;
}
.Hmain_dnnmenu_itemhoverRoot
{
background-color: #DBDBDB;
color: #C55203;
cursor: pointer;
cursor: hand;
font-family: Arial;
font-size: 11px;
_height: 30px;
_padding: 5px;
text-decoration:underline;
vertical-align: middle;
}
.Hmain_dnnmenu_icon
{
cursor: pointer;
cursor: hand;
}
.Hmain_dnnmenu_submenu
{
background-color: #DBDBDB;
border: solid 1px #B7B7B7;
cursor: pointer;
cursor: hand;
color: #C55203;
font-family: Arial;
font-size: 11px;
text-align: left;
text-decoration:none;
z-index: 1000;
}
.Hmain_dnnmenu_submenu td
{
border-bottom: solid 1px #B7B7B7;
font-family: Arial;
font-size: 11px;
text-align: left;
text-decoration:none;
}
.Hmain_dnnmenu_break
{
font-family: Arial;
font-size: 11px;
}
.Hmain_dnnmenu_rootselected
{
color: #C55203;
cursor: pointer;
cursor: hand;
font-size: 11px;
font-weight: lighter;
font-style: normal;
font-family: Arial;
white-space: nowrap;
vertical-align: middle;
text-decoration: None;
}
.Hmain_dnnmenu_submenu_itemhover
{
background-color: #C55203;
color: #FFFFFF;
font-family: Arial;
font-size: 11px;
}
.Hmain_dnnmenu_subselected
{
background-color: #C55203;
color: #FFFFFF;
font-family: Arial;
font-size: 11px;
}
Related
I wonder how to scroll one section to another using React, just like this web: https://www.stevenmengin.com/
Is there any specific technique I can use? or it is possible to do that using React Framer Motion? What kind of keyword shoud I use for googling it?
The idea is here i believe. Try search for Full Page Scroll https://codepen.io/Online-web-ustaad/pen/oVxVgB
*, ::before, ::after {
box-sizing: border-box;
}
body {
position: relative;
margin: 0;
overflow: hidden;
display: flex;
height: 100vh;
flex-direction: column;
line-height: 1.5;
font-family: 'Roboto Condensed', sans-serif;
font-size: 62.5%;
color: #f4f4f4;
background-color: #1d1e22;
}
.scrolls {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 1.25em;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
font-size: 2rem;
color: #f4f4f4;
}
.scrolls .center {
font-size: 0.825rem;
}
.smooth {
position: relative;
width: 100%;
height: 100%;
scroll-behavior: smooth;
overflow-y: scroll;
scroll-snap-type: mandatory;
scroll-snap-points-y: repeat(100vh);
scroll-snap-type: y mandatory;
}
.header {
position: fixed;
top: 0;
z-index: 1;
display: flex;
width: 100%;
min-height: 60px;
font-size: 1rem;
background-image: linear-gradient(180deg, #1d1e22, rgba(29, 30, 34, 0.1), transparent);
mix-blend-mode: luminosity;
}
.header ul {
margin: 0;
padding: 0;
list-style-type: none;
display: flex;
width: 100%;
justify-content: center;
}
.header ul li {
margin: 0 1em;
padding: 1em;
}
.header ul li a {
position: relative;
text-decoration: none;
text-transform: uppercase;
font-weight: 600;
color: #f4f4f4;
}
.header ul li a::after {
position: absolute;
bottom: -3px;
left: 0;
content: '';
width: 0;
height: 3px;
transition: all 0.2s linear;
}
.header ul li a:hover::after {
width: 100%;
background-color: #f4f4f4;
}
section {
position: relative;
display: flex;
width: 100%;
min-height: 100vh;
flex-flow: column wrap;
align-items: center;
justify-content: center;
font-size: 1rem;
background-color: #f4f4f4;
background-image: url(https://i.postimg.cc/15R3qZR2/london-3841024-1920.jpg);
background-size: cover;
scroll-snap-align: center;
}
section h2 {
text-transform: uppercase;
font-size: 3.25rem;
font-weight: 900;
padding: 0.5em 1em;
color: #1d1e22;
background-color: #f4f4f4;
mix-blend-mode: screen;
border-radius: 0.25em;
pointer-events: none;
user-select: none;
}
section:nth-child(2) {
background-image: url(https://i.postimg.cc/y8dxwCwc/balloons-388973-960-720.jpg);
}
section:nth-child(3) {
background-image: url(https://i.postimg.cc/bYWmGqRN/2.jpg);
}
section:nth-child(4) {
background-image: url(https://i.postimg.cc/VLPjQvRM/4.jpg);
}
.social
{
position:fixed;
bottom:20px;
right:20px;
background:red;
font-family:verdana;
padding:5px;
border-radius:5px;
animation:new .5s linear infinite;
margin-top:-50px;
}
.social a
{
text-decoration:none;
color:#fff;
font-size:18px;
}
#keyframes new
{
0%
{
transform:scaleX(1);
}
50%
{
transform:scaleX(.95);
}
100%
{
transform:scaleX(1);
}
}
Note: becasue I am a new user, I cannot embed photos yet. The photos are in links generated by Stack overflow below.
The below is the design I am trying to achieve,
However, the below is currently what is happening
As you can see, the sidebar list is appearing to go outside the sidebar itself when the padding is added.
How can I manipulate my CSS to alter?
width: 100vw;
height: 100vh;
}
body {
margin: 0;
padding: 0;
}
.Sidebar {
height: 100%;
width: 250px;
background-color: white;
border-right: 1px solid;
padding-left: 15px;
}
.SidebarList {
height: auto;
width: 100%;
padding-left: 15px;
font-size: 18px;
border: 2px #FD954E;
border-right: 1px solid;
}
.SidebarList .row {
width: 100%;
height: 50px;
background-color: white;
list-style-type: none;
margin: 0%;
display: flex;
color: #A7ACB6;
justify-content: center;
align-items: center;
font-family: Arial, Helvetica, sans-serif;
}
.SidebarList .row:hover {
cursor: pointer;
background-color: #E7E7E7 ;
}
.SidebarList #active {
background-color: white;
color: #FD954E
}
.row #icon {
flex: 30%;
display: grid;
place-items: center;
}
.row #title {
flex: 70%;
}
.Logo {
padding-left: 40px;
padding-top: 25px;
}
There's a weird bug in my application to causes some CSS properties to disappear. When I sign-in into my application, I used <Redirect to="/home"/> to go to my home page. And then some images disappear and some button are half the size they suppose to be. When I refresh the browser, page gets back to what it supposes to be. I'm using styled component mainly, and below are some pictures:
after signin, wrong version
after refresh page, correct version
here is the complete codehttps://github.com/aojiaooo/shopaholic-react-app
To run the code, you have to change SignIn.js function below:
async function loginUser(credentials) {
return "someRandomCookieOfYourChoice";
//below was the original request to backend
/**
return await axios.post('http://localhost:8080/signin', credentials)
.then(response => response.data.code === 0 ? response.data.data.value : null);
*/
}
Have being frustrated the whole day ... Any help would be greatly appreciated. I'm a backend guy and this is my first day trying out React. Thanks in advance!
import styled from "styled-components";
import { Link } from "react-router-dom";
//general layout for shopaholic
export const SectionWrapper = styled.section`
box-shadow: 0 0 5px #ccc;
padding: 15px 10px;
max-width: 1200px;
margin: 0 auto;
box-sizing: border-box;
-moz-osx-font-smoothing: grayscale;
`
// style for header
export const HeaderWrapper = styled.header`
min-height: 70px;
display: flex;
justify-content: space-around;
align-items: center;
overflow: hidden;
.menu, .close{
cursor: pointer;
display: none;
}
.hello {
display: inline-block;
padding: 10px 10px 15px 15px;
height: 20px;
margin-left: -50px;
}
#media (max-width: 1000px){
ul{
position: fixed;
top:0;
left: -100%;
width: 100%;
height: 100vh;
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
background: white;
z-index: 99;
opacity: 0.97;
transition: 0.5s linear;
margin-left: -20px;
}
.menu, .close{
display: block;
}
.close{
position: relative;
}
ul.toggle{
left: 0;
}
}
`
export const HeaderLogoLink = styled(Link)`
font-size: 2em;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
color: black;
display: block;
padding-left: 30px;
`
export const HeaderNavWrapper = styled.nav`
display: flex;
padding-right: -100px;
ul li a:hover{
color: darkgray;
}
ul li a{
text-decoration: none;
text-transform: uppercase;
color: #555;
padding: 0 15px;
}
ul li{
list-style: none;
display: inline-block;
}
`
// style for home page
export const ProductListWrapper = styled.div`
width: 100%;
display: flex;
justify-content: space-evenly;
align-content: flex-start;
flex-wrap: wrap;
`
export const CardWrapper = styled.div`
min-width: 300px;
min-height: 400px;
border: 1px solid #eee;
overflow: hidden;
padding: 10px;
box-shadow: 2px 8px 20px #ddd;
margin: 10px 15px;
transition: 0.5s linear;
box-sizing: border-box;
font-family: 'Georgia', sans-serif;
display: block;
`
export const CardInfoWrapper = styled.div`
margin: 10px 15px;
text-decoration: none;
a{
text-decoration: none;
color: #333;
}
a:hover{
color: darkblue;
}
`
export const CardImageWrapper = styled.img`
max-width: 300px;
max-height: 300px;
display: inline-block;
color: white;
text-decoration: none;
padding: 10px 15px;
`
export const CardTextWrapper = styled.div`
padding: 0;
box-sizing: border-box;
font-family: 'Georgia', sans-serif;
line-height: 1.5;
margin: -5px 0;
-webkit-font-smoothing: antialiased;
`
export const CardTitleLinkWrapper = styled(Link)`
font-size: 1.5em;
font-weight: bold;
margin-bottom: 10px;
margin-top: -5px;
font-family: 'Segoe UI',serif;
display: inline-block;
-webkit-font-smoothing: antialiased;
`
export const CardDetailLinkWrapper = styled(Link)`
background: #333;
text-align: center;
width: 300px;
margin-left: 10px;
height: 25px;
padding-top: 15px;
padding-bottom: 10px;
font-size: 1em;
color: white;
text-decoration: none;
display: inline-block;
-webkit-font-smoothing: antialiased;
`
// style for detail page
export const ProductDetailWrapper = styled.div`
display: flex;
justify-content: space-around;
flex-wrap: wrap;
margin: 50px 0;
box-sizing: border-box;
`
export const DetailImageWrapper = styled.img`
max-width: 500px;
min-width: 290px;
height: 300px;
display: block;
object-fit: cover;
margin: 25px;
`
export const DetailInfoWrapper = styled.div`
max-width: 500px;
min-width: 290px;
margin: 25px;
`
export const DetailTitleWrapper = styled.div`
display: block;
font-size: 1.5em;
margin-block-start: 0.83em;
margin-block-end: 0.83em;
font-weight: bold;
box-sizing: border-box;
font-family: 'Segoe UI',serif;
letter-spacing: 1px;
`
export const DetailButtonWrapper = styled.button`
background: #333;
color: white;
text-decoration: none;
padding: 10px 35px;
margin-top: 30px;
display: inline-block;
font-family: 'Georgia', sans-serif;
`
export const DetailTextWrapper = styled.div`
box-sizing: border-box;
font-family: 'Georgia', sans-serif;
-webkit-font-smoothing: antialiased;
line-height: 1.5;
margin: 10px 0;
`
// style for alert box
export const AlertTextWrapper = styled.div`
font-family: '.AppleSystemUIFont', sans-serif;
-webkit-font-smoothing: antialiased;
`
I am not sure, but you may try this...
import styled from 'styled-components';
import { Link } from 'react-router-dom';
// general layout for shopaholic
export const SectionWrapper = styled.section`
box-shadow: 0 0 5px #ccc;
padding: 15px 10px;
max-width: 1200px;
margin: 0 auto;
box-sizing: border-box;
-moz-osx-font-smoothing: grayscale;
`;
// style for header
export const HeaderWrapper = styled.header`
min-height: 70px;
display: flex;
justify-content: space-around;
align-items: center;
overflow: hidden;
.menu,
.close {
cursor: pointer;
display: none;
}
.hello {
display: inline-block;
padding: 10px 10px 15px 15px;
height: 20px;
margin-left: -50px;
}
#media (max-width: 1000px) {
ul {
position: fixed;
top: 0;
left: -100%;
width: 100%;
height: 100vh;
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
background: white;
z-index: 99;
opacity: 0.97;
transition: 0.5s linear;
margin-left: -20px;
}
.menu,
.close {
display: block;
}
.close {
position: relative;
}
ul.toggle {
left: 0;
}
}
`;
export const HeaderLogoLink = styled(Link)`
font-size: 2em;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
color: black;
display: block;
padding-left: 30px;
`;
export const HeaderNavWrapper = styled.nav`
display: flex;
padding-right: -100px;
ul li a:hover {
color: darkgray;
}
ul li a {
text-decoration: none;
text-transform: uppercase;
color: #555;
padding: 0 15px;
}
ul li {
list-style: none;
display: inline-block;
}
`;
// style for home page
export const ProductListWrapper = styled.div`
width: 100%;
display: flex;
justify-content: space-evenly;
align-content: flex-start;
flex-wrap: wrap;
`;
export const CardWrapper = styled.div`
min-width: 300px;
min-height: 400px;
border: 1px solid #eee;
overflow: hidden;
padding: 10px;
box-shadow: 2px 8px 20px #ddd;
margin: 10px 15px;
transition: 0.5s linear;
box-sizing: border-box;
font-family: 'Georgia', sans-serif;
display: block;
`;
export const CardInfoWrapper = styled.div`
margin: 10px 15px;
text-decoration: none;
a {
text-decoration: none;
color: #333;
}
a:hover {
color: darkblue;
}
`;
export const CardImageWrapper = styled.img`
max-width: 300px;
max-height: 300px;
display: inline-block;
color: white;
text-decoration: none;
padding: 10px 15px;
`;
export const CardTextWrapper = styled.div`
padding: 0;
box-sizing: border-box;
font-family: 'Georgia', sans-serif;
line-height: 1.5;
margin: -5px 0;
-webkit-font-smoothing: antialiased;
`;
export const CardTitleLinkWrapper = styled(Link)`
font-size: 1.5em;
font-weight: bold;
margin-bottom: 10px;
margin-top: -5px;
font-family: 'Segoe UI', serif;
display: inline-block;
-webkit-font-smoothing: antialiased;
`;
export const CardDetailLinkWrapper = styled(Link)`
background: #333;
text-align: center;
width: 300px;
margin-left: 10px;
height: 25px;
padding-top: 15px;
padding-bottom: 10px;
font-size: 1em;
color: white;
text-decoration: none;
display: inline-block;
-webkit-font-smoothing: antialiased;
`;
// style for detail page
export const ProductDetailWrapper = styled.div`
display: flex;
justify-content: space-around;
flex-wrap: wrap;
margin: 50px 0;
box-sizing: border-box;
`;
export const DetailImageWrapper = styled.img`
max-width: 500px;
min-width: 290px;
height: 300px;
display: block;
object-fit: cover;
margin: 25px;
`;
export const DetailInfoWrapper = styled.div`
max-width: 500px;
min-width: 290px;
margin: 25px;
`;
export const DetailTitleWrapper = styled.div`
display: block;
font-size: 1.5em;
margin-block-start: 0.83em;
margin-block-end: 0.83em;
font-weight: bold;
box-sizing: border-box;
font-family: 'Segoe UI', serif;
letter-spacing: 1px;
`;
export const DetailButtonWrapper = styled.button`
background: #333;
color: white;
text-decoration: none;
padding: 10px 35px;
margin-top: 30px;
display: inline-block;
font-family: 'Georgia', sans-serif;
`;
export const DetailTextWrapper = styled.div`
box-sizing: border-box;
font-family: 'Georgia', sans-serif;
-webkit-font-smoothing: antialiased;
line-height: 1.5;
margin: 10px 0;
`;
// style for alert box
export const AlertTextWrapper = styled.div`
font-family: '.AppleSystemUIFont', sans-serif;
-webkit-font-smoothing: antialiased;
`;
Im not sure if this work with styled component!! The use of the !important on the style that is being ignored, or overridden in react. In normal css i will do it this way:
.selector{
background-color: red !important;
}
You can try this:
export const DetailButtonWrapper = styled.button`
background: #333 !important ;
`;
Im not certain about this answer but yiu can try it. !important on the style which are not applying
It turns out this problem happens when running the app using
npm start
however, the css issue goes away when doing npm run build and then serve -s build
I guess production wise this is not a bug but rather something wrong with the development environment, in case any one in the future has this problem, one can try build the project and see if the error goes away.
const DropUl = styled.ul`
width:138px;
height:124px;
margin:0px;
padding:0px;
background: #FFFFFF;
border: 2px solid #169DA8;
box-sizing: border-box;
border-radius: 4px;
position: absolute;
top:55px;
**display:none;
&:hover{
display:block;
}**
`
const DropLi = styled.li`
display:block;
width:106px;
height:36px;
position: relative;
top:10px;
left:20px;
`
const DropAncor = styled.a`
text-decoration:none;
font-family: Rubik;
font-style: normal;
font-weight: normal;
font-size: 16px;
line-height: 150%;
color: #111111;
<Li parametarWith={'58px'} ><Ancor href="#"> <h5>Saveti</h5></Ancor>
<DropUl>
<DropLi><DropAncor href="#">Cesto pitanje</DropAncor></DropLi>
<DropLi><DropAncor href="#">Veterinar</DropAncor></DropLi>
<DropLi><DropAncor href="#">Iskustva</DropAncor></DropLi>
</DropUl>
</Li>
Qestion:
I what to make dropm-down menu in style component on ul element when it is
hover to display block drop menu
When i hover on this example nothing happens i use &:hover but it is not working
You can do something like this:
const DropLi = styled.li`
display: none;
width: 106px;
height: 36px;
position: relative;
top: 10px;
left: 20px;
`
const DropUl = styled.ul`
width:138px;
height:124px;
margin:0px;
padding:0px;
background: #FFFFFF;
border: 2px solid #169DA8;
box-sizing: border-box;
border-radius: 4px;
position: absolute;
top:55px;
&:hover ${DropLi} {
display: block;
}
`
See the Doc for more information!
I am trying to make my grid layout divs to be the same height. Please see my sass code below, screenshots of website layout and html code. I want the common height to be the height of the grid element with the most content.
I am only able to provide a picture of my html, since I am using react and different elements.
Please advise on SASS settings. thanks!
SASS code:
// MAIN CONTENT
.grid {
display: grid;
width: 114rem;
grid-gap: 0.5rem;
margin:1rem;
grid-template-columns: repeat(
auto-fit,
minmax(20rem, 1fr)
);
align-items: start;
#include media(small) {
grid-gap: 3rem;
}
&__item {
background: $mainWhite;
border-radius: 0.05rem;
overflow: hidden;
box-shadow: 0 3rem 6rem rgba(0, 0, 0, .05);
transition: $transition;
margin-bottom: 2rem;
&:hover {
transform: translateY(-.5%);
box-shadow: 0 4rem 8rem rgba(0, 0, 0, .1);
}
}
}
.card {
.card__img {
display: block;
width: 100%;
height: 18rem;
object-fit: cover;
object-position: top;
}
.card__content {
padding: 2rem 2rem;
a{
margin-bottom: 1%;
&:hover{
text-decoration: none;
}
}
.card__tools__header{
font-weight: 400;
margin-bottom: 0.2rem;
font-size: 1.2rem;
color:$mainBlack;
}
.card__tools__box{
display:flex;
flex-wrap: wrap;
flex-direction: row;
box-sizing: border-box;
.card__tools {
font-size: 1.5rem;
white-space: nowrap;
color:$mainGreen;
padding-right:1rem;
overflow: hidden;
box-sizing: border-box;
}
}
.card__header {
font-family: 'Open Sans', sans-serif;
font-size: 1.8rem;
font-weight: 500;
color: $mainBlack;
margin-bottom: 1rem;
}
.card__text {
font-size: 1.1rem;
letter-spacing: .1rem;
margin-bottom: 1rem;
}
}
.card__btn {
display: block;
width: 100%;
padding: 1rem;
font-size: 1.2rem;
text-align: center;
color: $mainBlack;
background-color: $mainWhite;
border: none;
border-radius: 0;
transition: $transition;
cursor: pointer;
margin-top: 5%;
span {
margin-left: 1rem;
}
&:hover,
&:active {
background: $mainGreen;
text-decoration: none;
color:$mainWhite;
span {
margin-left: 1.5rem;
}
}
}
}
You need to set the height with grid-template-rows on your container and tell the children to fill 100% of that height. Otherwise they will only take the space they need:
.grid {
//...
grid-template-rows: 1fr;
&__item {
//...
height: 100%;
}
}
I created a codepen for you to test this.