Elements moves on resize - html

Okey so when I shrink my chrome window the Nav and the Header moves with the rezising. I don´t want that. The Mainbox however stays in position? No idea why but great! I can´t really find the difference between the Nav class and the Mainbox one except the overflow: auto which didn´t help on the nav nor the header.
.container {
height: 800px;
width: 1500px;
}
body {
margin:0px;
padding:0px;
width:100%;
}
header
{
top: 11px;
width: 100%;
}
ol {
list-style-type: upper-roman;
}
.sideIMG {
position:fixed;
top: 200px;
left: 500px;
height: 100%;
float: left;
}
.sideIMGR {
position:absolute;
top: 200px;
right: 20%;
height: 100%;
float: left;
overflow: auto;
}
.mainBox
{
background-color: #F0F0F0 ;
height: 1050px;
width: 700px;
box-shadow: 10px 10px 5px #888888;
overflow: auto;
top: 310px;
padding-top: 30px;
padding-right: 50px;
padding-left: 50px;
}
.textBox
{
height: 110px;
width: 200px;
background-color:#E8E8E8;
border-style: double;
}
H1{
font-family:"Brush Script MT";
}
footer
{
box-shadow: 10px 10px 5px #888888;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
top: 1360px;
height: 150px;
width: 800px;
background-color: #F0F0F0 ;
}
.container nav ul {
list-style-type: none;
}
nav
{
padding: 10px 20px 20px 20px;
padding-right: 50px;
padding-left: 50px;
box-shadow: 10px 10px 5px #888888;
width: 700px;
height:40px;
background-color: #F0F0F0;
border-color: black;
border-width: 1px;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
font-family: Georgia, "Times New Roman", Times, serif;
}
a {
color: #000;
text-decoration: none;
padding: 20px;
}
a:hover
{
color:#00A0C6;
text-decoration:none;
cursor:pointer;
}
.bildRuta
{
height: 350px;
width: 250px;
left: 500px;
top: 350px;
}
.mainBox a img {
border: medium solid #000;
border-radius: 5px;
}
.underRubrik
{`enter code here`
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
}
HTML:
<center><header><img src="Bilder/spegel.jpg"/></header></center>

Related

How Can I position the text over the image

I can't get the text box at the bottom to appear over the image without messing up the navigation bar
https://imgur.com/a/n2lfl57
I've tried all sorts of things and the text either just doesn't move the way I expect or messes up my navbar as I said
I'd be extremely happy if someone could help as I need to finish this in a few days for school.
here's my css code
body{
margin: 0px;
padding: 0px;
height: 100%;
}
header{
margin-bottom: -20px;
padding: 0px;
overflow: hidden;
}
footer{
background-color: black;
margin-top: : -5px;
padding: 0px;
}
.bgimage{
margin-bottom: -5px;
width: 1920px;
}
.container{
}
.imgtext{
border-style: solid;
color: white;
bottom: 20px;
right: 20px;
background-color: black;
color: white;
padding-left: 20px;
padding-right: 20px;
}
.YeStage{
margin: 0px;
padding: 0px;
width: 1920px;
height: 700px;
object-fit: cover;
}
.menu {
margin-top: : -20px;
ma
padding: 0px;
background-color: #3b1113;
overflow: hidden;
list-style-type: none;
position: sticky;
top: 0;
margin-bottom: 0
border:0;
}
.Logo {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 0px
margin-bottom: 0px
width: 440px;
height: 50px;
}
.menu a {
float: left;
color: #FFFF;
text-align: center;
padding: 36px 38px;
text-decoration: none;
font-size: 17px;
}
.menu a:hover {
background-color: #f5bd0e;
color: black;
}
.menu a.active {
background-color: #f5bd0e;
color: black;
}

I can't change the color of my website anymore

