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

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..
}

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%

CSS background image overflowing over HTML? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
My background image, which covers the entire web page, overflows past the HTML and body elements, even though they're both set to 100%.
It's a simple page, as seen here.
I've tried several different techniques to place the background image (including setting it to cover, but I still encounter this overflow issue)
(I feel like I'm going a little crazy, but I'm probably missing something that's very apparent).
Try overflow:hidden
.translucent {
width: 100%;
height: 100%;
background-color: rgba(0, 92, 60, 0.95);
overflow: hidden;
}
I wonder why you set this in the body tag.
It's much easier to give the body tag a background-image.
So i changed your body css style to this:
body {
width: 100%;
height: 100%;
background: url('cover-plaza-707-fifth-construction.jpg') no-repeat center center fixed;
background-size: cover;
position: fixed;
}
And you now can delete <img src="cover-plaza-707-fifth-construction.jpg" id="bg">
I hope this solves the problem, i haven't tested the scrolling yet.
[After reverting it back to a cover background image rather than the standalone image I placed with reduced z-index as a bug fix]
Setting .translucent's min-height to 100% (rather than just height: 100%;) fixed the issue.

Separate background image appearing unexpectedly [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
This issue has had me scratching my head for a few days now. I have a website with a set CSS background with no scrolling - works well. However, on pages that are fairly long there appears an exact duplicate of the background, seemingly scrolling in FRONT of the other background.
You can see it illustrated on this page:
http://www.joyrocks.com/corporate/
I've scoured through the CSS and I'm sure I'm missing something simple, but I was hoping some fresh eyes could point me in the right direction. Cheers!
Edit: Got it solved! Sorry this may have been off-topic. Will keep that in mind in the future!
It took me a second to realize what was happening here. Now I'm not sure why it appears to be duplicated like that. Could have something to do with the background being fixed. I think your main issue here though is the body/html height.
body,html{
height: 100%;
}
That only sets the height of the viewport meaning there is still a lot of overflow that's not being covered by that.
I changed height to min-height and it seemed to have fixed the problem :)
body,html {
min-height: 100%;
}
You have a body:after rule that is applying the same style as your body.
There are two offending rules causing this:
body, body:after {
background: url('/wp-content/uploads/2014/05/background-new-2.jpg') top left fixed repeat;
}
body:after, ul.tabs li a.active:after {
content: "";
background: #FFF;
position: absolute;
z-index: 99;
left: 0;
bottom: 0;
right: 0;
height: 100%;
width: 100%;
z-index: -1;
}
Remove the body:after definitions from those and you will be fine.
You must delete body, from this css line:
body, #section-tophat, #section-footer, #section-sub-footer

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

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;
}

Why does my footer div not move below another div? [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've looked at every similar question I can find here. I have a div for my right column, and then a div for my footer. But if my right column gets too long, it covers up the footer. What is wrong?
Site: http://www.powerhousestudios.tv/2013/
On your DIV
<div id="rightcolumn">
CSS READS
#rightcolumn {
width: 300px;
float: right;
margin-top: 0px;
margin-bottom: 0px;
background-color: #ffffff;
height: 410px;
Remove the Height Parameter to fix your problem.
The rightcolumn div has a fixed height of 410px, which it seems it's not enough. Just remove the height property.
Your using relative positioning on the upcoming div. That with a z-index of 999 is making it cover your footer div.
Try:
upcoming { z-index: 0;}
and remove the spacing paragraphs in that div to get the effect you want.

Resources