473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Trying to float an element but my background dissapears every time i do

1
Heres the code in this case i am trying to float the google map but my background dissapears anytime i float any element.

Expand|Select|Wrap|Line Numbers
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Suzy Dallas MD</title>
  6. <meta name="author" content="Benjamin Reiner">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9. <meta name="HandheldFriendly" content="true">
  10. <link rel="stylesheet" type="text/css" href="Stylesheets/MainStyles.css"
  11.  
  12. </head>
  13. <body>
  14.  
  15. <header role="banner">
  16.         <h1 class="marque">Suzy Dallas MD#</h1>
  17.  
  18.     <nav id="BackToNav" role="navigation" class="PageNav" >
  19.         <ul>
  20.             <li><a href="Index.html" title="Home Page">Home</a></li>
  21.             <li><a href="yourchild.html" title="Helpful Links On Your Child's Health">Your Child</a></li>
  22.                <li><a href="contactandlocation.html" title="Contact Us">Contact Us</a></li>
  23.             <li><a href="billingandpractice.html" title="Our Policies">Practice And Billing Policies</a></li>
  24.             <li><a href="formsanddocuments.html" title="Forms and Other Documentation">Download Forms</a></li>
  25.         </ul>
  26.     </nav>
  27.  
  28.     </header>
  29.     <h2 class="ContactMarq">Contact Information and Location</h2>
  30.  
  31.     /*Heres the element I am trying to float*/
  32.  
  33.     <div class="Map"><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=2001+Club+Manor+Drive+%233+Maumelle,+AR+72113+(501)+851-9889&amp;aq=&amp;sll=40.07304,-74.724323&amp;sspn=5.892478,12.689209&amp;ie=UTF8&amp;hq=&amp;hnear=2001+Club+Manor+Dr+%233,+Maumelle,+Arkansas+72113&amp;t=m&amp;z=14&amp;iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>
  34.       <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=2001+Club+Manor+Drive+%233+Maumelle,+AR+72113+(501)+851-9889&amp;aq=&amp;sll=40.07304,-74.724323&amp;sspn=5.892478,12.689209&amp;ie=UTF8&amp;hq=&amp;hnear=2001+Club+Manor+Dr+%233,+Maumelle,+Arkansas+72113&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe>
  35. </div>          
  36. </body>
  37. </html>
  38.  
  39. Heres The CSS 
  40.  
  41. @charset "utf-8";
  42.  
  43. @import url("../Webfonts/VastShadow_Regular/stylesheet.css");
  44. @import url("../Webfonts/Little_Snorlax/stylesheet.css");
  45. @import url("../Webfonts/Home_Hearth_OutlineBold/stylesheet.css");
  46. @import url("../Webfonts/peasunshine/stylesheet.css");
  47. @import url("../webfonts/Amatic_Bold/stylesheet.css");
  48. @import url("../webfonts/jrhand/stylesheet.css");
  49. /* CSS Document */
  50. html {
  51.     background-image: url(../Images/clouds.jpg);
  52.     background-repeat: repeat;
  53.     background-position: center;
  54.     display: block;
  55.     background-size: 50%;
  56. }
  57. body {
  58.     background-color: #FFFFFF;
  59.     width: 80%;
  60.     margin-left: 10%;
  61.     margin-right: 15%;
  62.     margin-top: 20px;
  63.     margin-bottom: 0%;
  64.     background-image: 
  65.     background-position: 10% 10%;
  66.     border-color: #3FA9F5;
  67.     border-radius: 5px;
  68.     border-style: solid;
  69. }
  70. header{
  71.     width: 80%;
  72.     margin-left: 10%;
  73.     margin-right: 10%;
  74.  
  75. }
  76. .marque {
  77.     font-family: peasunshine;
  78.     font-style: normal;
  79.     font-size: 3em;
  80.     text-align: center;
  81.     text-decoration: none;
  82.     color: #3fa9f5;
  83.     background-position: 3% 3%;
  84.     margin-right: 12px;
  85.     margin-left: 12px;
  86. }
  87. .PageNav ul {
  88.     float: left;
  89.     border-color: #6B8BC6;
  90.     border-radius: 2.5px;
  91.     border-style: solid;
  92.     overflow:hidden;
  93.     position:relative;
  94.     text-align:center;
  95.     width: 100%;
  96.     margin-left:auto;
  97.     margin-right:auto;
  98. }
  99. .PageNav li {
  100.     display: inline-block;
  101.     list-style: none;
  102.     padding-top: 5px;
  103.     padding-left: 15px;
  104.     padding-right: 15px;
  105.     padding-bottom: 5px;
  106.     margin-left: auto;
  107.     margin-right: auto;
  108.     text-align: center;
  109.     text-indent:10px;
  110.     float:left;
  111. }
  112. .PageNav a {
  113.     text-decoration: none;
  114.     color: #6b8bc6;
  115.     text-align: center;
  116.     font-family: "Amatic Bold";
  117.     float: left;
  118.     font-size: 1.8em;
  119.     width: 100%;
  120.     margin-left:auto;
  121.     margin-right:auto;
  122.     display: inline-block;
  123.     padding-right: 2%;
  124.     padding-left: 2%;
  125.  
  126.  
  127. }
  128. .DocBaby {
  129.     display:block;
  130.     margin-left: auto;
  131.     margin-right: auto;
  132.     padding-left: 20px;
  133.     padding-right: 20px;
  134.     align-content:center;
  135.     position:relative;
  136.     clear:both;
  137.  
  138. }
  139. #AboutUs {
  140.     font-family: jrhand;
  141.     text-align: center;
  142.     float: left;
  143.     line-height: normal;
  144.     font-size: 1.5em;
  145.     background-color: #FFFFFF;
  146.     border-color: #1B1464;
  147.     border-style: solid;
  148.     border-radius: 5px;
  149.     margin-left:auto;
  150.     margin-right:auto;
  151. }
  152. .ContactMarq {
  153.     font-family: peasunshine;
  154.     font-size: 1.8em;
  155.     text-align: center;
  156.     font-style: italic;
  157.     color: #235AAA;
  158. }
  159. .Map { float:right;
  160.         position:relative;
  161.         clear:both
Dec 10 '13 #1
2 1443
specify the height of your bg
Dec 11 '13 #2
height of div is optional just give overflow: hidden; to main div
and add that divs you want to float inside main_div


Expand|Select|Wrap|Line Numbers
  1. <div class="main_div" style="height: px; overflow: hidden;">
  2.  
  3.   <div class="float_div1" style="width: 200px; float:left"><div>
  4.  
  5.    <div class="float_div2" style="width: 200px; float:left"><div>
  6.  
  7.  
  8. </div>
Dec 11 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dmitry Savchin | last post by:
I have web application with web-service in root catalog of virtual folder and some web-forms in sub-catalog ("Config"). Authentication configured in web.config file as "form"-mode. File web.config...
11
by: Joseph S. | last post by:
Hi all, how do I avoid typing the keyword "$this->" every time I need to reference a member of a class inside the class? (coming from a world of cozy auto-complete enabled Java / .Net IDEs I...
4
by: vunet.us | last post by:
Hi, I found a bug in IE6, though it is known already. If I have a CSS background property set to some image, such as background:url(myimg.gif);, and I apply this property to some html element,...
3
by: palepimp | last post by:
Hello all, I have searched far and wide for a solution to my issue. In short, here is the problem: 1. 3 PC's enter data into an Access 2003 database (PC's are running Vista w/ Office 2007...
5
by: elbin | last post by:
Hello, first to say that I am a total beginner in Javascript but I know some programming (python in particular) and am able to understand methods/parameters and so on. Here's my problem: I am...
4
by: Frank Lund | last post by:
Should we call .Dispose() every chance we get... on every object that exposes .Dispose()... and every time we have such an object? For example, is it true that *every* time I create a DataTable...
1
by: OBAFGKM_RNS | last post by:
In my html, I have an embedded sound wav. I access that sound from my javascript using Play() and Stop(). However, once stopped, the sound will aways resume from where it left off, (making Stop...
0
by: John Kotuby | last post by:
Hi all, I am trying to add some advanced search tools to a standard HTML website by using an Iframe whose SRC attribute points to a remote ASP.NET site which contains the advanced search tool...
1
by: Lagon666 | last post by:
How can i set the #contain div's background same as #wrapper background? (Child element background same as father elemenet background). This source works in Firefox but how can i fix it in IE (IE6)?...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.