I tried to change the color of my website. For example I changed "background-color: #3695F6;" to "background-color: #fff;". but my website background doesn't change. I tried to find a missing
semicolon but I didn't find any. I also tried to delete parts of the Css/Html code which I didn't fully understand but that changed nothing. After all that failed I tried to change a margin on the website from 40px to 100px and nothing changed. I think my Css isn't properly connected. can someone please help.
#charset "utf-8";
body {
font: 0.9em Tahoma, Verdana, Arial;
line-height:172%;
background-color: #fff;
margin: 0px;
}
.center {
display: block;
margin-left: 0px;
margin-right: 0px;
}
#containercontainer {
display: block;
margin-left: 0px;
margin-right: 0px;
padding: 30px;
}
/* bovenste kopje ========================================*/
h1.titel {
color: black;
font: Gill Sans, sans-serif;
font-size: 20px;
margin-bottom: -2px;
margin-top: 0px;
}
#titel {
display: block;
margin-left: 0px;
margin-right: 0px;
padding-left: 10px;
border-bottom: solid black 1px;
width: 5.5%;
left: 45%;
margin-top: -5px;
position: relative;
margin-bottom: 20px;
}
/* De Slideshow ========================================*/
.fling-minislide {
width:100%;
height:100%;
padding-bottom: 0%;
overflow:hidden;
position:relative;
}
.fling-minislide img{
position:absolute;
animation:fling-minislide 15s infinite;
opacity: 0;
size: 100% 100%;
}
#keyframes fling-minislide {33%{opacity:1;} 60%{opacity:0;}}
.fling-minislide img:nth-child(3){animation-delay:0s;}
.fling-minislide img:nth-child(2){animation-delay:5s;}
.fling-minislide img:nth-child(1){animation-delay:10s;}
#slideshow {
display: block;
margin-left: 0px;
margin-right: 0px;
padding: 0px;
float: center;
border: solid black 2px;
width: 55%;
margin-bottom: 20px;
height: 300px;
position: relative;
left: 21%;
}
/* Het nieuws blokje ========================================*/
img.nieuws {
margin-top: -20px;
height: 300px;
width: 400px;
position: relative;
border: solid black 2px;
margin-bottom: 20px;
}
p.nieuws {
float: right;
margin-top: -10px;
position: relative;
margin-bottom: 20px;
}
#nieuws {
display: block;
margin-left: 0px;
margin-right: 0px;
padding-left: 10px;
width: 78%;
height: 50px;
left: 10%;
position: relative;
margin-bottom: 20px;
}
/* Het vragen blokje ========================================*/
#vragen {
display: block;
margin-left: 0px;
margin-right: 0px;
padding-left: 0px;
width: 80%;
height: 1000px;
left: 10%;
position: relative;
margin-bottom: 20px;
top: 300px;
}
p.A{
margin-top: 10px;
font-size: 22px;
width: 250px;
margin-left: 20px;
font-weight: bold;
}
#pointer {
width: 20px;
height: 20px;
position: relative;
background: black;
margin-left: 30px;
}
#pointer:after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 0;
height: 0;
border-left: 10px solid white;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
}
#pointer:before {
content: "";
position: absolute;
right: -10px;
bottom: 0;
width: 0;
height: 0;
border-left: 10px solid black;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
}
p.vragentop1 {
margin-left: 80px;
margin-top: -25px;
text-decoration: underline;
width: 600px;
}
p.vragentext1 {
margin-left: 80px;
margin-top: -10px;
position: relative;
margin-bottom: 50px;
width: 600px;
}
/* hoveren over plaatje in directie//////////////////////////////////////////////////////////////////////*/
.container::after, .row::after {
content: "";
clear: both;
display: table;
}
.column {
float: left;
width: 30%;
margin-bottom: 16px;
margin-left: 10px;
margin-top: 20px;
padding: 0 8px;
}
#media screen and (max-width: 650px) {
.column {
width: 100%;
display: block;
}
}
.columnL {
float: left;
width: 30%;
margin-left: 30px;
margin-bottom: 16px;
padding: 0 8px;
margin-top: 20px;
}
.card {
box-shadow: 6px 7px 6px 3px rgba(0,0,0,0.75);
border: solid black 2px;
padding-left: 10px;
}
/*//////////////////////////////////////////////////////////////////////////////////*/
#cbrlogo {
background: #fff;
width: 50px;
}
#container {
width: relative;
padding: relative;
background: #fff;
min-height: 500px;
}
#containercontainer2 {
display: block;
margin-left: 0px;
margin-right: 0px;
padding: 30px;
}
.afbeelding_container {
position: relative;
float: left;
margin-left: 0px;
}
.afbeelding_container .tekst_container {
position: relative;
top: 25px;
left: 50px;
color: #00f;
font-size: 36px;
}
.schoon {
clear: both;
}
#overzicht {
margin-left: 25px;
}
.links {
float: left;
width: 320px;
}
#rechts {
float: right;
}
#onder {
clear: both;
}
.breder {
width: 4000px;
}
ul {
padding-left: 35px;
padding-right: 35px;
list-style: none;
background: #00f;
}
hr {
margin: 0px 0;
height: 1px;
border: 1px solid #fff;
border-top: 10px solid #00f;
background-color: #fff;
}
a:link {
color: black;
text-decoration: none;
}
a:visited {
color: black;
text-decoration: none;
}
a:hover {
color: black;
text-decoration: none;
}
a:active {
color: blue;
text-decoration: none;
}
.menu {
display: block;
margin: 0px;
padding:0px;
position: absolute;
width: 100%;
background-color: #3695F6;
}
ul.menu {
list-style-type: none;
}
img.menu{
border: solid black 2px;
}
.menu li {
float:left;
position:relative;
width: 200px;
text-align:center;
text-decoration: none;
margin: 0px;
padding: 0;
}
.menu li a {
display: block;
padding-bottom: 20px;
padding-right: 10px;
padding-top: 10px;
padding-left: 10px;
text-decoration: none;
position: relative;
z-index: 100;
}
.menu li a span{
display: block;
padding-top: 10px;
font-weight: 700;
font-size: 20px;
color: black;
font-size: 18px;
}
.menu li:hover span{
color: #FFFFFF;
}
th {
padding: 10px 30px 10px 30px;
}
td {
padding: 0 30px 0 30px;
}
td.muteren {
padding: 0 0 0 10px;
}
tbody:before {
line-height:1em;
display:block;
}
thead {
text-align: left;
}
Body
this problem could be the caching problem try clearing your cache if that doesn't work check how you are linking your css to your HTML file if it's correct you can do the last thing which is add !important to the end of the background color like the example below:
background-color:#fff !important;

