My class goes like this to expand the div dynamically as min-height is given. May i know what goes wrong with this.
.gil_Individual_FormPanelBg
{
width:500px;
min-height:50px !Important;
float:none;
margin:5px auto;
padding:4px;
background-color:#f7f7f7;
border:Solid 1px #e6e6e6;
-border-radius:4px 4px 4px 4px;
-Moz-border-radius:4px 4px 4px 4px;
-webkit-border-radius:4px 4px 4px 4px;
}
Shabir, looks as though you have got a whole heap of float:left's when there is no need.
Try this updated CSS:
.gil_Individual_FormPanelBg
{
width:500px;
min-height:50px;
margin:5px auto;
padding:4px;
background-color:#f7f7f7;
border:Solid 1px #e6e6e6;
-border-radius:4px 4px 4px 4px;
-Moz-border-radius:4px 4px 4px 4px;
-webkit-border-radius:4px 4px 4px 4px;
}
.gil_Individual_FormWrapper
{
position:relative;
height:auto;
width:100%;
margin:2px auto;
padding:0px;
}
.gil_Individual_FormRow
{
position:relative;
width:100%;
min-height:20px !Important;
margin:3px 0 0 0;
padding:0px;
}
.gil_Individual_FormLable
{
position:relative;
width:150px;
height:15px;
float:left;
margin:0px;
padding:0px;
font-family:'Helvetica', 'Arial', 'Sans-Serif';
font-size:11px;
font-weight:Normal;
color:#3B5998;
text-align:left;
text-decoration:none;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
}
.gil_Individual_FormCtrl
{
position:relative;
width:350px;
min-height:15px !Important;
float:left;
margin:0px;
padding:0px;
font-family:'Helvetica', 'Arial', 'Sans-Serif';
font-size:11px;
font-weight:Normal;
color:#333;
text-align:left;
text-decoration:none;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
}
HTML stays the same. If you are going to add the class float. Consider creating a clear class to place after the floated DIV.
Class something like this:
.clear{
clear:both;
margin:0;
padding:0;
height:1px;
}
After reviewing the link you posted, it does look like you have probably over complicated the build but hopefully it should work the way you want it to now.
Dan
Related
I have created a table program in which everything works fine, but when I try to make it responsive using media queries it doesn't seem to work as you can see it is uneven. Here is the CodePen for the whole code: http://codepen.io/meeksmadness/pen/YNwOoE. I have provided some images to help if you need them and any help is appreciated.
Regular Screen:
Responsive Screen:
table {
position:relative;
z-index:0;
overflow:hidden;
border:1px solid black;
border-radius:5px;
border-collapse: collapse;
display:block;
max-width:600px;
width:100%;
margin:0 auto;
margin-top:50px;
background-color:white;
-webkit-box-shadow: 10px 10px 15px -7px rgba(0,0,0,0.60);
-moz-box-shadow: 10px 10px 15px -7px rgba(0,0,0,0.60);
box-shadow: 10px 10px 15px -7px rgba(0,0,0,0.60);
}
tr {
color:black;
font-size:18px;
font-weight:400;
}
tr:nth-child(odd){
background-color:#C5C5C5;
}
tr:first-child {
background-color:#191919;
color:#D3D3D3;
font-size:23px;
font-weight:200;
}
tr:first-child td {
border-bottom:4px solid #696969;
}
tr:last-child td {
border-bottom:0;
}
td {
position:relative;
overflow:hidden;
width:200px;
height:auto;
padding:20px;
border-bottom:1px solid #474747;
border-right: 1px solid #474747;
}
td:last-child {
border-right:0;
}
td span.special {
display:block;
float:right;
cursor:pointer;
}
td>a.delete {
position:absolute;
cursor:pointer;
opacity:0;
top:0;
bottom: 0;
right: 0;
background: red;
padding: 18px;
font-size:22px;
}
#media (max-width:600px){
table {
width:100%;
}
}
#media (max-width:357px){
td span.special {
float:none;
text-align:center;
}
}
When I hover the first div for example, it is meant to change the bg color, and the color changes but it flashes when changing the color and it's not smooth at all in Chrome. but it is really smooth in IE and Firefox ... Why is that? (that's all I want to know)
CSS:
.bg {
position:absolute;
top:0;
left:0;
bottom:0;
right:0;
width:100%;
height:100%;
background-color:#D8D8D8;
z-index:-10;
}
.DIVOne {
color:#FFF;
margin-top:10%;
background-color:#A2D700;
height:300%;
line-height:200%;
width:20%;
padding:0 20px;
font-size:300%;
font-family:Verdana, Geneva, sans-serif;
margin-left:20%;
border: solid 5px #000;
border-width:0 4px 5px 0;
border-radius:5px;
border-color:transparent #ddd #999 transparent;
background-clip:padding-box;
text-align:center;
z-index:-5;
}
.DIVOne:hover {
border-width:0 2px 3px 0;
margin-right:4px;
position:relative;
left:2px;
top:3px;
}
.DIVOne:hover ~ .bg {
background-color:#A2D700;
transition:all 0.5s;
}
.DIVTwo {
color:#FFF;
background-color:#FF8000;
height:300%;
line-height:200%;
width:20%;
margin-top:10px;
padding:0 20px;
font-size:300%;
font-family:Verdana, Geneva, sans-serif;
margin-left:20%;
border: solid 5px #000;
border-width:0 4px 5px 0;
border-radius:5px;
border-color:transparent #ddd #999 transparent;
background-clip:padding-box;
text-align:center;
z-index:-6;
}
.DIVTwo:hover {
border-width:0 2px 3px 0;
margin-right:4px;
position:relative;
left:2px;
top:3px;
}
.DIVTwo:hover ~ .bg {
background-color:#FF8000;
}
.DIVThree {
color:#FFF;
background-color:#0080FF;
height:300%;
line-height:200%;
width:20%;
margin-top:10px;
padding:0 20px;
font-size:300%;
font-family:Verdana, Geneva, sans-serif;
margin-left:20%;
border: solid 5px #000;
border-width:0 4px 5px 0;
border-radius:5px;
border-color:transparent #ddd #999 transparent;
background-clip:padding-box;
text-align:center;
z-index:-6;
}
.DIVThree:hover {
border-width:0 2px 3px 0;
margin-right:4px;
position:relative;
left:2px;
top:3px;
}
.DIVThree:hover ~ .bg {
background-color:#0080FF;
}
HTML:
<div class="DIVOne"> Content </div>
<div class="DIVTwo"> Content </div>
<div class="DIVThree"> Content </div>
demo: http://www.jsfiddle.net/aryanf/w7unZ/
The problem is with the following code
.DIVOne:hover {
border-width:0 2px 3px 0;
margin-right:4px;
position:relative;
left:2px;
top:3px;
}
It's the position:relative; property that is causing the problem on Chrome. Try removing it. Besides, I don't see why you have introduced it in the first place. It seems to work fine without it.
.DIVOne:hover {
border-width:0 2px 3px 0;
margin-right:4px;
//position:relative;
left:2px;
top:3px;
}
If it is not rendering and appearing smooth on other browsers, try to add some css code additionaly inside your CSS file.
Suppose if you need Rounded Corner Border in IE, you will use
.ddlStyle {
border-radius: 4px;
height: 22px;
width: auto;
max-width: 300px;
min-width: 120px;
padding: 0 0 0px 0px;
padding-right: 4px;
font-family: Calibri,Verdana, Tahoma, 'Segoe UI';
}
But this may not render perfect on all other Browser due to different behavior of Rendering Engine. So make addition of some lines and try on other browsers.
.ddlStyle {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
height: 22px;
width: auto;
max-width: 300px;
min-width: 120px;
padding: 0 0 0px 0px;
padding-right: 4px;
font-family: Calibri,Verdana, Tahoma, 'Segoe UI';
}
Hope, it solves the problem.
I have an asp.net gridview. i have applied a style to the main headings bar using shading.
This works fine in IE9 but it doesnt use the shading in Chrome. I use the exact same shading for div etc in my webapplication and both Chrome and IE9 work fine.
So why does Chrome not like my CSS? (specifically the 3 shading lines in .mGrid th shown below)
thanks
Damo
HTML Code
<asp:GridView ID="GridViewMain" OnRowDataBound="RowDataBound" OnPageIndexChanging="gridView_PageIndexChanging"
runat="server" AllowPaging="True" PageSize="50" PagerSettings-Position="TopAndBottom"
CssClass="mGrid"
PagerStyle-CssClass="pgr"
AlternatingRowStyle-CssClass="alt"
>
</asp:GridView>
CSS
/* Grids */
.mGrid { width: 100%; background-color: #fff; margin: 5px 0 10px 0; border: solid 1px #525252; border-collapse:collapse;font-family:Verdana; font-size:12px; }
.mGrid td { padding: 2px; border: solid 1px #c1c1c1; color: #003366; }
.mGrid th { padding: 4px 2px; color: #000000;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#99CCFF'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#FFF), to(#9CF)); /* for webkit browsers */
background: -moz-linear-gradient(top, #FFF, #9CF); /* for firefox 3.6+ */
background: #99CCFF; font-size: 0.9em;border: solid 2px #c1c1c1;
}
.mGrid .alt { background: #fcfcfc; }
.mGrid .pgr {background: #FFFFFF; }
.mGrid .pgr table { margin: 5px 0; }
.mGrid .pgr td { border-width: 0px; padding: 0 6px; border-left: solid 1px #666; font-weight: bold; color: #fff; line-height: 12px; }
.mGrid .pgr a { color: #666; text-decoration: none; }
.mGrid .pgr a:hover { color: #000; text-decoration: none; }
.mGrid tr:hover{background-color:#FFFFCC;color:white;}
/* End Grids */
U can use below style,
/***** data table ******/
.dataTable{ display:table; margin:0px 0px 3px 0px; padding:0px; border: none; border-spacing:0px; font-size:100%; }
.noPad{ padding:0px !important; margin:0px !important;}
.dataTable tr.altRow td{ background:#EAEAEA ;}
.dataTable tr.selRow td{ background:#FFFFCC ;}
.dataTable td.middleAlign{ padding:11px !important; }
.dataTable tr.totalRow td{ background:#999999 !important;}
.dataTable th{ background: url('/_layouts/ABFSG/MF/Images/tableHdr_bg.png') left top repeat-x; margin:0px; font-size:12px; color:#000; border-top:0px solid #D7BB00; vertical-align:middle !important; }
.dataTable th, td{ display:table-cell; padding:5px 5px 5px 7px; border:0px solid #cecece; vertical-align:middle;text-align:left; font-weight:normal;}
.dataTable td.subRow { border-top:1px solid #D7BB00;background: url('/_layouts/ABFSG/MF/Images/subRowHeader.png') left top repeat-x; height:17px; padding:2px !important; padding-left:7px !important; }
.dataTable tr.singleRow td{ padding:0px 5px 3px 5px !important;}
.withBorder td{ border:1px solid #EAEAEA;}
.dataTable td.gray{ background-color:#818181;}
.dataTable td.noPadDiv{ padding:0px !important; margin:0px !important;}
.dataTable td.vtop{ vertical-align:top;}
.sec_dataTable{display:table; margin:0px 0px 3px 0px; padding:0px; border: none; border-spacing:0px; font-size:100%;}
.sec_dataTable tr th{background:#FFFAEA ; margin:0px; font-size:11px; color:#000; display:table-cell; padding:5px 5px 5px 7px; border:1px solid #DDDDDD; vertical-align:middle; text-align:left; font-weight:normal;}
.sec_dataTable tr td{ display:table-cell; padding:5px 5px 5px 7px; border:1px solid #DDDDDD; vertical-align:middle; text-align:left; font-weight:normal;}
.sec_dataTable tr.altRow td{ background:#EAEAEA !important;}
.dataTableBrd{display:table; margin:0px 0px 3px 0px; padding:0px; border: none; border-spacing:0px; font-size:100%;}
.dataTableBrd tr th{ background: url('/_layouts/ABFSG/MF/Images/tableHdr_bg.png') left top repeat-x;border:1px solid #EBBA05; margin:0px; font-size:11px; color:#000;padding:5px 5px 5px 7px; border-top:0px solid #D7BB00; vertical-align:middle !important; font-weight:normal;}
.dataTableBrd tr td{ display:table-cell; padding:5px 5px 5px 7px; border:1px solid #DDDDDD; vertical-align:middle; text-align:left; font-weight:normal;}
.dataTableBrd tr.altRow td{ background:#EAEAEA !important;}
.globalNav{background:url(/_layouts/ABFSG/MF/Images/globalNav_bg.png) left top repeat-x; margin:0px; padding:0px; height:22px; float:left;}
.globalNav ul{ margin:0px; padding:0px; list-style:none;}
.globalNav li{ float:left;}
.globalNav li a{ display:block; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#000; margin:0px; padding:4px 10px 4px 10px;}
.globalNav li.sep{ display:block; background:url('/_layouts/ABFSG/MF/Images/globalNav_sep.png') left top no-repeat; width:1px; height:22px;}
.globalNav li.sel a{ display:block; background:url(/_layouts/ABFSG/MF/Images/globalNav_selbg.png) top left repeat-x; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#FECB02;}
.globalNav li.sel a:hover{ cursor:default;}
.globalNav li.first{ float:left; background:url(/_layouts/ABFSG/MF/Images/globalNav_unselFirL.png) left top no-repeat; margin:0px; padding:0px;}
.globalNav li.first a{ display:block; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#000; margin:0px; padding:4px 10px 4px 10px;}
.globalNav li.firstsel{ float:left; background:url(/_layouts/ABFSG/MF/Images/globalNav_selFirL.png) left top no-repeat; margin:0px; padding:0px;}
.globalNav li.firstsel a{ display:block; background:url(/_layouts/ABFSG/MF/Images/globalNav_selbg.png) top left repeat-x; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#FECB02; margin:0px 0px 0px 5px; padding:4px 10px 4px 5px;}
.globalNav li.firstsel a:hover{ cursor:default;}
.globalNav li.last{ float:left; background:url(/_layouts/ABFSG/MF/Images/globalNav_unselLastL.png) right top no-repeat; margin:0px; padding:0px;}
.globalNav li.last a{ display:block; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#000; margin:0px; padding:4px 10px 4px 10px;}
.globalNav li.lastsel{ float:left; background:url(/_layouts/ABFSG/MF/Images/globalNav_selLastL.png) right top no-repeat; margin:0px; padding:0px;}
.globalNav li.lastsel a{ display:block; background:url(/_layouts/ABFSG/MF/Images/globalNav_selbg.png) top left repeat-x; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#FECB02; margin:0px 4px 0px 0px; padding:4px 5px 4px 10px;}
.globalNav li.lastsel a:hover{ cursor:default;}
.grayNav ul{ margin:0px; padding:0px;}
.grayNav li{ float:left; list-style:none;}
.grayNav li a{ display:block; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#6c7f85; margin:0px; padding:0px 2px; }
.grayNav li.sel a{ display:block; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#000; margin:0px; padding:0px 2px; }
.grayNav li.sel a:hover{ cursor:default; }
.grayNav li.sep{ color:#C8C8C8; font-weight:bold; margin:0 7px 0 7px;}
.header h1{ font-size:15px; color:#000; font-weight:bold; float:left;}
.btnSearchTopPad{ margin-top:0px; *margin-top:1px;}
.arrowPlace{position:absolute; margin-top:-7px;}
.solutionTxt{ padding:5px 0px; width:100%;width:97%\9; text-align:center; color:#000!important; float:left;}
.blkLinkText{ padding:5px 0px; width:100%;width:97%\9; color:#000!important; float:left;}
.largeFont{ font-size:15px; font-weight:bold;}
/*.pagination_bg{background:#D0D0D0; float:left; -moz-border-radius: 3px;-webkit-border-radius: 3px;}*/
.pagination_sel{ padding:2px 5px; float:left;}
.pagination_sel a{ cursor:default;}
.pagination_unsel{ padding:2px 5px; float:left;}
.testimonialBox{ background: #fff url(/_layouts/ABFSG/MF/Images/header_boxBG.png) bottom left repeat-x;}
.testimonialBoxShadow{ background: #fff url(/_layouts/ABFSG/MF/Images/header_boxSDO.png) center no-repeat; height: 10px;}
.testimonial{ position:relative; border:1px solid #9F9F9F; padding:0px!important; float:left; border-left:none; border-top:none; border-bottom:none;}
.testimonialCont{position:absolute; height: 18px; width: 18px; background-position: -47px 0px;}
.testimonial .bdrT{ background:url('/_layouts/ABFSG/MF/Images/testmonial_Top.png') left top repeat-x; margin-left:25px; padding:3px 0 0 0; font-size:3px;}
.testimonial .bdrB{ background:url('/_layouts/ABFSG/MF/Images/testmonial_Top.png') left top repeat-x; margin-left:25px; padding:0 0 3px 0; height:1px; }
.testimonial .bdrL{background: url("/_layouts/ABFSG/MF/Images/testmonial_Aro.png") no-repeat scroll left center transparent; margin: 0;padding: 0 0 0 22px;}
.tmTL{top: -2px; left:19px; clip: rect(auto 8px 8px auto);}
.tmTR{top: -2px; right: -5px; clip: rect(auto auto 8px 8px); float: right;}
.tmBL{bottom: -1px;left: 19px; clip: rect(8px 8px auto auto); }
.tmBR{bottom: -1px;right: -5px;clip: rect(8px auto auto 8px); }
.os_banner1{ margin-left:-10px; padding:103px 0px 4px 0px; background:url(/_layouts/ABFSG/MF/Images/our_solutions_banner1.png) left top no-repeat; width:454px; height:115px;}
.os_banner2{ margin:-4px 0px 0px -10px; padding:103px 0px 4px 0px; background:url(/_layouts/ABFSG/MF/Images/ourSolutions_banner2.jpg) left top no-repeat; width:452; height:111px; width: 456px;}
.os_banner_grp{ margin:-4px 0px 0px -10px; padding:103px 0px 0px 0px; background:url(/_layouts/ABFSG/MF/Images/group_oursolutions.png) left top no-repeat; width:452; height:115px; width: 456px;}
.banner1Cont{ margin:-70px 0 0 250px;}
.banner2Cont{ margin:-80px 0 0 205px;}
h1.privaFont{font-size:16px; color:#000; font-family:PrivaThreeItalicPro,Verdana, Arial; letter-spacing:-1px;}
.os_bannerBG{ background: url(/_layouts/ABFSG/MF/Images/our_solutions_bg.png) top left repeat-x; padding:7px; height:92px; width:442px;}
.headerBox_smallShadow{ background: #fff url(/_layouts/ABFSG/MF/Images/header_box_smallSDO.png) center top no-repeat; height:6px; padding:0px; margin:0px; float:left;}
#wealth_layer,#fundsLayer,#orgFundsLayer,#rollOver1,#rollOver2,#wealthPro_layer,#adityaB_layer,#mutual_layer,#Purchase_step1,#equity,#funds{padding-top:10px; position:absolute; display:none; z-index:10;}
.portlet_01 .bdrRt{background-image:url(/_layouts/ABFSG/MF/Images/purple_dropdwn_right.png);background-position:right 5px; background-repeat:no-repeat; margin-bottom:0px;}
.portlet_01 .bdrLt{background-image:url(/_layouts/ABFSG/MF/Images/purple_dropdwn_left.png);background-position:left 5px; background-repeat:no-repeat; margin-bottom:0px;}
.borderBottHeader{ border-bottom:1px solid #D6D6D6; width:449px; margin-left:3px; margin-top:-0px; *margin-top:-10px;}
.moverArr{background-image:url(/_layouts/ABFSG/MF/Images/solutionSelArr.png); background-position:absolute; height:9px; width:113px; margin-top:-8px; *margin-top:-8px; margin-left:5px; z-index:99;}
#breadCrumbs a{ font-weight:bold;}
.star_icon{width:16px; height:15px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-34px -113px; background-repeat:no-repeat; padding:0px;}
.ratingFull_icon{width:10px; height:11px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-54px -113px; background-repeat:no-repeat; padding:0px;}
.ratingHalf_icon{width:9px; height:11px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-67px -113px; background-repeat:no-repeat; padding:0px;}
.returns_icon{width:17px; height:15px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-81px -116px; background-repeat:no-repeat; padding:0px;}
.risk_icon{width:18px; height:17px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-101px -116px; background-repeat:no-repeat; padding:0px;}
.liquidity_icon{width:16px; height:18px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-122px -116px; background-repeat:no-repeat; padding:0px;}
.investment_icon{width:16px; height:17px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-143px -116px; background-repeat:no-repeat; padding:0px;}
.awards_icon{width:15px; height:20px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-167px -113px; background-repeat:no-repeat; padding:0px;}
.vr_icon{width:12px; height:10px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-189px -118px; background-repeat:no-repeat; padding:0px;}
.botBrdr{ border-top:1px solid #FFDD00; height:0px; border-bottom:1px solid #FFF; margin:0 0px 0 -10px; padding-right:20px;}
.lightYellowBox{border: 1px solid #F6E04E; position:relative; overflow:visible;background-color:#FEFCE5;background-image:none;}
.type7 .yellowBxCrnr{background-image:url(/_layouts/ABFSG/MF/Images/sprite_icon.png);}
.yellowBxCrnr { position:absolute; height: 12px; width: 12px; background-position:-68px 0px;}
.YTL{position: absolute;left: -1px; top: -1px; clip: rect(0 6px 6px 0);}
.YTR {position: absolute;top: -1px; right: -1px; clip: rect(auto auto 6px 6px); float: right;}
.YBL {position: absolute;clip: rect(6px 6px auto auto);left: -1px; bottom: -1px;_bottom: -3px;}
.YBR { position: absolute; clip: rect(6px auto auto 6px);bottom: -1px;right: -1px;_bottom: -3px;}
.fundDetailsBg{ margin:0px 0px 0px 7px; padding:40px 10px 0px 350px; background:url(/_layouts/ABFSG/MF/Images/fund_details.png) left top no-repeat; width:320px; height:118px; }
.gratuityDetailsBg{ margin:0px; padding:40px 0px 0px 350px; background:url(/_layouts/ABFSG/MF/Images/oursolutions_gratuity.png) left top no-repeat; width:330px; height:90px; font-size:20px;}
.fundDetailsMFBg{ margin:0px; padding:40px 0px 4px 340px; background:url(/_layouts/ABFSG/MF/Images/fund_details.gif) left top no-repeat; width:330px; height:138px; }
.fundDetailsCorporateBg{ margin:0px; padding:40px 0px 4px 0px; background:url(/_layouts/ABFSG/MF/Images/Corporatefunddetailsoverview_img.jpg) left top no-repeat; width:670px; height:145px;}
.shadowSep{background:url(/_layouts/ABFSG/MF/Images/shadowSep.png) left top no-repeat; width:680px; height:9px;}
.marginNeg{margin-left:-5px; margin-right:-2px;}
div.greyTab{background:url('/_layouts/ABFSG/MF/Images/button_sprite.png') left no-repeat;overflow: hidden; height: 24px;padding-left: 10px;margin-right: 0px; float:left; background-position:0px -124px; z-index:1000; }
a:hover.greyTab{text-decoration:none}
a.greyTab { display:block; background:url('/_layouts/ABFSG/MF/Images/button_sprite.png') right no-repeat ; padding: 5px 23px 5px 5px; margin-right: 0px;height: 24px; float:left; color: #000; background-position: right -124px;}
#contentBox{ position:absolute; left:264px; left:260px\9; top:256px; float:left; z-index:1001;}
#searchNAVBox{ position:relative; float:left;}
.borderBottom{ border-bottom:1px solid #acacaa; margin-left:3px; margin-top:-0px; *margin-top:-10px; padding-bottom:10px;}
.greyBox{ background-color:#EAEAEA; border-top:1px solid #acacaa; border-bottom:1px solid #acacaa; padding:10px; margin-left:-10px; padding-left:10px;width:671px;}
.whtBox{ background-color:#fff; padding:10px; margin-left:-10px; padding-left:10px; width:671px;}
.whiteBox_01{padding-bottom:10px; margin-left:-10px; padding-left:10px; background:#ffffff;}
#curtain{ width:100%; height:100%; position: absolute; z-index:995 !important; overflow:hidden; left:0px; top:0px; opacity:.4; filter: alpha(opacity=60); background-color: #000;}
.popupAlign{position:absolute; left:50%; top:20%; z-index:999 !important;}
.closeBtn{width:17px; height:17px; background-image:url('/_layouts/ABFSG/MF/Images/sprite_icon.png'); background-position:-137px 0px; background-repeat:no-repeat; padding:0px; `enter code here`margin-top:-3px; margin-right:-5px; cursor:pointer;}
need to put the line
background: #99CCFF; font-size: 0.9em;border: solid 2px #c1c1c1;
before the shading is applied. As shown below. now fixed.
thanks
damo
.mGrid th { padding: 4px 2px; color: #000000;
**background: #99CCFF; font-size: 0.9em;border: solid 2px #c1c1c1;**
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#99CCFF'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#FFF), to(#9CF)); /* for webkit browsers */
background: -moz-linear-gradient(top, #FFF, #9CF); /* for firefox 3.6+ */
}
I have a footer on my page, where the content is placing correctly, under div#main (which includes div#left and div#right), but the background (the big blue thing) is placed way over div#main.
I have tried display:block and z-indexing the divs, to no avail.
Anyone have any idea what's going on?
Code:
body {
background:url(aaa-bg.jpg) repeat-x #e7e9e9;
margin:0;
padding:0;
color:#383838;
font:12pt verdana;
}
img {
border:0;
}
a:link {
color:#e29511;
text-decoration:none;
}
a:hover {
color:#e29511;
text-decoration:underline;
}
a:visited {
color:#808080;
}
/* header ------------------------------------------------------------------------------ */
#header {
margin:10px auto 10px;
width:800px;
height:97px;
}
/* nav ------------------------------------------------------------------------------ */
#nav {
width:800px;
margin:0px auto 3px;
height:30px;
}
#nav ul {
margin:0 0px 0px 0;
padding:0;
list-style:none;
}
#nav ul li {
width:140px;
height:20px;
padding:5px 0 5px 0;
float:left;
margin:0 10px 0 0;
background:#cdcdcd;
color:#000000;
position:relative;
z-index:99999;
text-align:center;
border-top-left-radius:10px;
border-top-right-radius:10px;
border-top:3px solid transparent;
border-left:3px solid transparent;
border-right:3px solid transparent;
}
#nav ul li:hover {
cursor:pointer;
border-top:3px solid #e29511;
border-left:3px solid #e29511;
border-right:3px solid #e29511;
}
#nav ul li.home {
width:140px;
height:20px;
padding:5px 0 5px 0;
float:left;
margin:0 10px 0 0;
background:#cdcdcd;
color:#000000;
position:relative;
z-index:99999;
text-align:center;
border-top-left-radius:10px;
border-top-right-radius:10px;
border-top:3px solid transparent;
border-left:3px solid transparent;
border-right:3px solid transparent;
}
#nav ul li.home:hover {
cursor:pointer;
-moz-box-shadow: 5px 5px 2px #656565;
-webkit-box-shadow: 5px 5px 2px #656565;
box-shadow: 5px 5px 2px #656565;
}
#nav ul li ul {
width:140px;
margin:5px 0 0 -3px;
float:left;
-moz-box-shadow: 5px 5px 2px #656565;
-webkit-box-shadow: 5px 5px 2px #656565;
box-shadow: 5px 5px 2px #656565;
background:url(aaa-navbg3.png) repeat-x #ffffff;
border-bottom:3px solid #e29511;
border-left:3px solid #e29511;
border-right:3px solid #e29511;
}
#nav ul li ul li {
width:140px;
font-weight:normal;
font-size:10pt;
background:none;
border-top:1px solid #808080;
border-left:none;
border-right:none;
border-top-left-radius:0px;
border-top-right-radius:0px;
}
#nav ul li ul li:hover {
background:url(aaa-libg2.png) repeat-x;
border-top:1px solid #808080;
border-left:none;
border-right:none;
}
/* toppane ------------------------------------------------------------------------------ */
#toppane {
width:100%;
height:210px;
background:url(aaa-toppane3.jpg) repeat-x;
padding:20px 0 20px;
margin:0px 0 20px 0;
position:relative;
z-index:-1;
border-top:1px solid #000000;
border-bottom:1px solid #000000;
}
#toppane-inner {
width:800px;
height:210px;
margin:0px auto;
}
/* slideshow ------------------------------------------------------------------------------ */
#window {
clear:both;
width:800px;
height:210px;
overflow:hidden;
position:relative;
margin:0;
padding:0;
}
#slideshow {
width:1600px;
height:420px;
overflow:hidden;
position:relative;
margin:0;
padding:0;
}
#slideshow li {
width:800px;
height:210px;
float:left;
display:inline;
margin:0;
padding:0;
}
/* main ------------------------------------------------------------------------------ */
#main {
width:800px;
margin:5px auto;
padding:0px;
}
#left {
width:390px;
margin:0 20px 0 0;
padding:0px;
float:left;
}
#right {
width:390px;
font-size:11pt;
margin:0;
padding:0px;
float:right;
}
#right img {
margin:0 0 5px 0;
}
#right a:link {
text-decoration:none;
color:#383838;
}
#right a:hover {
text-decoration:none;
color:#383838;
}
#right a:visited {
text-decoration:none;
color:#383838;
}
h2 {
width:390px;
font:14pt verdana;
border-bottom:1px solid #383838;
margin:0 0 5px 0;
text-align:right;
}
.segment {
margin:0 0 40px 0;
}
#footer {
background:blue;
width:800px;
margin:30px auto;
color:#ffffff;
}
#footer table {
width:800px;
}
#footer tr {
width:800px;
}
#footer td {
width:200px;
}
Adding clear:left; to your footer solves this problem.
The issue you're seeing is that #left and #right both extend outside of the #main div since they're floating and nothing inside the #main div is clearing those floats.
The footer is then stacking vertically against the #main div which is not the same height as #left and #right.
One thing you can do to pull the main div down over the floated items is add something at the end of it to clear the floats. You can do this with CSS as follows:
#main:after{
content:".";
display:block;
clear:both;
visibility:hidden;
}
What you need to use is what's called a "clear fix". Things are overlapping because the browser doesn't know when to stop "floating" things, so to speak.
You can either:
a) Add after your main divs the following
<div style="clear: both;"> </div>
b) Add the clear: both style to your footer itself.
I have a problem with this page: http://www.liraprint.com/knigi
Books are not shown as they have to be - they are moved in the right. The problem is only in Firefox 4 & 5. In 3.6 it's ok as in all other browsers.
I think it's the .browse_product_image_body{ float:left; } that has something to do with this. Or maybe I'm missing something...Can you help me to fix this, please?
Here is a screenshot screenshot of the problem.
.browse_product_page{
width:547px;
}
.browse_product_header{
margin-top:0px;
}
.browse_product_title_background{
width:547px;
height: 40px;
background-image: url(images/product-title-background-tile.png);
margin-top: 0px;
border:1px solid #DBDBDB;
border-top-left-radius:3px;
-moz-border-top-left-radius:3px; /* Firefox 3.6 and earlier */
border-top-right-radius:3px;
-moz-border-top-right-radius:3px; /* Firefox 3.6 and earlier */
}
.browse_product_title{
font-size:24px;
padding:12px 0 0 4px;
float:left;
text-decoration:none;
}
.browse_product_name{
font-size:18px;
padding:12px 0 0 4px;
text-decoration:none;
}
.browse_product_author_body{
width:244px;
height:29px;
float:right;
margin:0 0px 10px 0;
background-image:url(images/author_background.png);
}
.browse_product_author{
font-size:13px;
padding:4px 0 0 0;
margin:0;
font-weight:bold;
}
.browse_product_body{
width:547px;
height:234px;
margin:-20px 0 10px 0;
border:1px solid #DBDBDB;
border-top:1px;
border-bottom-left-radius:3px;
-moz-border-bottom-left-radius:3px; /* Firefox 3.6 and earlier */
border-bottom-right-radius:3px;
-moz-border-bottom-right-radius:3px; /* Firefox 3.6 and earlier */ }
.browse_product_image_body{
float:left;
padding:0px 0px 0px 0px;
margin: 10px 10px 10px 10px;
}
.browse_product_image{
width:123px;
height:190px;
margin:0px 2px 2px 2px;
padding:2px;
}
.browse_product_description{
width:auto;
height:96px;
margin:0px 0px 0px 0;
padding:70px 10px 10px 10px;
text-align:justify;
}
.browse_product_price_body{
width:40px;
float:left;
padding: 0px 0 0 0px;
}
.browse_product_price{
font-size:14px;
text-align:left;
font-weight:bold;
}
.browse_product_price_value{
margin-top:-16px;
margin-left:46px;
margin-right:-75px;
}
.browse_product_read_more{
height:30px;
background-image:url(images/browse_read_more.gif);
background-repeat:no-repeat;
margin:0px 47px 0 404px;
padding:5px 0px 0 0;
}
.browse_product_read_more_link{
font-size:14px;
font-weight:bold;
text-decoration:none;
}
Finally, I found the problem. It seems that not only the image container .browse_product_image_body, but the inside div .browse_product_image has to be set to float:left, too.