Since i won't be able to post an image here's the link to it
http://i.stack.imgur.com/LxO1e.png
I have this website, the PHP and all other stuff are working. The problem is that when I scroll up to see other stuff below, the elements that get scrolled up goes over the header instead of going under. How do I solve this?
I can't seem to post the HTML in here, I tried the indent four spaces thing but it doesn't work with HTML stuff so instead here is the site: pageboost.comze.com
Here's the css for the main that is going over instead of under
.inmain
{
width:95%;
height:100%;
left:20px;
top:42px;
position:relative;
}
and here's the css for the header
.header
{
background-color:#ffd800;
width:100%;
height:42px;
position:fixed;
left:0px;
top:0px;
-webkit-box-shadow: 0 5px 6px -6px black;
-moz-box-shadow: 0 5px 6px -6px black;
}
You have to define z-index with one these positions relative,absolute or fixed.
For example write like his:
.header{
position:fixed;
z-index:1;
}
just define z-index value into your Header class or Id where you have defined the position.
It happens so when you will give the z-index value i hope that will work smoothly.....
UPDATED ANSWER
I have given the z-index value in header class its working fine now please check it.....
HTML
<div class="header"></div>
<div class="inmain">afdadfasf</div>
CSS
.header
{
background-color:#ffd800;
width:100%;
height:42px;
position:fixed;
left:0px;
top:0px;
-webkit-box-shadow: 0 5px 6px -6px black;
-moz-box-shadow: 0 5px 6px -6px black;
z-index:1;
}
.inmain
{
width:95%;
height:100%;
left:20px;
top:35px;
position:relative;
}
for better understanding see the live demo:- http://jsfiddle.net/X8vpg/6/
Related
With the recent Chrome upgrade Version 66.0.3359.139 (Official Build) (64-bit) the links in our Main menu's submenu are not clickable in any column after the first one. dickinsonstate.edu
Removing the columns creates one giant list of links but all of them seem to work. I tried to work with display:flex but couldn't seem to get the nice left aligned columns we have currently.
Links are still clickable in IE and FF.
Screen capture of Broken Links in Columns 2 and 3
.nav-main .nav-level-2>ul{
visibility:hidden;
background-color:#f5f5f5;
position:absolute;
left:0;
width:100%;
right:0;
z-index:2;
text-align:left;
overflow:hidden
}
.nav-main .nav-level-2>ul:before{
-webkit-box-shadow:1px 1px 5px rgba(50,50,50,.75);
-moz-box-shadow:1px 1px 5px rgba(50,50,50,.75);
box-shadow:1px 1px 5px rgba(50,50,50,.75);
-webkit-box-shadow:1px 1px 19px rgba(50,50,50,.4);
-moz-box-shadow:1px 1px 19px rgba(50,50,50,.4);
box-shadow:1px 1px 19px rgba(50,50,50,.4);
content:"";
position:absolute;
height:100px;
top:-100px;
width:100%;
left:0;
right:0
}
.nav-main .nav-level-2>ul .submenu-links{
column-count:3;
-moz-column-count:3;
-webkit-column-count:3
}
.nav-sorted.nav-main .nav-level-2>ul{
display:none;
visibility:visible
}
I experienced the same problem. Try setting position:relative and a z-index on the parent of the columns.
I have created a custom class for some sliders.In chrome everything is working fine.See image below:
Chrome
My problem though is that on internet explorer i get this:
Now here is my css:
input[type="range"].slider-black::-ms-thumb{
height:40px;
width:40px;
border-radius:100px;
background:rgba(0,0,0,0.7);
border:2px solid silver;
box-shadow:0 0 4px 2px rgba(1,1,1,0.8);
}
input[type="range"].slider-black::-webkit-slider-thumb{
height:40px;
width:40px;
border-radius:100px;
background:rgba(0,0,0,0.7);
border:2px solid silver;
box-shadow:0 0 4px 2px rgba(1,1,1,0.8);
}
Is there any way to do my ::-ms-thumb look exactly the same as it is on chrome?
The trick is to apply a margin, half the width of thumb-button, in the ::-ms-track.here's an online demo
I have two files, one is called header.php and other one is called index.php.
header.php looks like this:
<div class="long_box">**Small long box**</div>
index.php looks like this:
<?php
include('header.php');
?>
<div class="content">**Big box**</div>
and this is the CSS file:
.long_box {
background-color:#f4f4f4;
width:200px;
min-height:400px;
padding:10px;
margin:10px;
border:1px solid #bbbbbb;
box-shadow: inset 0 1px 0 #fefefe; }
.content {
background-color:#f4f4f4;
width:515px;
min-height:800px;
padding:10px;
margin:10px;
float: left;
border:1px solid #bbbbbb;
box-shadow: inset 0 1px 0 #fefefe; }
So I am using "long_box" in header.php, "content" in index.php and then including header.php in index.php which gives me this page: http://gyazo.com/5bb4375f05ff5c9b3c3f8c47e7d3a0c0.png
Now, I want to add a third box all the way on the right side, like in this image where the red box is: http://gyazo.com/ea2f330cab8cc07508fa797a2ad5de3e.png
I want to include the third box each time I decide to include header.php.
I would really appreciate if someone could help me out with this.
I believe what your looking to do here is check if header.php is included and if so include your new box aside.php (or whichever).
You can try if file_exists like so:
if(file_exists('header.php'))
include 'aside.php';
Found this here with more info, which may be useful to you:
How to include only if file exists
PS. As cederlof said, also change your content attribute to class not style.
okay...so here is fiddle http://jsfiddle.net/logintomyk/DgsH3/
header.php
<div class="long_box">**Small long box**</div>
<div class="third_box"> Third box </div>
index.php
<div class="content">**Big box**</div>
CSS
.long_box {
background-color:#f4f4f4;
width:18%;
min-height:400px;
padding:10px;
margin:10px;
border:1px solid #bbbbbb;
box-shadow: inset 0 1px 0 #fefefe;
float:left;
}
.third_box{
background-color:#f4f4f4;
width:18%;
min-height:400px;
padding:10px;
margin:10px;
border:1px solid #bbbbbb;
box-shadow: inset 0 1px 0 #fefefe;
float:right;
}
.content {
background-color:#f4f4f4;
width:40%;
min-height:100%;
padding:10px;
margin:10px;
border:1px solid #bbbbbb;
box-shadow: inset 0 1px 0 #fefefe;
margin:0 auto;
}
using %age for width...its a better idea considering responsive designs!! ;)
You can just float the 3 boxes with float: left;
jsFiddle
Whenever one of the floated elements goes underneath an other floated element, it might be because your third box does not fit on the screen.
Note that i used an other width so it would fit on my screen
Update
Whenever your element that should positioned at the far right is called first. You can use float: right;
jsFiddle
This is what I want the chicklet box to look like:![]1
For some reason I can not use negative margins to get the twitter image to go to the center of the box. Is there something wrong with my parent-child relationship?
My css is in an external sheet, but here it is:
<style type="text/css">
#chicklet_container {
margin:20px auto 0px auto;
width:540px;
height:215px;
}
#chicklet_box {
margin:0px 0px 10px 0px;
width:190px;
height:160px;
border-style:solid;
border-width:33px 5px 5px 5px;
border-color:#45BA88;
position:relative;
}
#chicklet_box2 {
margin:-30px 0px 10px 0px;
width:190px;
height:160px;
border-style:solid;
border-width:0px 0px 30px 0px;
border-color:#3f4040;
}
#chicklet_text {
text-align:center;
margin:-196px 0px 0px 0px;
color:#FFF;
width:190px;
font-family:"Verdana, Geneva, sans-serif";
font-size:27px;
line-height:20px;
}
#chicklet_text2 {
text-align:center;
margin:139px 0px 0px 0px;
color:#FFF;
width:190px;
font-family:"Proxima, Nova, Ultralight";
font-size:26px;
line-height:20px;
}
#chicklet_box img {
margin:-250px 0px auto 5px;
}
</style>
Here is the html:
<div id="chicklet_container">
<div id="chicklet_box">
<div id="chicklet_box2">
</div>
<div id="chicklet_text">Follow Me</div>
<div id="chicklet_text2">#soandsoandso</div>
<img src="images/twitter.jpg" alt="">
</div>
</div>
Why are you using so much margin to align the twitter bird image or text. Use as low margins as possible. Instead this, try using that image position:absolute; and top ,left properties. It'll be more clean. But one thing to remember if you are using absolute position for an element ,check if its outer or parent element is positioned or not, if it is not then things may go worse and that child element might go somewhere else.
Negative margins are not a hack - W3C even says: "Negative values for margin properties are allowed..."
Read More: http://www.smashingmagazine.com/2009/07/27/the-definitive-guide-to-using-negative-margins/
I do agree in this case though they may be over-emphasized.
Why do you have Chicklet Box 2 inside of Chicklet Box 1? I'm assuming each box represents an icon... am I wrong?
although my questions has been answered lots of times before, but all the proposed solution I have tried and nothing seems to work.
what am trying to do is a big div that contains li tags; the li tags will also contain anchor tag, 2 divs and p tag.
to understand the big picture.. am trying to make a posting wall (activity-board), the wall will have posts looks like a bubble (div post) and the bubble will point (post-arrow) to a thumbnail image (a thumb3), to make the bubble style I made the post div absolute positioned with z-index less than the arrow-post.
and here is my css:
.activity-board {
background:#fff;
width:600px;
min-height:652px;
height:auto;
border:solid 2px #e7d28d;
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-webkit-box-shadow: inset 0px 0px 0px 3px rgba(255, 255, 255, 1);
box-shadow: inset 0px 0px 0px 3px rgba(255, 255, 255, 1);
float:left;
margin-left:20px;
}
.post-body{
position:relative;
display:block;
list-style-type:none;
width:600px;
height:auto;
background:#f9f9f9;
border-bottom:1px solid #CBCBCB;
border-radius:4px 4px 0 0;
-moz-border-radius:4px 4px 0 0;
-webkit-border-radius:4px 4px 0 0;
background: #fff;
float:left;
overflow:visible;
clear:both;
z-index:9;
}
.post{
position:absolute;
width:500px;
line-height:20px;
height:auto;
background:#FFF;
display:block;
margin-top:22.5px;
margin-left:77px;
text-align:left;
float:left;
z-index:1;
}
.post-arrow{
position:relative;
margin-top:32px;
margin-left:6px;
width:12px;
height:18px;
background:url(images/post-arrow.png);
float:left;
z-index:5;
}
.post p{ color:#025373; padding:8px; word-wrap:break-word; }
a.thumb-3 {
margin-top:18px;
display:block;
margin-left:18px;
width:46px;
height:46px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
z-index:10;
float:left;
}
a.thumb-3 img{
padding:0;
margin:0 auto;
width:46px;
height:46px;
float:left;
border-radius:3px;
-moz-border-radius:3px;
-webkit-border-radius:3px;
}
here is my html:
<ul>
<li class="post-body">
<a class="thumb-3"><img src="images/Alsheikh Center (177).jpg" /></a>
<div class="post-arrow"></div>
<div class="post">
<p>
Hi there!
</p>
</div>
</li>
</ul>
http://jsfiddle.net/r9YpX/
Everything worked fine but the li tag does not expand to the content.. it only expands if I change the position of the post div to relative not absolute, which I cant change because it must be absolutely positioned under the arrow image to give it the bubble look.
any help would be appreciated.
Thanks.
ok Thanks guys i figuered it out.. I made position:relative and changed margin for post div and it worked! I thought I did this but perhaps I did something wrong that make it not work