Small image is overlapping my navigation?

With character: http://jsfiddle.net/nuu6g/
For some reason, I cannot click on my text on my navigation menu. This is most likely due to the (missing) image on the left, which I will refer to as the "character." However, when I remove the character, I can indeed click on the text again.
Without character: http://jsfiddle.net/aN5s5/
body {
background:grey;
}
.topContainer {
width: 1000px;
height: 125px;
margin: 0 auto;
padding-bottom: 20px;
}
#logo {
float: left;
padding: 10px 10px;
}
/* Navigation */
#navigation {
background: #107AEB;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#107AEB), to(#106FEB));
background: -webkit-linear-gradient(top, #107AEB, #106FEB);
background: -moz-linear-gradient(top, #107AEB, #106FEB);
background: -ms-linear-gradient(top, #107AEB, #106FEB);
background: -o-linear-gradient(top, #107AEB, #106FEB);
border: 2px solid rgba(16, 86, 235, 0.9);
border-radius: 15px;
float: right;
width: 455px;
height: 55px;
margin-top: 22px;
z-index: 1;
}
#navigation ul {
display: inline-block;
position: absolute;
list-style-type: none;
}
#navigation li {
display: inline-block;
}
#navigation a {
color: #FFF;
font-family: SEGOEUIL, Arial, sans-serif;
text-shadow: 0 1px 0 #000;
text-align: center;
padding: 5px 10px;
font-size: 17px;
}
#navigation a:hover {
background: rgba(16, 86, 235, 0.9);
border-radius: 5px;
}
#navigation a:active {
text-decoration: none;
}
#navigation a:link {
text-decoration: none;
}
.character {
z-index: 2;
padding: 0 275px;
float: left;
position: absolute;
width: 187px;
height: 174px;
}
/* Wrapper */
#wrapper {
background: #FFF;
/*rgba(255, 255, 255, 0.85);*/
border-top-left-radius: 25px;
border-top-right-radius: 25px;
width: 1000px;
height: 1200px;
position: relative;
z-index: 3;
overflow: hidden;
margin: 0 auto;
}
#photoContent {
background: #ffcc00;
border: 1px solid #b62100;
border-radius: 8px;
width: 781px;
height: 231px;
margin-top: 12px;
display: block;
margin-left: auto;
margin-right: auto;
}
.displayPhoto {
width: 771px;
height: 221px;
border: 0;
border-radius: 8px;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 3px;
border: 1px solid #b62100;
}
#leftContent {
padding-top: 15px;
width: 500px;
height: 140px;
float: left;
padding-left: 45px;
}
.title {
font-family: Arial, sans-serif;
color: #3abfee;
font-size: 20px;
}
.desc {
color: #575757;
font-size: 15px;
font-family: Arial, sans-serif;
}
#rightContent {
padding-top: 15px;
width: 300px;
height: 140px;
float: right;
padding-right: 25px;
}
#flashContent {
padding-left: 25px;
width: 700px;
height: 500px;
}
hr {
width: 750px;
height: 1px;
background: #CCC;
border: none;
margin-top: 10px;
}
/* Bottom Wrapper */
#bwCont {
width: 1000px;
height: 500px;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}
.galleryCont {
display: block;
margin-left: auto;
margin-right: auto;
width: 650px;
height: 150px;
}
.galleryImgCont {
width: 175px;
height: 175px;
float: left;
}
.galleryTitle {
font-family:'Exo 2', sans-serif;
font-size: 17px;
color: #333;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
padding-top: 145px;
}
.galleryDesc {
font-family:'Exo 2', sans-serif;
font-size: 15px;
color: #333;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
#galleryImg {
width: 175px;
height: 125px;
border: 5px solid #F5F5F5;
box-shadow: 0 0 7px;
border-radius: 5px;
float: left;
}
.readMore {
width: 175px;
height: 50px;
background: #000;
border: 0;
border-radius: 5px;
padding: 10px 10px;
color: #FFF;
font-family:'SEGOEUIL', sans-serif;
font-size: 17px;
}
.readMore:hover {
background: #202020;
}
Please help me, thanks! Also, just an extra question; is there any way I can keep the read more buttons inline, instead of like a staircase? Sorry, but thank you!
For your links to be "clickable", either adjust the padding/width of #character or use the following CSS so #navigation comes up top of #character
#navigation {
z-index: 3;
position: relative;
}
DEMO
For "Read More" to be aligned, you're going to need to have the same number of lines in the title and the description, or you can set a minimum height (or even just the height) of those by adding the following CSS for eaxmple:
.galleryTitle {
min-height:40px;
}
.galleryDesc {
min-height:60px;
}
DEMO
Your nav items are displaying in a staircase because there is not enough room due to the width of your ul. adding width 100% will allow them to display inline the way you want.
#navigation ul {
width: 100%
}
the reason you can't click your text link is because of your character class overlaying your images with a higher z-index.

