2016-07-15 23 views
0

這有點相同的問題我問這裏的:Cannot get two CSS elements to be next to each other遇到問題,一旦我添加iframe的

然而,這一次,它搞亂了,當我加一個iframe。我嘗試應用不同的樣式,甚至是iframe,但它似乎沒有工作。我也弄亂了我添加到側面導航欄的ul和li的CSS(沒有幫助,雖然更改了ul屬性以顯示:table-row;確實解決了另一個與其他問題有關的問題。)

我的主要計劃是爲另一組頁面創建一個iframe。 (我的餐廳頁面可能爲每家餐廳都有不止一個標籤,但我一直想知道如何讓我的滑雪場(餐廳在那裏)有一個「背部」的東西,以便用戶可以回到他們的身邊,然後我想, ?爲什麼不只是有一個iframe,而不是

但是,一旦我添加的iframe,麻煩我收到了(見上以前堆棧溢出鏈接)突然回來

的main.css:

#logo 
{ 

border: 1px dashed purple; 
width: 1050; 
height: 75; 

} 

#logo > img 
{ 
width: 1050; 
height: 75; 

} 


.floatleft 
{ 
float: left; 

} 


.floatright 
{ 
float: right; 

} 

#content 
{ 

border-left: 3px solid #283379; 
    border-right: 3px solid #283379; 
    text-align: left; 
    margin: 0 auto; 


width: 960px; 
    background-color: #ffffff; 
    background-repeat: repeat-y; 
    height: 800; 



} 


nav 
{ 


     border: 10px solid transparent; 
padding: 15px; 
    border-image-source: url(./blue-diamond.gif); 
    border-image-repeat:repeat; 
    border-image-slice: 30; 

background-color: 2211ff; 
font-family: "Impact", Times, serif; 
font-size: 110%; 

} 

nav#vert 
{ 

width: 220px; 
    height: 540px; 
    margin: 0px; 
display:table-cell; 


} 



body { 
    color: #000000; 
    margin: 0; 
    padding: 0; 
    font-family: Helvetica, Arial, sans-serif; 
    font-size: 16px; 
    background-color: #422520; 
    background-image: url(./snow_mountain.jpg); 
    background-repeat:no-repeat; 

    background-size:cover; 
    text-align: center; 
    background-attachment: fixed; 
    background-position: center; 
} 

#footerContainer 
{ 

border-left: 3px solid #283379; 
    border-right: 3px solid #283379; 
    text-align: left; 
    margin: 0 auto; 
    width: 980px; 
    background-color: #ffffff; 
    background-repeat: repeat-y; 

} 

footer 
{ 

    border: 10px solid transparent; 
padding: 15px; 


    text-align: left; 
    margin: 0 auto; 
    width: 1000px; 

    background-repeat: repeat-y; 

    border-image-source: url(./blue-diamond.gif); 
    border-image-repeat:repeat; 
    border-image-slice: 30; 

background-color: 2211ff; 
font-family: "Impact", Times, serif; 
font-size: 14px; 
color: white; 

} 


footer > a 
{ 
color: white; 
font-family: "Impact", Times, serif; 
font-size: 14px; 

} 

#container 
{ 
    border-left: 3px solid #283379; 
    border-right: 3px solid #283379; 
    text-align: left; 
    margin: 0 auto; 
    width: 1050px; 
    background-color: #ffffff; 
    background-repeat: repeat-y; 
    height: 750px; 

} 


nav > a 
{ 

color: #ccccff; 

} 

nav#hor > div 
{ 

border: 1px solid white; 
float: left; 
padding: 10px; 
background-color: #000044; 
} 

nav#hor 
{ 
width: 1000px; 
height: 50px; 
margin: 0; 
font-size: 110%; 

} 


nav#hor a 
{ 

color: rgb(0 0,238); 
} 


nav#hor > div > a 
{ 

color: #ccccff; 
text-decoration: none; 
font-size: 100%; 
} 



nav#hor>div:hover 
{ 

background-color: #018802; 

} 

h1 
{ 
font-family: "MV Boli", Times, Serif; 

font-style: bold; 
text-align: center; 
font-size: 36px; 

} 

h2 
{ 

font-family: "MV Boli", Times, Serif; 
font-style: bold; 
text-align: center; 
font-size: 26px; 
} 

h3 
{ 

font-family: "MV Boli", Times, Serif; 
font-style: bold; 
text-align: center; 
font-size: 20px; 
} 




#text-container 
{ 





border: 2px solid cyan; 



    width: 1005px; 
    height: 690px; 
    */ zoom: 1; 
    */ margin: 0; 
    display: table-cell; 


padding-top: 10px; 
    padding-right: 10px; 
    padding-bottom: 10px; 
    padding-left: 10px; 


} 



#text-container:after 
{ 
clear: both; 
    content: "."; 
    display: block; 
    height: 0; 
    visibility:hidden; 

} 

#text-container > p 
{ 
font-family: "Myriad Web Pro", Times, Serif; 
font-size: 18px; 
} 

.left img 
{ 

float: left; 
padding: 0 20px 20px 0; 

} 





.left > p 
{ 
font-family: "Myriad Web Pro", Times, Serif; 
font-size: 18px; 
} 


.right img 
{ 
float: right; 
    margin: 0px 0px 15px 20px; 
    border: 1px solid transparent; 

} 



.right > p 
{ 
font-family: "Myriad Web Pro", Times, Serif; 
font-size: 18px; 
} 


nav#hor ul 
{ 
list-style-type: none; 
    margin: 0; 
    padding: 0; 
    overflow: auto; 
    background-color: #000044; 

} 

nav#hor ul li:hover 
{ 
    background-color: #018802; 

} 


nav#vert ul 
{ 
list-style-type: none; 
    margin: 0; 
    padding: 0; 
    overflow: auto; 
    background-color: #000044; 
    display: table-row; 

} 
nav#hor li 
{ 
float: left; 
border: 1px solid white;. 

} 

nav#vert li 
{ 
float: left; 
border: 1px solid white;. 

} 


nav#vert li a, .dropbtn { 
    display: inline-block; 
    // color: white; 
    text-align: center; 
    padding: 8px 8px; 
    text-decoration: none; 
} 


