Prevent images in slider from being seen as the page loads? [closed] - css

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Here's the site:
http://cholakislaw.com/install/
I think it's a tweak I made to the CSS because the demo for the theme doesn't suffer from this issue:
http://www.mojo-themes.com/item/attorneys-lawyer-wordpress-theme/demo/

Best way to do is:
CSS
.slider ul li img {
display: none;
}
.slider ul li:first-child img{
display: block;
}
By doing this, you'll hide all slideshow images and then show only first-child on load. Later, js will do it's trick and overwrite it.

This is due to the fact that the images start to load before the slider component, easySlider in that case, has set height and overflow property of the #slider element. Thus, when the images start to load, #slider is high enough to see more than the first image.
To prevent this, you could add in slider.css the following rules :
#slider {
height: 100%; /* parent element with class .slider has his height already set */
overflow: hidden;
}

Related

Position: absolute messing with div's width [closed]

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 3 years ago.
Improve this question
I have created a panel that is displayed only when triggered, and the content is determined dynamically.
I didn't want to mess with the page flow so I made it being displayed OVER the other divs.
In order to achieve this I have added z-index and display:absolute.
The problem is that cause of display: absolute my div's width is determines by the content, while I want to it be the same despite the content differences.
How to fix that?
Check my css/sass:
.panel-parent{
text-align: center;
display:none;
//display:block when triggered
position:absolute;
z-index:1;
.panel{
padding-top:50px;
padding-bottom:50px;
display:block;
width:95%;
height: auto;}}
you need to set the parent as position:relative and then the child to position:absolute; height:100%

Menu won't increase in height [closed]

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 4 years ago.
Improve this question
I have a navigation menu on this site which looks like this:
I'm trying to increase the height of the navigation for example to 60px. I've tried playing with CSS to increase the height but the height won't change. I'm not sure what I'm doing wrong.
I've tried height, padding, heigth !important but there's no effect on my menu.
Can you help me to increase the height of my navigation?
So here is my answer. The problem is the background for your navigation. I would prefer a solution like this:
.row .nav {
line-height: 60px;
background: black;
}
.row .menu a {
line-height: 60px;
}
.row .menu .sub-menu {
top: 56px;
}
Insert this into your CSS. This code is tested and works. Tell me if it works for you.
It should looks like this:
Hope this helps
.row .sixteen.columns {
height: 50px
}

How to make a full width sub-menu [closed]

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 would like to make a full width drop down sub-menu. Please check my site. My site is here.
I tried these code but it's not working. I put these code to child theme's style css.
#masthead .color-site-white nav .sub-menu {
left: 0;
right: 0; }
#masthead .color-site-white nav .sub-menu {
width:100% }
I don't know how to do it.. Please help me! Thanks.
Your link isn`t showing.
By setting the width of the dropdown to 100% you should achieve it, something like this:
#masthead ul li:hover > ul {
width: 100%;
overflow: hidden;
}
have you seen this? Full width css dropdown menu

How Do I Change the Height of my Navbar? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I use a website builder, and there is a custom CSS box, but how do I make my navbar thin like Twitter's navbar? The navbar class is: container
This is pretty hard to provide an absolute answer for without any CSS and HTML, but you should be able to set (where 40px is a sample height)
.container{
height:40px;
}
If that fails, you likely have a rule with a higher level of specificity, so either alter that directly (dont), or extend the above to match or beat it (do).
If you want to play dirty, use !important (not recommended)
.container{
height:40px!important;
}
Depending on the other CSS rules you have in place, you may need to set other properties to get the desired effect, e.g.(and this is a bad example):
.container{
height:40px;
max-height:40px;
min-height:40px;
line-height:40px;
overflow:hidden;
}
Instead of twitter, lets take the example of stack overflow. Class would be container.
.container {
max-height: 100px;
min-height: 100px;
background-color: #000;
min-width: 100%;
max-width: 100%;
}
You are more likely to use max and min properties to make the navbar stay at the full of the top of page.
Other properties are just for styling nothing else. The height depends on the value you provide in the height attribute, you can use max- or even min- or height they would work.
Hey, edit your code:
.container {
height: 200px; // change this value..
}

CSS responsive menu - right padding [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have responsive menu in middle of div.
After I resize screen menu moves to right of screen.
Preview example: >>> CODE here <<< (all html/css/js are accessible via web)
it looks like this >
Question:
How to align it to right as in picture ...
Thank you in advance.
PS: code is in example link (html file)
div.content-menu {
position: relative;
}
ul.nav {
position: absolute;
right: 0px;
}
Add position: relative; to .content-menu, and position: absolute; right: 0; to .nav (both in the mobile-size media query).
EDIT And also maybe remove the width on .nav, and .nav > li and change them to max-width: 280px; min-width: 200px; so that it won't break on screens smaller than 300px.
Hope that helps.

Resources