HTML position sidebar next to content

i am currently trying to move my sidebar from below the content box to the right of it alongside it. No matter what i try it stays at a certain point no going up any higher. My website is VAGUE LINES, where if you scroll down a bit u will be able to see exactly what i am saying.
Below is my css code thanks alot:
h1
{
text-align:center;
font-family:sans-serif;
letter-spacing:12px;
padding-bottom:6px;
border-top:1px solid rgb;
margin-top:35px;
color:#544E4F;
font-weight:lighter;
}
hr
{
display:overline-block;
width:200px;
}
#header
{
background: #FFFFFF;
text-align: center;
}
#navigation ul
{
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}
#navigation ul li
{
display: inline;
padding-right: 30px;
}
#navigation ul li a
{
text-decoration: none;
padding: .3em 5em;
color: #000000;
background-color: #FFFFFF;
font-family: courier;
}
#navigation ul li a:hover
{
text-decoration: line-through;
}
.centeredImage
{
float: none;
margin: 4% 0 2% 9%;
text-align: center;
padding-bottom: 25px;
}
#main-content hr
{
width :66%;
margin-left: 9%;
}
#main-content
{
width:80%;
padding-left: 113px;
padding-top: 20px;
}
#page-wrap {
background: white;
min-width: 780px;
max-width: 1260px;
margin: 10px auto;
}
#page-wrap #inside {
margin: 10px 10px 0px 10px;
padding-top: 10px;
padding-bottom: 10px;
}
#sidebar{
border-top: 1px solid #99CC33;
border-left: 1px solid #99CC33;
height: 300px;
width: 200px;
margin-right: 5px;
padding: 5px 0 0 5px;
position:absolute;
}
#main-content p
{
margin-left: 10%;
font-family: courier;
font-size: 14px;
}
#heading p
{
margin-left: 10%;
font-family: sans-serif;
font-size: 14px;
}
#sidebar p
{
margin-left: 10%;
font-family: courier;
font-size: 14px;
font-weight:bold;
}
Try this:
#main-content
{
float: left; // float element to the left side
width:80%;
padding-left: 113px;
padding-top: 20px;
}
#sidebar{
border-top: 1px solid #99CC33;
border-left: 1px solid #99CC33;
height: 300px;
width: 200px;
margin-right: 5px;
padding: 5px 0 0 5px;
position:absolute;
right: 0; // position element to the right
}
EDIT: Sorry. You wanted sidebar on the right.