nav#hor li a, .dropbtn { 
    display: inline-block; 
    // color: white; 
    text-align: center; 
    padding: 8px 8px; 
    text-decoration: none; 
} 


nav#hor li a:hover, .dropdown:hover .dropbtn { 
    background-color: #018802; 
} 

nav#vert li a:hover, .dropdown:hover .dropbtn { 
    background-color: #018802; 
} 


li.dropdown { 
    display: inline-block; 
} 

.dropdown-content ul li 
{ 

width: 100%; 
} 
.dropdown-content { 
    display: none; 
    position: absolute; 
    background-color: #f9f9f9; 
    min-width: 160px; 
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 
     color: rgb(0, 0, 238); 
    z-index: 1; 

} 

#eAndADropdown 
{ 


} 

#restaurantDropdown li 
{ 
background-color: #000044; 
border: 1px solid white; 

} 

#restaurantDropdown ul 
{ 
border: 1px solid white; 

} 



#restaurantDropdown:hover 
{ 
    background-color: #018802; 
} 

#restaurantDropdown a 
{ 
    color: rgb(0, 0, 238); 

} 

.dropdown-content a { 
    color: rgb(0, 0, 238); 
    border: 1 px solid white; 
    padding: 12px 16px; 
    text-decoration: none; 
    display: block; 
    text-align: left; 
} 

.dropdown-content a:hover {background-color: #f1f1f1} 

.show {display:block;} 

li a 
{ 

color: rgb(0, 0, 238); 
} 

testingMongoose.php

<html> 
<head> 
<title> The Mountains </title> 
<link rel="stylesheet" type="text/css" href="./main.css"> 
<link rel="icon" href="./ski_icon.png"> 
<script src="jquery-3.0.0.min.js" type="text/javascript"></script> 
<script> 
$(document).ready(function() { 

    $("#container").css("height", 800); 


    }); 

    </script> 

</head> 
<body> 





<?php include 'topandside.php';?> 

<div id="text-container"> 



<iframe src="./index.php" width=700; height=620;></iframe> 


    </div> 
</div> 
</div> 

<?php include 'footer.php';?> 
</div> 

</body> 
</html> 

這次,顯示:table-cell;對於nav#vert和#text-content,似乎不像以前那樣。

+0

沒有你想單獨的頁面沒有自己的網頁的I幀(雖然我應該能夠解決這些。)到一個頁面wordpress可能是你的https://wordpress.org/ –

+0

這不是一個wordpress頁面。 – MongooseLover

+0

不知道有什麼問題。 – MongooseLover

回答

0

浮動:留在導航#VERT似乎已經解決了這個問題,但它打破了一些其他的事情

+0

「哦,看!我修好了......」#theWorldOfCSS –