In my html i have somewhat like this
<div id="content">
<div id="wrapper">
<div id="steps">
<form id="formElem" name="formElem" action="" method="post">
<fieldset class="step">
<legend>General Information </legend>
</fieldset>
<fieldset class="step">
<legend>Medical History</legend>
</fieldset>
</form>
</div>
<div id="navigation" style="display:none;">
<ul>
<li class="selected">
General Information
</li>
<li>
Medical History
</li>
</div>
</div>
my css file is this
#content{
margin:30px auto;
text-align:center;
width:900px;
position: relative;
height:100%;
}
#left{
position: absolute;
z-index: 1;
margin-top:10px;
margin-left:30px;
text-align:center;
width:170px;
color:#000000;
height:500px;
-moz-box-shadow:0px 0px 13px #aaa;
-webkit-box-shadow:0px 0px 13px #aaa;
box-shadow:0px 0px 23px #aaa;
background-color:rgba(300,250,250,0.5);
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
}
#wrapper{
-moz-box-shadow:0px 0px 13px #aaa;
-webkit-box-shadow:0px 0px 13px #aaa;
box-shadow:0px 0px 23px #aaa;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
border:2px solid #fff;
//background-color:#f9f9f9;
background-color:rgba(220,220,220,0.5);
width:1000px;
height:100%;
overflow:hidden;
}
#steps{
width:1000px;
height:520px;
overflow: auto;
/* overflow: scroll;
overflow: */
}
.step{
float:left;
width:1000px;
/* height:600px; */
overflow-y: auto;
/* overflow:-moz-scrollbars-vertical; */
/*height:320px;*/
}
#navigation{
height:40px;
background-color:#e9e9e9;
border-top:1px solid #fff;
-moz-border-radius:0px 0px 10px 10px;
-webkit-border-bottom-left-radius:10px;
-webkit-border-bottom-right-radius:10px;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
}
#navigation ul{
list-style:none;
float:left;
margin-left:10px;
}
#navigation ul li{
float:left;
border-right:1px solid #ccc;
border-left:1px solid #ccc;
position:relative;
margin:0px 2px;
}
#navigation ul li a{
font-size: 10px;
display:block;
height:40px;
background-color:#444;
color:#777;
outline:none;
font-weight:bold;
text-decoration:none;
line-height:40px;
width: auto;
padding:0px 5px;
border-right:1px solid #fff;
border-left:1px solid #fff;
background:#f0f0f0;
background:
-webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.09, rgb(240,240,240)),
color-stop(0.55, rgb(227,227,227)),
color-stop(0.78, rgb(240,240,240))
);
background:
-moz-linear-gradient(
center bottom,
rgb(240,240,240) 9%,
rgb(227,227,227) 55%,
rgb(240,240,240) 78%
)
}
I want to adjust my height of every fieldset according to the length of fields present in it. how can i do this?
Fieldsets automatically adjust in height to contain the form elements contained within. No additional CSS is required.
The fieldsets must contain form fields obviously; not 100% sure why you've omitted them from your example code.
Related
my problem is this code that does not work when I make it responsive.. I know to change height and width must transform in percentage but this code is damaged when I make it responsive ..
This code *Css ( which I want to transform it into responsive ) :
#import url(http://weloveiconfonts.com/api/?family=entypo);
/* entypo */
[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
.entry{
width:430px;
position: RELATIVE;
top:600PX;
LEFT: 5PX;
margin:50px auto;
border-radius:50%;
float:left;
}
.container{
width:110px;
height:110px;
margin:0 0 30px 10px;
position:relative;
border-radius:60px;
background:rgba(255,255,255,.2);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
transition:all .5s;
overflow:hidden;
}
.photo{
width:90px;
height:90px;
margin:8px;
border-radius:50%;
position:absolute;
left:0px;
overflow:hidden;
border:2px solid white;
}
.pic{ max-width:100%; }
.button{
width:60px;
height:60px;
position:absolute;
right:20px;
top:25px;
font-size:40px;
text-align:center;
line-height:60px;
border-radius:50%;
color:rgba(255,255,255,.8);
background:green;
background:linear-gradient(bottom,#5ca321,#8ab24f);
box-shadow:0 0 0 1px rgba(0,0,0,.2),
0 0 0 5px rgba(255,255,255,.1),
0 0 0 6px rgba(0,0,0,.2);
transition:all .5s;
cursor:pointer;
}
.button:hover{
background:#5ca321;
box-shadow:inset 0 1px 5px rgba(0,0,0,.3);
text-shadow:0px 0px 5px gray;
}
.name{
height:60%;
width:180px;
position:absolute;
right:80px;
padding:20px;
font:25px arial;
color:white;
opacity:0;
transition:all .5s .5s;
text-shadow:0 0 5px rgba(0,0,0,.5);
}
.small{ font-size:14px; display:block; margin-top:10px; }
.comment{
width:370px;
position:relative;
padding:15px;
font-size:16px;
color:rgba(0,0,0,.7);
border-radius:10px;
background:rgba(255,255,255,.4);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
opacity:0;
transition:all 1s;
}
.comment:before{
content:'';
width:0;
height:0;
position:absolute;
bottom:100%;
left:2%;
border-bottom:15px solid rgba(255,255,255,.4);
border-left:50px solid transparent;
border-right:50px solid transparent;
border-top:15px solid transparent;
}
.container:hover{ width:400px; }
.container:hover .name,.container:hover + .comment{
opacity:1;
}
Maybe you need look demo
https://codepen.io/GARDFIELD3/pen/zNgmMP
I want to do this responsive that size and position Thank and ignore my mistakes of speech but i I do not speak English :)
It's not responsive because you don't have media queries in your CSS. As of right now, your code will run regardless of screen size, but let's say you wanted to look differently on a mobile phone, then you would do something like this:
#media screen and (max-width: 420px) {
/* put in different CSS code here */
}
You need to use media queries and target whichever element you want to change.
For example:
#media screen and (min-width: 767px) {
.entry {
margin-top: 100px;
}
}
This will add a margin-top of 100px to your .entry class for screens with a width equal to or bigger than 767px.
Read more/take a tutorial as an introduction.
Is this closer to what you want to achieve?
I've set the width of comment and entry to 100% because you probably want both div-tags to expand to the full width of the document.
Though it's true that the width will be relative to the document, this doesn't mean that any of this is responsive design. Responsive design keeps the viewport in regard. Try googling that. It's highly unlikely that there are no tutorials available in your language.
#import url(http://weloveiconfonts.com/api/?family=entypo);
#media screen and (max-width: 420px) {
/* entypo */}
[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
.entry{
width:100%;
position: RELATIVE;
top:60PX;
LEFT: 5PX;
margin:50px auto;
border-radius:50%;
float:left;
}
.container{
position:relative;
width:110px;
height:110px;
margin:0 0 30px 10px;
border-radius:60px;
background:rgba(255,255,255,.2);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
transition:all .5s;
overflow:hidden;
}
.photo{
width:90px;
height:90px;
margin:8px;
border-radius:50%;
position:absolute;
left:0px;
overflow:hidden;
border:2px solid white;
}
.pic{ max-width:100%; }
.button{
width:60px;
height:60px;
position:absolute;
right:20px;
top:25px;
font-size:40px;
text-align:center;
line-height:60px;
border-radius:50%;
color:rgba(255,255,255,.8);
background:green;
background:linear-gradient(bottom,#5ca321,#8ab24f);
box-shadow:0 0 0 1px rgba(0,0,0,.2),
0 0 0 5px rgba(255,255,255,.1),
0 0 0 6px rgba(0,0,0,.2);
transition:all .5s;
cursor:pointer;
}
.button:hover{
background:#5ca321;
box-shadow:inset 0 1px 5px rgba(0,0,0,.3);
text-shadow:0px 0px 5px gray;
}
.name{
height:60%;
width:180px;
position:absolute;
right:80px;
padding:20px;
font:25px arial;
color:white;
opacity:0;
transition:all .5s .5s;
text-shadow:0 0 5px rgba(0,0,0,.5);
}
.small{ font-size:14px; display:block; margin-top:10px; }
.comment{
width:100%;
position:relative;
padding:15px;
font-size:16px;
color:rgba(0,0,0,.7);
border-radius:10px;
background:rgba(255,255,255,.4);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
opacity:0;
transition:all 1s;
}
.comment:before{
content:'';
width:0;
height:0;
position:absolute;
bottom:100%;
left:2%;
border-bottom:15px solid rgba(255,255,255,.4);
border-left:50px solid transparent;
border-right:50px solid transparent;
border-top:15px solid transparent;
}
.container:hover{ width:100%; }
.container:hover .name,.container:hover + .comment{
opacity:1;
}
<div class="entry">
<div class="container">
<div class="button entypo-chat"></div>
<div class="name">CoStY
<span class="small">Fondator</span>
</div>
<div class="photo">
<img src="https://s12.postimg.org/pptidy8kd/14021445_1166695373388266_6290547632102759142_n.jpg" alt="" class="pic">
</div>
</div>
<p class="comment">Salut, numele meu este Enache Constantin si sunt creatorul acestei comunitati :) Puteti sa ajutati la intretinerea comunitatii printr-o donatie ,pm pentru detalii :) </p>
</div>
<div class="entry">
<div class="container">
<div class="button entypo-chat"></div>
<div class="name">Gardfield<3
<span class="small">Administrator</span>
</div>
<div class="photo">
<img src="http://farm1.staticflickr.com/133/378977890_40f31e1962_q.jpg" alt="" class="pic">
</div>
</div>
<p class="comment">Salut,numele meu este Alexandru Mihai iar misiunea mea este sa dezvolt aceasta comunitate din toate punctele de vedere. Sunt deschis la orice colaborare si ma puteti contacta pentru probleme tehnice printr-un pm :) </p>
</div>
Why is the two boxes to the right side, and not centered align?
fiddle: http://jsfiddle.net/gh76q/1/
I, tried change the position of box 2 to relative, it will do the trick but the box moves when hovering the box 1.
HTML:
<div align="center" id="top-link">
<div class="switch">
<div class="avg_display">Box 1</div>
<div class="avg_hide">Box1 info<br></div></div>
<div class="link-block">Box2</div>
</div>
CSS:
#top-link {padding-bottom:40px;}
.switch {display:inline-block;}
.link-block {
display: inline-block;
padding: 20px 20px 20px 20px;
border: 2px solid #e7e7e7;
border-radius: 5px;
height:25px;
width:200px;
text-align:center;
margin-top:10px;
margin-right:20px;
position:absolute;
color:#555;
}
.link-block a {
text-align: center;
vertical-align: middle;
line-height: 25px;
color:#555;
}
.link-block:hover {
background-color:#1396d0;
border:2px solid #1396d0;
color:#fff;
margin-top:10px;
margin-right:20px;
}
.link-block:hover a{
color:#fff;
}
.avg_display {
display:inline-block;
padding: 20px 20px 20px 20px;
border: 2px solid #e7e7e7;
border-radius: 5px;
height:25px;
width:200px;
text-align:center;
margin-top:10px;
margin-right:20px;
}
.avg_hide {
display:none;
padding: 20px 20px 20px 20px;
background-color:#1396d0;
border:2px solid #1396d0;
color:#fff;
border-radius: 5px;
height:250px;
width:200px;
text-align:center;
margin-top:10px;
margin-right:20px;
}
.avg_display a {
text-align: center;
vertical-align: middle;
line-height: 25px;
color:#555;
}
Fiddle:
Remove position:absolute from the box2 class.
.link-block {
display: inline-block;
padding: 20px 20px 20px 20px;
border: 2px solid #e7e7e7;
border-radius: 5px;
height:25px;
width:200px;
text-align:center;
margin-top:10px;
margin-right:20px;
/*position:absolute;*/
vertical-align:top; /* Keep the box always on top */
color:#555;
}
DEMO
I am trying float two columns called column_l and column_r side by side on an about page but the problem I am having is that its moves and messes up the footer and hangs outside of the container div.
column_l contains the info about the company while column_r contains a picture.
I will show my code, but basically, the body contains a container which I have put all my code on.
For this, I created a wrapper to include the two columns.
body{
background-image:url('../img/small_logo.jpg');
background-repeat:repeat;
position:relative;
background-position:50% 50%;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 0.8em;
/*padding-left:25px;
padding-right:25px;*/
overflow:visible;
margin:0px auto;
background-attachment:fixed;
min-height:100%;
width:100%;
/* FOR A LARGE-SINGLE IMAGE TO STRETCH COMFORTABLY ACROSS A BODY
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')";
zoom:1;*/
}
#container{
margin: auto;
padding:10px;
background-color:#F5F5DC;
width:720px;
border:2px black solid;
position:relative;
background-attachment: scroll;
display:block;
height:auto;
margin-bottom:10px;
padding-bottom:15px
}
#logo{ margin:0;
padding:auto;
position: inherit;
display:block;
height:auto;
width:auto;
}
#wrapper{margin:auto; height:auto; width:100%;}
#column_l {
width: 60%;
margin: 0;
padding: 0;
background-color: #FFFF99;
float:left;
}
#column_r {
width: 40%;
margin: 0;
margin-right:0px;
float: right;
background-color: #FFFF99;
position: absolute;
left:60%;
}
#column_r p {
font-size: 11px;
margin: 7px;
}
#nav{
background-color: #800000;
margin-left: 0px;
text-align: center;
border-top: 2px solid #800000;
border-bottom: 2px solid #800000;
padding:10px 0 10px 0;
font-family:"Buxton Sketch";
font-size:16px;
}
#rightContainer{
float:right;
margin:0;
padding:0;
border:2px solid;
width:25%;
height:400px;
}
th{font-size:large;
}
#footer{
margin-left:0;
padding:10px 0 10px 0;
text-align:center;
opacity:0.6em;
filter:alpha(opacity=60); /* For IE8 and earlier */
height:40px;
vertical-align:bottom;
font-family:"Buxton Sketch";
font-size:16px;
}
#copyright{
margin:auto;
padding:3px;
text-align:center;
}
#copyright p{
font-size: 12px;
color:#000000;
}
#fb {padding:2px;margin:auto; float:left; }
/* Styles for Navigation */
#nav ul {
list-style-type: none;
width: 100%;
margin: 0;
padding: 0;
}
#nav li {
float: left;
}
#nav a {
color: #fff;
text-decoration: none;
margin: 0 3px;
padding: 5px;
display: inline;
}
#nav a:hover {
border: 1px solid #456;
background-color: #F0E68C;
font-size:large;
color:black;
}
/* Styles for Footer */
#footer ul {
list-style-type: none;
width: 100%;
margin: 0px;
padding: 5px;
padding-top:5px;
}
#footer li {
float: left;
}
#footer a {
color: black;
text-decoration: none;
margin-top: 0px;
padding-top: 5px;
display: inline;
}
#footer a:hover {
border: 1px solid ;
background-color: #F0E68C;
font-size:medium;
}
/*Classes */
.largehead h1{font-size:x-large;}
.shadow:before,
.shadow:after {
content:"";
position:absolute;
z-index:-2;
}
.shadow p {
font-size:16px;
font-weight:bold;
}
.shadow img {
font-size:16px;
font-weight:bold;
}
/* Shadow Style */
.shadow {
-moz-box-shadow:2px 2px 5px black,-2px -2px 5px lightblue; /* For Older Versions */
-webkit-box-shadow:2px 2px 5px black,-2px -2px 5px lightblue;
box-shadow:2px 2px 5px black,-2px -2px 5px lightblue;
/* For 'IE' */
filter:
progid:DXImageTransform.Microsoft.Shadow(color=lightblue,direction=0,strength=5) /* Top */
progid:DXImageTransform.Microsoft.Shadow(color=#777777,direction=90,strength=3) /* Right */
progid:DXImageTransform.Microsoft.Shadow(color=#777777,direction=180,strength=3) /* Bottom */
progid:DXImageTransform.Microsoft.Shadow(color=lightblue,direction=270,strength=5);/* Left */
}
-webkit-box-shadow:2px 2px 5px black,-2px -2px 5px lightblue;
box-shadow:2px 2px 5px black,-2px -2px 5px lightblue;
/* For 'IE' */
filter:
progid:DXImageTransform.Microsoft.Shadow(color=lightblue,direction=0,strength=5) /* Top */
progid:DXImageTransform.Microsoft.Shadow(color=#777777,direction=90,strength=3) /* Right */
progid:DXImageTransform.Microsoft.Shadow(color=#777777,direction=180,strength=3) /* Bottom */
progid:DXImageTransform.Microsoft.Shadow(color=lightblue,direction=270,strength=5);/* Left */
}
/* Rotated box*/
.rotated {
-webkit-box-shadow:none;
-moz-box-shadow:none;
box-shadow:none;
-webkit-transform:rotate(-3deg);
-moz-transform:rotate(-3deg);
-ms-transform:rotate(-3deg);
-o-transform:rotate(-3deg);
transform:rotate(-3deg);
}
.rotated > :first-child:before {
content:"";
position:absolute;
z-index:-1;
top:0;
bottom:0;
left:0;
right:0;
background:#fff;
-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
/* Lifted corners */
.lifted {
-moz-border-radius:4px;
border-radius:4px;
}
.lifted:before,
.lifted:after {
bottom:15px;
left:10px;
width:50%;
height:20%;
max-width:300px;
max-height:100px;
-webkit-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-moz-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
-webkit-transform:rotate(-3deg);
-moz-transform:rotate(-3deg);
-ms-transform:rotate(-3deg);
-o-transform:rotate(-3deg);
transform:rotate(-3deg);
}
.lifted:after {
right:10px;
left:auto;
-webkit-transform:rotate(3deg);
-moz-transform:rotate(3deg);
-ms-transform:rotate(3deg);
-o-transform:rotate(3deg);
transform:rotate(3deg);
}
/* Curled corners */
.curled {
border:1px solid #efefef;
-moz-border-radius:0 0 120px 120px / 0 0 6px 6px;
border-radius:0 0 120px 120px / 0 0 6px 6px;
}
.curled:before,
.curled:after {
bottom:12px;
left:10px;
width:50%;
height:55%;
max-width:200px;
max-height:100px;
-webkit-box-shadow:0 8px 12px rgba(0, 0, 0, 0.5);
-moz-box-shadow:0 8px 12px rgba(0, 0, 0, 0.5);
box-shadow:0 8px 12px rgba(0, 0, 0, 0.5);
-webkit-transform:skew(-8deg) rotate(-3deg);
-moz-transform:skew(-8deg) rotate(-3deg);
-ms-transform:skew(-8deg) rotate(-3deg);
-o-transform:skew(-8deg) rotate(-3deg);
transform:skew(-8deg) rotate(-3deg);
}
.curled:after {
right:10px;
left:auto;
-webkit-transform:skew(8deg) rotate(3deg);
-moz-transform:skew(8deg) rotate(3deg);
-ms-transform:skew(8deg) rotate(3deg);
-o-transform:skew(8deg) rotate(3deg);
transform:skew(8deg) rotate(3deg);
}
dl.border-around
{
margin: 2em 0;
padding: 0;
width: 20em;
float:right;
}
.border-around dt
{
background-color: #131210;
color: #959289;
padding: .5em;
font-weight: bold;
text-align: center;
text-transform: uppercase;
border-left: 1px solid #131210;
border-right: 1px solid #131210;
border-top: 1px solid #131210;
}
.border-around dd
{
margin: 0 0 1em 0;
background: #DBD8D8;
text-align: center;
padding: 1em .5em;
font-style: italic;
border-left: 1px solid #131210;
border-right: 1px solid #131210;
border-bottom: 1px solid #131210;
}
div.wrapperleft{
float:left;
position:relative;
}
}
div.wrapper{
float:right; /* important */
position:relative; /* important(so we can absolutely position the description div */
}
div.description{
position:absolute; /* absolute position (so we can position it where we want)*/
bottom:0px; /* position will be on bottom */
left:0px;
width:60%;
/* styling bellow */
background-color:black;
font-family: 'tahoma';
font-size:15px;
color:white;
opacity:0.6; /* transparency */
filter:alpha(opacity=60); /* IE transparency */
}
p.description_content{
padding:0px;
margin:0px;
}
/*Feedback*/
form {float:left; width:50%; text-align:left; padding-top:30px;color:white; margin-left:200px; list-style:none;}
textarea {border:0; padding-top:0px; font-family:"Lucida Console";}
input {border:0; padding:0; font-family:"Lucida Console";}
submit {border:0; padding:0; font-family:"Lucida Console";}
label {border:0; padding:0; font-family:"Lucida Console";}
label {float:left; width:150px; text-align:right; display:block;margin-top:5px;}
textarea {border:1px gray solid; margin-left:10px; padding:5px;}
input, datalist {border:1px gray solid; margin-left:10px; padding:5px;}
input {width:280px; margin-bottom:16px;}
textarea {width:280px; height:150px; text-align:justify; margin-bottom:16px;}
#feedback {padding-top:10px; margin-right:100px;}
and for the html:
<body > <!-- START BODY -->
<!-- START CONTAINER -->
<div id="container" class="shadow lifted">
<div id="logo"> <!-- START LOGO -->
<img src="img/cropped_logo.jpg" alt="logo" width=720px height=300px />
</div> <!-- END LOGO -->
<!-- START NAV-->
<div id="nav" class="shadow">
<a href="index.html" > Home</a>
Menu
Wholesale
Our Story
Contact Us
</div> <!-- END NAV-->
<div id="wrapper">
<!-- Begin Left Column -->
<div id="column_l">
<h1>Our Story</h1>
<p> What started out as making ice cream for family and friends, in our home kitchen, quickly flourished into a labor of love and creativity for ice cream aficionado Hugh Balthrop. "For me, ice cream is all about real flavor using natural and local ingredients. This is where the passion is for me. Ice cream brings out the inner kid in everyone". Ever had Sweet Potato Ice Cream with candied pecans? What about lemon sweet tea sorbet? Wild Blueberry Frozen Yogurt? Blackberry or Watermelon Sorbet? The list goes on and on... Where can you find it, you ask? Right now, you can grab some at Oxbow Restaurant, in Clarksdale, MS, Mississippi Grounds and Cleveland Country Club in Cleveland, MS, Delta Bistro and TurnRow Books, in Greenwood, MS.</p>
</div><!-- End Left Column -->
<!-- Begin Right Column -->
<div id="column_r">
<img alt="" height="288" src="img/hugh.jpg" width="193" />
<p>Hugh Balthrop</p>
</div><!-- End Right Column -->
</div><br> <!--end wrapper-->
<div id="footer" class="shadow lifted">
<div class="fb-like" data-href="https://www.facebook.com/pages/Sweet-Magnolia-Ice-Cream-Co/303952586284264?fref=ts" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true" clear:both></div>
Home
Menu
Wholesale
Our Story
Contact Us
</div> <!-- end of footer -->
<div id="copyright" class="lifted">
<p id="copyright">Sweet Magnolia Ice Cream Company © 2013. All Rights Reserved.</p>
</div>
</div> <!-- End of Container -->
</body>
</html>
I tried pushing column_r over with left:60% but it now covers up the footer.
You are forgetting to clear the floats.
Add
#footer { clear: both; }
And it will fix the problem.
Adding
float:left;
to the #wrapper CSS class will make the outer containing div expand to hold the contents of the article.
There are still some left over style issues you will have to deal with but hopefully this gets you on your way.
Add the rule 'clear: both; to the footer css styling, should do the trick!
I want to create a stylized border with CSS3 like the below image. But, I don't know how? Here is the image:
Like this: http://nicolasgallagher.com/pure-css-speech-bubbles/
.triangle-isosceles {
position:relative;
padding:15px;
margin:1em 0 3em;
color:#000;
background:#f3961c;
/* css3 */
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
background:-moz-linear-gradient(top, #f9d835, #f3961c);
background:linear-gradient(top, #f9d835, #f3961c);
}
/* creates triangle */
.triangle-isosceles:after {
content:"";
display:block; /* reduce the damage in FF3.0 */
position:absolute;
bottom:-15px;
left:50px;
width:0;
border-width:15px 15px 0;
border-style:solid;
border-color:#f3961c transparent;
}
<style type="text/css">
.comments .comment{
width:10%;
margin-bottom:20px;
}
.comments .comment p{
margin:0 0 10px 0;
}
.bubble{
position:relative;
background-color:#CCC;
padding:20px;
color:#009;
border-radius:3px;
margin-left:20px;
}
.bubble::after{
content:"";
display:block;
position:absolute;
left:-15px;
top:15px;
width:0px;
height:0px;
border-top:8px solid transparent;
border-bottom:8px solid transparent;
border-right:15px solid #CCC;
}
</style>
<div class="comments">
<div class="comment bubble">
<p>This is comment</p>
</div>
</div>
you can use CSS3 box_round:
.box_round {
-webkit-border-radius: 5px;
border-radius: 5px;
}
try this site :)
A website I'm working on, www.flynntec.com, is having problems with IE8. I'm assuming it's happening in 6 and 7 as well. Firefox/Chrome both work fine.
I have two Ads in the CSS3 dropdown (Excel) that when IE mouses over the ads, the dropdown closes. IE8 can hover over EVERYTHING else in the dropdown, but as soon as it hits the ads, the dropdown closes immediately.
Any thoughts?
CODE ADDED
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Microsoft Office Tutorials - Excel, Word, PowerPoint, Access" />
<title>Microsoft Office Tutorials - Excel, Word, PowerPoint, Access</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-image: url(media/background.jpg);
background-repeat: repeat-x;
}
</style>
</head>
<body>
<div align=center id="container">
<div id="banner"><img src="media/banner.jpg" width="800" height="120" alt="Microsoft Office Tutorials Banner" /></div>
<div id="content">
<ul id="menu">
<li>Home<!-- Begin Home Item -->
<div class="dropdown_2columns"><!-- Begin 2 columns container -->
<div class="col_2">
<h2>Microsoft Office Tutorials</h2>
</div>
<div class="col_2">
<p>This site is dedicated to training people to use Microsoft Excel, Word, PowerPoint and Access. Whether you're just beginning or a professional, there are resources here for you.</p>
<p>Our philosophy is different. We have created our own tutorials, but we've also leveraged the power of the internet to gather the world's best training tutorials on the Microsoft Office Suite.</p>
</div>
<div class="col_2">
<h2>Our Philosophy</h2>
</div>
<div class="col_1">
<img src="media/FreeMini.jpg" alt="Always Free" width="125" height="48" vspace="10" />
</div>
<div class="col_1">
<p>We are dedicated to providing you the best information. <b>Always Free </b></p>
</div>
</div><!-- End 2 columns container -->
</li><!-- End Home Item -->
<li>Excel<!-- Begin Excel Item -->
<div class="dropdown_5columns"><!-- Begin ExcelContainer -->
<div class="col_5">
<h2>Microsoft Excel</h2>
</div>
<div class="col_1"> <h3>Overview</h3>
<p class="black_box">Microsoft Excel is the world's most popular spreadsheet creation tool.</p>
</div>
<div class="col_1">
<ul class="greybox"><h3>Beginner</h3><li>Welcome to Excel</li>
<li>Calculations</li>
<li>Functions and Formulas</li>
<li>Formatting</li>
<li>Creating Charts</li>
<li>More...</li>
</div>
<div class="col_1">
<ul class="greybox"><h3>Intermediate</h3><li>Freezing Panes</li>
<li>The =IF Formula</li>
<li>Conditional Formatting</li>
<li>The Date in Excel</li>
<li>Drop-Down Lists</li>
<li>More...</li>
</div>
<div class="col_1">
<ul class="greybox"><h3>Advanced</h3><li>Using =VLOOKUP</li>
<li>Pivot Tables</li>
<li>Using the Goal Seek Feature</li>
<li>Templates</li>
<li>Macros</li>
<li>More...</li>
</ul>
</div>
<div class="col_1">
<ul class="greybox"><h3>Sponsor</h3><p><script type="text/javascript"><!--
google_ad_client = "ca-pub-1357665793080808";
/* Support */
google_ad_slot = "8875829615";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> </p>
</div>
<div class="col_1">
<p></p>
</div>
<div class="col_5">
<h2>Additional Free Resources</h2>
</div>
<div class="col_3">
<img src="media/youtube-logo.jpg" alt="YouTube Picture" name="youtube" width="90" height="70" class="img_left imgshadow" id="youtube" />
<p>If you prefer to learn visually, YouTube is the best free source for Excel tutorials in the world. We have compiled the best, most popular Excel tutorials from YouTube and put them here for your convenience. </p>
<br />
<img src="media/microsoft-logo__111129012732.jpg" alt="" name="microsoft" width="90" height="24" class="img_left imgshadow" id="microsoft" />
<p>Microsoft has some of the best tutorials in the world listed on their website. Microsoft Training can be found here.</p>
<br />
</div>
<div class="col_5">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1357665793080808";
/* Excel CSS3 Dropdown */
google_ad_slot = "0975939945";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div><!-- End Excel container -->
</li><!-- End Excel Item -->
CSS
#charset "utf-8";
/* CSS Document */
#container {
}
#banner img{
border:7px solid #FFF;
border-radius: 7px;
-moz-border-radius: 7px
-webkit-border-radius: 7px;
}
#banner {
padding-bottom: 0px;
}
#content {
}
#footer {
}
#menu {
list-style: none;
width: 774px;
margin:30px auto 0px auto;
height:43px;
padding:0px 20px 0px 20px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
background: #003910;
background: -moz-linear-gradient(top, #FFF, #003910);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF), to(#003910));
-moz-box-shadow:inset 0px 0px 1px #edf9ff;
-webkit-box-shadow:inset 0px 0px 1px #edf9ff;
box-shadow:inset 0px 0px 1px #edf9ff;
border: 1px solid #FFF;
}
#menu li {
float:left;
display:block;
text-align:center;
position:relative;
padding: 4px 10px 4px 10px;
margin-right:30px;
margin-top:7px;
border:none;
}
#menu li:hover {
background: #F4F4F4;
background: -moz-linear-gradient(top, #F4F4F4, #EEEEEE);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F4F4F4), to(#EEEEEE));
border: 1px solid #777777;
padding: 4px 9px 4px 9px;
-moz-border-radius: 5px 5px 0px 0px;
-webkit-border-radius: 5px 5px 0px 0px;
border-radius: 5px 5px 0px 0px;
}
#menu li a {
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
color: #EEEEEE;
display:block;
outline:0;
text-decoration:none;
text-shadow: 1px 1px 1px #000;
}
#menu li:hover a {
color: #161616;
text-shadow: 1px 1px 1px #FFFFFF;
}
#menu li .drop {
padding-right: 21px;
background: url(media/drop.png);
background-repeat: no-repeat;
background-position: right 8px;
}
#menu li:hover .drop {
background: url(media/drop.png);
background-repeat: no-repeat;
background-position: right 7px;
}
.dropdown_1column,
.dropdown_2columns,
.dropdown_3columns,
.dropdown_4columns,
.dropdown_5columns {
margin:4px auto;
position:absolute;
left:-999em; /* Hides the drop down */
text-align:left;
padding:10px 5px 10px 5px;
border:1px solid #777777;
border-top:none;
/* Gradient background */
background:#F4F4F4;
background: -moz-linear-gradient(top, #EEEEEE, #BBBBBB);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EEEEEE), to(#BBBBBB));
/* Rounded Corners */
-moz-border-radius: 0px 5px 5px 5px;
-webkit-border-radius: 0px 5px 5px 5px;
border-radius: 0px 5px 5px 5px;
}
#menu li:hover .dropdown_1column,
#menu li:hover .dropdown_2columns,
#menu li:hover .dropdown_3columns,
#menu li:hover .dropdown_4columns,
#menu li:hover .dropdown_5columns {
left:-1px;top:auto;
}
.dropdown_1column {width: 146px;}
.dropdown_2columns {width: 284px;}
.dropdown_3columns {width: 422px;}
.dropdown_4columns {width: 560px;}
.dropdown_5columns {width: 740px;}
.col_1,
.col_2,
.col_3,
.col_4,
.col_5 {
display:inline;
float: left;
position: relative;
margin-left: 5px;
margin-right: 5px;
}
.col_1 {width:130px;}
.col_2 {width:270px;}
.col_3 {width:410px;}
.col_4 {width:550px;}
.col_5 {width:690px;}
#menu .menu_right {
float:rightright;
margin-right:0px;
}
#menu li .align_right {
/* Rounded Corners */
-moz-border-radius: 5px 0px 5px 5px;
-webkit-border-radius: 5px 0px 5px 5px;
border-radius: 5px 0px 5px 5px;
}
#menu li:hover .align_right {
left:auto;
right:-1px;
top:auto;
}
#menu p, #menu h2, #menu h3, #menu ul li {
font-family:Arial, Helvetica, sans-serif;
line-height:21px;
font-size:12px;
text-align:left;
text-shadow: 1px 1px 1px #FFFFFF;
}
#menu h2 {
font-size:21px;
font-weight:400;
letter-spacing:-1px;
margin:7px 0 14px 0;
padding-bottom:14px;
border-bottom:1px solid #666666;
}
#menu h3 {
font-size:14px;
margin:7px 0 14px 0;
padding-bottom:7px;
border-bottom:1px solid #888888;
}
#menu p {
line-height:18px;
margin:0 0 10px 0;
}
.strong {
font-weight:bold;
}
.italic {
font-style:italic;
}
#menu li:hover div a {
font-size:12px;
color:#015b86;
}
#menu li:hover div a:hover {
color:#029feb;
}
#menu li ul {
list-style:none;
padding:0;
margin:0 0 12px 0;
}
#menu li ul li {
font-size:12px;
line-height:24px;
position:relative;
text-shadow: 1px 1px 1px #ffffff;
padding:0;
margin:0;
float:none;
text-align:left;
width:130px;
}
#menu li ul li:hover {
background:none;
border:none;
padding:0;
margin:0;
}
.imgshadow {
background:#FFFFFF;
padding:4px;
border:1px solid #777777;
margin-top:5px;
-moz-box-shadow:0px 0px 5px #666666;
-webkit-box-shadow:0px 0px 5px #666666;
box-shadow:0px 0px 5px #666666;
}
.img_left {
width:auto;
float:left;
margin:5px 15px 5px 5px;
}
#menu li .black_box {
background-color:#333333;
color: #eeeeee;
text-shadow: 1px 1px 1px #000;
padding:4px 6px 4px 6px;
/* Rounded Corners */
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
/* Shadow */
-webkit-box-shadow:inset 0 0 3px #000000;
-moz-box-shadow:inset 0 0 3px #000000;
box-shadow:inset 0 0 3px #000000;
}
#menu li .greybox li {
background:#F4F4F4;
border:1px solid #bbbbbb;
margin:0px 0px 4px 0px;
padding:4px 6px 4px 6px;
width:116px;
/* Rounded Corners */
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
#menu li .greybox li:hover {
background:#ffffff;
border:1px solid #aaaaaa;
padding:4px 6px 4px 6px;
margin:0px 0px 4px 0px;
}
<!--[if IE 6]>
<style>
body {behavior: url("csshover3.htc");}
</style>
<![endif]-->
Thanks!
This issue is caused by a particular wmode setting on the Flash object. For what you're after, you need the wmode to be opaque, and not window, direct, gpu or the default. However, since you are using Google ads you have absolutely no control over the content (you can't even use JavaScript to change it because of cross-domain issues). This is probably deliberate on Google's part, to prevent users from hiding ads by covering them up with another element, but frustrating when trying to have anything legitimiately on top of it.
The best suggestion I can come up with is to have the container for the ad change its visibility style to hidden while the menu is shown, then change it back to visible afterward. It'll look messy, but at least it won't be handled on top of your actual content.