Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I'm looking to this website. And I have no idea why it has this huge scroll. I'm try understand why or where this scroll is created.
The problem is in this div .nav-path-wrap it has diplay:initial and on hover you make its position absolute , it always will have its space on your page even it not visible.
so you just need to make its display:none and on hover display:block
css must be like this :
.left_menu .nav-path-wrap {
background: url(../images/icons/icon_left_menu_arrow_l.png) no-repeat left 1em;
padding-left: .7em;
display: none; // edit this from initial to none
}
.left_menu li:hover .nav-path-wrap {
position: absolute;
left: 12em;
top: -.5em;
height: 100px;
display: block; // add this line
}
note that if you edited the .left_menu { overflow: hidden; }. the sub menu .nav-path-wrap will not be visible on hover
.left_menu li:hover ul {
top: -.8em;
left: .7em;
display: inline-block;//add
}
.left_menu li ul {
background: #109CD8;
z-index: 100;
display: none;//change
height: auto;
padding: .3em 1em 1em 1.4em;
left: -999em;
position: absolute;
-webkit-box-shadow: 3px 3px 5px 0px #053047;
box-shadow: 3px 3px 5px 0px #053047;
width: 14.6em;
}
So I've gone through the inspector deleting elements until I came across the culprit.
The ul.left_menu.clearfix is what's causing the layout problem. If you remove the .left_menu class, the list spills out into a huge vertical list, and the white space disappears.
This isn't the "best" solution, but you can remove that class, add a fixed height, and then set the overflow-y to scroll.
You may find a more elegant option though.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed yesterday.
Improve this question
I have tried multiple ways, but I’ve been running into issues attempting to make a container with diamond shaped edges on either side with the corner rounded, as well as another one with the diamond shape inverted. Similar to my sketch:
Optimally, the solution would only need HTML & CSS, with a different color border and fill. I would definitely be open to alternative solutions if that would include SVG, for example.
Thanks!
I have tried to create a mask with SVGs, but I could not find a way to add a border and a separate fill, as well as containing text inside it, and there were scale issues too (I’d like it only to scale horizontally, not vertically when width changes.)
You can achieve this using the ::before and ::after psuedo-elements in CSS relatively easily. The second one (with non-inverted triangles) is slightly less verbose than the first example, but both are achievable using a single HTML element and some creative CSS.
Please note that you might need to modify some of the pixel dimensions to suit your needs, but the following should achieve what you need:
.label {
background: red;
border: 2px solid #000;
color: #fff;
display: inline-block;
font-family: sans-serif;
margin: 0 30px;
padding: 10px 50px;
position: relative;
text-transform: uppercase;
}
.label::before,
.label::after {
aspect-ratio: 1/1;
background-color: #fff;
border: 2px solid #000;
content: '';
display: block;
height: 28px;
position: absolute;
overflow: hidden;
transform: rotate(45deg);
top: 4px;
}
.label::before {
border-bottom: none;
border-left: none;
left: -16px;
}
.label::after {
border-top: none;
border-right: none;
right: -16px;
}
.label--inverse::before,
.label--inverse::after {
background: inherit;
border: inherit;
}
.label--inverse::before {
border-top: none;
border-right: none;
left: -17px;
}
.label--inverse::after {
border-left: none;
border-bottom: none;
right: -17px;
}
<span class="label">Text</span>
<span class="label label--inverse">Text</span>
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Hi I have following code:
.fotoRating {
color: #c5c5c5;
font-size: 50px;
position: relative;
text-shadow: 0px 1px 0 #a2a2a2;
}
.fotoRating .selectedStars {
color: #e7711b;
position: absolute;
top: 0;
overflow: hidden;
}
<div class="fotoRating">
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span>
<div class="selectedStars" style="width:150px;">
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span>
</div>
</div>
When I put span on a new line, the stars will break: http://jsfiddle.net/mozkomor05/6hkpj0L4/1/
I think there is a small mistake, but I can't find it.
The set width on your selected stars container is causing the characters to break into another line to fit. If you want to prevent line-breaks, add this rule to .selectedStars
white-space: nowrap;
https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
If you simply want to have different colors on the stars, you don't need two rows of them. You can just add a class to each star as needed:
.fotoRating {
color: #c5c5c5;
font-size: 50px;
text-shadow: 0px 1px 0 #a2a2a2;
}
.is-selected {
color: #e7711b;
}
<div class="fotoRating">
<span class="is-selected">★</span>
<span class="is-selected">★</span>
<span class="is-selected">★</span>
<span>★</span>
<span>★</span>
</div>
While #webdevdani approach works, it doesn't give the same result. Which is why I suggest this:
.fotoRating span {
display: table-cell;
}
This way the browser thinks they're cells and ignore the white space between the elements, while preserving the functionality
Here you go: http://jsfiddle.net/6hkpj0L4/4/
You need a fixed height on .selectedStarts. When you decrease the width to show a fewer number of stars, the stars are wrapping and your container is defaulting to height: auto; therefore showing all it's content.
Using a fixed width (here I used 70px) in combination with the overflow: hidden; which you already had in place does the job.
.fotoRating {
color: #c5c5c5;
font-size: 50px;
position: relative;
text-shadow: 0px 1px 0 #a2a2a2;
}
.fotoRating .selectedStars {
color: #e7711b;
position: absolute;
top: 0;
overflow: hidden;
height; 70px;
}
<div class="fotoRating">
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span>
<div class="selectedStars" style="width:150px;">
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span>
</div>
</div>
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Link: http://path.com.my/v2/gallery/
Try when you hover/mouseover one of the links in the tab, especially near EXTERIOR, ILLUMINATED, INTERIOR, PYLON , the items on the second row keep moves around.
I tried changing a few of the CSS on hover but it doesn't seems to work.
Anyone can help?
Remove float from .sortLink and use inline-block instead.
Use following css:
.sortLink {
display: inline-block;
vertical-align: top;
color: #999;
font-size: 14px;
padding: 5px 8px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
font-weight: bold;
margin: 0 5px 5px 0;
transition-duration: 0.5s;
}
Solved:
margin: 0 6px 0 0 !important;
Remove the float:left; from a tag and display:inline-block;
.sortLink {
/* float:left; */
display: inline-block;
}
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have already found an answer, but I am not sure this is the best approach for my problem. My page has two panels: one sidebar and one content view. I want to have a shadow over the sidebar as if the content view was producing it:
The problem is that my sidebar is a menu with buttons, icons, etc. So if I try to set the (inset) shadow there:
.sidebar {
box-shadow: inset -7px 0 9px -7px rgba(0,0,0,0.7);
}
I get:
So, where I have the buttons, they hide the shadow. If I do it the other way so the content view actually produces it:
.content {
box-shadow: -7px 0 9px -7px rgba(0,0,0,0.7);
}
I get the shadow along with the content, but if the content is "shorter" than the total height of the screen, the shadow disappears. Similar to the previous case.
My final approach was to set a manual height for the content view or with Javascript, to adapt it to the viewport height. But I am not sure this is the best way to do it. I would like to know if there is a more CSS way to do it, without having to set things manually or getting shadows cut.
EDIT
While creating a fiddle for better understanding my problem I realized that I had a background-color on the buttons. But since I have a hover and a transition on the button, it still hides the shadow. Check it out: http://jsfiddle.net/h3cp59qd/
Check this out: http://jsfiddle.net/h3cp59qd/3/
Use position:absolute for both sidebar and content:
body, html {
background: #D8D8D8;
height: 100%;
margin: 0;
padding: 0;
}
#app {
width: 100%;
height: 100%;
position: relative;
}
#sidebar {
width: 20%;
z-index: 1;
position: absolute;
top: 0;
bottom: 0;
background: #C8C8C8;
}
#sidebar ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#sidebar ul li {
padding-left: 20px;
height: 60px;
text-transform: uppercase;
color: white;
font-weight: 900;
font-size: 12pt;
line-height: 60px;
vertical-align: middle;
}
#sidebar ul li:hover {
background: #c0c0c0;
color: #EEE;
}
#content {
width: 80%;
position: absolute;
z-index: 100;
left: 20%;
top: 0;
bottom: 0;
padding: 0 50px;
box-shadow: -7px 0 9px -7px rgba(0,0,0,0.7);
}
just change your background color to gradient:
http://jsfiddle.net/anshalexander/h3cp59qd/2/
background:-webkit-linear-gradient(left, #c0c0c0 0%,#c0c0c0 97%,#555 100%);
You can change the last color to match your shadow color
Maybe just a shadow background image with a repeat-y could do the trick in your css stylesheet.
background-image:url('your-image.jpg');
background-repeat:repeat-y;
Your image should be the shadow 1px height and as larger as you need.
Your header/footer can easily hide the shadow with their proper backgrounds.
EDIT
I saw your edit, here is mine :)
#sidebar ul li:hover {
background-color: #C0C0C0;
color: #EEE;
box-shadow: inset -7px 0 9px -7px rgba(0,0,0,0.7);
}
There are a few things that need to be corrected. First, remove the padding from #content (it's messing up the width and forcing that div to the bottom).
Add the same box-shadow from #sidebar to your #sidebar ul li:hover style:
#sidebar ul li:hover {
background-color: #C0C0C0;
color: #EEE;
box-shadow: inset -7px 0 9px -7px rgba(0,0,0,0.7);
}
Then on #app add position: absolute and height: 100%:
#app {
width: 100%;
height: 100%;
position: absolute;
}
Finally, on #sidebar remove min-height: 800px and add height: 100%, and that should fix it right up. See updated fiddle.
You'll notice that this adds a little bit of an edge to the buttons when they're being hovered over. This is due to the blur being greater than the offset. I think it looks good, but it can be fixed by increasing the (absolute values of) x-offset and spread values (the -7s) to greater than the blur-radius (the 9), e.g.:
box-shadow: inset -11px 0 9px -11px rgba(0,0,0,0.7);
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
My client wants to put a black background under the top navigation bar. it can be at
http://seasonlawn.com/CellularSolutionsHTML/catalog.html
can someone please help me how to code this in css
open the default.css file in a text editor and change the following code:
#headertop {
width: 100%;
min-width: 1130px;
padding-bottom: 7px;
background: url("../images/topnav-rep.png") repeat-x left top transparent;
height: 32px;
position: fixed;
z-index: 99999;
top: 0;
left: 0;
border-top: 1px solid grey;
margin-top: -1px;
}
to the
#headertop {
width: 100%;
min-width: 1130px;
padding-bottom: 7px;
background: #000000;
height: 32px;
position: fixed;
z-index: 99999;
top: 0;
left: 0;
border-top: 1px solid grey;
margin-top: -1px;
}
Currently the problem is ../images/topnav-rep.png image is not accesible. In the above line we are removing the image and making the background color for #headertop element black (hex -> #000000).
the problem is that image you included(in .categorymenus ul) is failed to include/load
you can sue firebug to check
what you need to do is include proper path everything else is ok
there also many image failed to load also
Add Background color to this class
#main-nav .categorymenus{background-color:#000;}
.categorymenus ul{here background image failed to load check this once}
<div class="categorymenus" style="display: block;background: url("http://www.lacovachamiami.com/images/layout/lightBackgound.png") repeat ;">