why my main image is not in the center in Chrome?

Looks fine in firefox but the image is not displaying in center.
In Chrome image is not aligned in the center of browser window
If you refresh the browser it get aligned to center & then get back to left after few second.
thank you for any help.
here is the Demo Template.
Thx.
css code:
html,body {
margin: 0;
padding: 0;
text-align: center;
font-family: arial, Helvetica, sans-serif;
font-size: 14px;
/*background: #FFF url("images/border.jpg") repeat-y center;*/
}
#wrapper{
margin:0 30px;
width: 95%;
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.4);
}
#anti-shadow-div{
display:table;
overflow:hidden;
}
img { border: none; }
a { text-decoration: none; color: #2965a6; font-weight: bold;}
a:hover { text-decoration: underline; color: #fca00e; }
/*---------- Divs ----------*/
/*#header {
background: url("images/logo006.jpg") no-repeat center;
height: 120px;
width: 100%;
margin: 0 auto;
}*/
#header001 {
background: url("images/logo001.jpg") no-repeat center top;width:890px;height:133px;
height: 133px;
width: 900px;
margin: 0 auto;
font-family: arial, Helvetica, sans-serif;
font-size: 50px;
}
#indexheader{
background:#FFFFFF;
height: 30px;
width: 890px;
margin: 0 auto;
font-family: arial, Helvetica, sans-serif;
font-size: 50px;
}
#indeximg{
float:left;
}
#navibtn{
width:900px;
height:90px;
margin: 0 auto;
}
.navibtn001{
background:url(images/automart.jpg) no-repeat;
width:200px;
height:90px;
}
.navibtn002{
background:url(images/cab.jpg) no-repeat;
width:900px;
height:90px;
}
#logo002{
padding-top: 30px;
margin: 0 auto;
width: 890px;
voice-family: "\"}\"";
voice-family:inherit;
width: 850px;
}
/************
html>body #logo { width: 850px } /* for opera */
/*
#logo a:hover {
text-decoration: none;
} */
/*
#logo a {
float: left;
background: url("images/logo.jpg") no-repeat 0px 0px;
width: 317px;
height: 85px;
}
*******************/
/*---------- Divs ----------*/
#flsh{
background:url(images/vans/56%20dolpin/flv002.swf) no-repeat left top;width:640px;height:480px;
height: 500px;
width: 650px;
margin: 0 auto;
}
/*******************/
#menubutton{
width:100%;
height:20px;
text-align:center;
}
#container {
width: 100%;
overflow: hidden;
text-align: left;
font: 90% Tahoma, Helvetica, sans-serif;
margin: 0px auto;
border-top: 3px solid #6fb2e6;
border-bottom: 3px solid #ffb93f;
background: #e5e5e5;
}
* html #container {
overflow: visible;
}
#content{
float: right;
width: 690px;
background: #fff url(images/nav-edge.jpg) repeat-y;
padding-bottom: 40px;
min-height: 380px;
}
* html #content {height: 380px; overflow: visible;}
#maincontent {
float: left;
float: right;
padding: 30px 20px 0px 20px;
overflow: hidden;
width: 450px;
voice-family: "\"}\"";
voice-family:inherit;
width: 410px;
}
#maincontent001 {
float: left;
/* float: right;*/
padding: 30px 20px 0px 20px;
overflow: hidden;
width: 450px;
voice-family: "\"}\"";
voice-family:inherit;
width: 650px;
}
#rightdiv{
padding-top: 30px;
float: right;
width: 230px;
}
#rightdiv img{
padding: 1px;
border: 1px solid #6fb2e6;
}
#news{
width: 210px;
margin: 0 auto;
}
/*---------- Navigation Menu ----------*/
#navcontainer {
padding-top: 30px;
padding-left: 15px;
min-height: 380px;
float: left;
overflow: hidden;
width: 180px;
}
* html #navcontainer {height: 380px; overflow: visible;}
.nav {
width: 170px;
position:absolute;
list-style-type: none;
margin: 0;
padding: 0px;
font-size: 105%;
left: 228px;
top: 13px;
}
.nav li {
text-align: left;
margin: 3px 1px;
padding: 0;
}
.nav li a {
border: 1px solid #52a3e2;
display: block;
padding: 4px 0 4px 10px;
background: #6fb2e6;
color: #e5ffff;
font-weight: bold;
text-decoration: none;
width: 170px;
voice-family: "\"}\"";
voice-family:inherit;
width: 160px;
}
.nav li a:hover {
background: #ffb93f;
color: #949494;
font-weight: bold;
cursor: pointer;
}
/*---------- Footer ----------*/
#footer {
height: 30px;
margin: 0 auto;
padding: 10px 0 10px 0;
font-size: 80%;
text-align: center;
color: #6a6666;
width: 890px;
background: #fff;
}
#footerimg{
background:url("images/footer.jpg") no-repeat left top;width:890px;height:133px;
height: 133px;
width: 900px;
margin: 0 auto;
}
#footeradd{
background:url(images/carsalelogo.jpg)no-repeat left top;width:890px;height:133px;
height: 133px;
width: 900px;
margin: 0 auto;
}
#footertextleft{
margin-left: 10px;
text-align: left;
width: 450px;
float: left;
}
#footertextright{
margin-right: 10px;
text-align: right;
width: 350px;
float: right;
}
/*---------- Headings ----------*/
h1 {
padding-top: 0;
margin-top: 0;
font: 120% Arial;
font-weight: bold;
color: #5c94bf;
}
.mainheading{
font-weight: bold;
font-size: 123%;
}
h2 {
padding-top: 0px;
margin-top: 0px;
font: 110% arial;
font-weight: bold;
color: #5c94bf;
}
#subtext{
padding-top: 0px;
margin-top: 0px;
font: 110% arial;
font-weight: bold;
color: #5c94bf;
}
/*---------- Classes ----------*/
.underline{
padding-bottom: 3px;
width: 180px;
border-bottom: 2px solid #ffb93f;
}
.subheading{
font-weight: bold;
}
.submitbox{
width: 215px;
background: #b8d1e4;
padding: 5px;
text-align: left;
border: 1px solid #e5e5e5;
}
.submitbox p{
margin-top: 3px;
margin-bottom: 5px;
}
.submitbox button{
font-size: 95%;
background: #e5e5e5;
color: #949494;
border: none;
padding: 3px 8px;
font-weight: bold;
}
#maincontent ul{
list-style-image: url(images/bullet.png)
}
.advert{
width: 160px;
padding: 5px;
background: #fff;
border: 1px solid #c8c8c8;
}
add margin: 0 auto; to :
#anti-shadow-div {
display: table;
overflow: hidden;
margin: 0 auto;
}