CSS - Nested Div On Bottom Of Parent
I think I'm having a CSS brain fart here. I'm trying to nest some divs, which is working, but the "helper" won't go where I need it to go. The "helper" is inside the "map" and needs to sit at the bottom of the "map" div because the regular content that appears in there (images) may not be the full height. Currently, the "helper" is sitting just below the image.
For example, MAP is 400px tall. HELPER is 98px tall. If there is a picture in MAP that is 213px tall, then there should be 89px between the bottom of the image and HELPER. Here is the code: PHP Code: #content { border:1px solid #000000; margin:0px auto; width:900px; height:402px; text-align:left; } #content #map { float:right; width:302px; height:400px; margin:2px 2px 2px 2px; display:inline; text-align:center; } #content #map #helper { top:300px; width:298px; height:98px; } I've tried position and bottom as well. Those items seem to ignore the dimensions of #map and throw the div at the bottom of the page instead of the bottom of #map. If there is a better way, let me know. Similar TutorialsThanks for taking the time to read my question. I've been searching the web on how to fix this but haven't got anything yet. In IE, my nested div (class="BioContent") stays within the parent container (id="BioBox"), but does not in FF. Right now I am using width: 100%; I've tried defining the width in pixels, but if I get it to work in FF, then it isn't wide enough in IE. Any ideas? Thanks for your help, Brad HTML: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- Created on: 7/21/2006 --> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <title></title> <link href="Junk.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="WP.js"></script> </head> <body> <div id="FaderBar"> <div id="FaderBarWP">Warren Persowich</div> <div><img id="FaderBarImg" src="images/audience.jpg" alt=""></div> <div id="FaderBarHC">Humor Consultant</div> </div> <!--<p/>--> <div id="MainBox"> <div id="LeftBox"> <div id="BioBox"> <div id="Bio0" class="BioContent" onMouseOver="if (isMouseLeaveOrEnter(event, this)) ShowMediumText(MediumText[0],0)"; onMouseOut="if (isMouseLeaveOrEnter(event, this)) ShowSmallText(SmallText[0],0)";>5 Star Rating on bit aired on CBC</div> <div id="Bio1" class="BioContent" onMouseOver="if (isMouseLeaveOrEnter(event, this)) ShowMediumText(MediumText[1],1)"; onMouseOut="if (isMouseLeaveOrEnter(event, this)) ShowSmallText(SmallText[1],1)";>Licenced Psychologist</div> <div id="Bio2" class="BioContent" onMouseOver="if (isMouseLeaveOrEnter(event, this)) ShowMediumText(MediumText[2],2)"; onMouseOut="if (isMouseLeaveOrEnter(event, this)) ShowSmallText(SmallText[2],2)";>National Television Debut - Fall of 2006</div> <div id="Bio3" class="BioContent" onMouseOver="if (isMouseLeaveOrEnter(event, this)) ShowMediumText(MediumText[3],3)"; onMouseOut="if (isMouseLeaveOrEnter(event, this)) ShowSmallText(SmallText[3],3)";>XM Satelite Bit</div> <div id="Bio4" class="BioContent" onMouseOver="if (isMouseLeaveOrEnter(event, this)) ShowMediumText(MediumText[4],4)"; onMouseOut="if (isMouseLeaveOrEnter(event, this)) ShowSmallText(SmallText[4],4)";>Instructor of Stand-Up Comedy</div> <div id="Bio5" class="BioContent" onMouseOver="if (isMouseLeaveOrEnter(event, this)) ShowMediumText(MediumText[5],5)"; onMouseOut="if (isMouseLeaveOrEnter(event, this)) ShowSmallText(SmallText[5],5)";>Manitoba Theatre For Young People</div> <div id="Bio6" class="BioContent" onMouseOver="if (isMouseLeaveOrEnter(event, this)) ShowMediumText(MediumText[6],6)"; onMouseOut="if (isMouseLeaveOrEnter(event, this)) ShowSmallText(SmallText[6],6)";>Cancer Survivor</div> </div> <div id="BioFooter">Move cursor over text to read on...</div> <div id="Broadcast"> <!-- begin embedded WindowsMedia file...--> <OBJECT id='mediaPlayer' width="320" height="285" classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'> <param name='fileName' value="http://servername/path/to/media.file"> <param name='animationatStart' value='true'> <param name='transparentatStart' value='true'> <param name='autoStart' value="true"> <param name='showControls' value="true"> <param name='loop' value="true"> <EMBED type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols="true" showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285" src="http://servername/path/to/media.file" autostart="true" designtimesp='5311' loop="true"> </EMBED> </OBJECT> <!--<a href="http://servername/path/to/media.file" style='font-size: 85%;' target='_blank'>Launch in external player</a>--> </div> </div> <div id="CenterBox"><img class="HeadShot" src="ColourTest1.JPG" width="122" height="212" alt=""/></div> <div id="RightBox"><ul> <li class="LB1TOP"><a href="#">Seminars</a></li> <li class="LB2"><a href="#">Stand-Up</a></li> <li class="LB3"><a href="#">Intro Psych</a></li> <li class="LB4"><a href="#">Selected Transcripts</a></li> <li class="LB3"><a href="#">Broadcast Archives</a></li> <li class="LB2"><a href="#">Links</a></li> <li class="LB1"><a href="#">Pricing & Inquiries</a></li> <!--<li class="LB4"><a href="#">Link #8</a></li> <li class="LB3"><a href="#">Link #9</a></li> <li class="LB2"><a href="#">Link #10</a></li> <li class="LB1"><a href="#">Link #11</a></li>--> </ul></div> </div> <div id="Signature"><a class="Sig" href="#">Manic Web Designs</a></div> </body> </html> CSS: Code: body { /*background: #E2E2E2;*/ background: #000000; margin-top: 5px; } #MainBox { /*background-color: #ECF9FF;*/ background-color: #8C8C8C; margin: 0 auto; width: 780px; /*height: 500px;*/ /*border-color: #004A94; border-width: 2px; border-style: solid;*/ overflow: hidden; } #FaderBar { /*background-color: #ECF9FF;*/ background-color: #8C8C8C; margin: 0 auto; height: 80px; width: 780px; border: 5px double #ffffff; /*background-image:url('HeaderImg.png');*/ } #FaderBarWP { float: left; height: 40px; width: 300px; margin-left: 15px; margin-top: 5px; font-size: 40px; /*background-color: red;*/ } #FaderBarHC { float: left; height: 55px; width: 430px; font-size: 25px; margin-left: 45px; /*background-color: aqua;*/ } #FaderBarImg { float:right; height: 105px; width: 199px; } #LeftBox { width: 340px; /*height: 500px;*/ float: left; /*background-color: aqua;*/ } #CenterBox { width: 220px; /*height: 500px;*/ float: left; /*background-color: red;*/ } #RightBox { width: 220px; /*height: 500px;*/ float: left; /*background-color: yellow;*/ } #BioBox { width: 295px; height: 250px; background-color: #F2F2F2; padding-top: 5px; border-color: #dcdcdc; border-style: solid; border-width: 2px; float: right; margin: 5px 10px 0px 0px; } .BioContent { width: 100%; float: left; font-size: 11px; margin-bottom: 5px; border-top: 1px dashed #dcdcdc; border-bottom: 1px dashed #dcdcdc; padding: 5px; } #BioFooter { float: right; width: 100%; text-align: right; font-size: 12px; color: gray; margin-bottom: 15px; } #Broadcast { height: 300px; width: 330px; float: right; padding: 0px 0px 0px 0px; } ul li { float: right; height: 20px; margin-bottom: 25px; border-color: #dcdcdc; border-width: 2px; border-style: solid; text-align: center; width: 150px; background-color: #F2F2F2; list-style-type: none; } .LB1TOP { margin-right: 30px; margin-top: 35px; } .LB1 { margin-right: 30px; } .LB2 { margin-right: 25px; } .LB3 { margin-right: 20px; } .LB4 { margin-right: 15px; } .LB5 { margin-right: 10px; } .LB6 { margin-right: 5px; } ul li a { display: block; } ul li a:link { text-decoration: none; color: black; } ul li a:visited { text-decoration: none; color: black; } ul li a:hover { background-color: #737373; color: white; font-weight: bold; } ul li a:active { text-decoration: none; } img.HeadShot { margin: 125px 0px 0px 50px; } #Signature { background-color: #E2E2E2; margin: 0 auto; width: 780px; padding-top: 10px; /*height: 500px;*/ /*border-color: #004A94; border-width: 2px; border-style: solid;*/ overflow: hidden; text-align: right; } a.ReadOn:link { text-decoration: none; color: black; } a.ReadOn:visited { text-decoration: none; color: black; } a.ReadOn:hover { text-decoration: none; color: black; } a.ReadOn:active { text-decoration: underline; color: black; } .Sig { color: #808080; font-size: 10px; } a.Sig:link { text-decoration: none; } a.Sig:visited { text-decoration: none; } a.Sig:hover { text-decoration: overline underline; } a.Sig:active { text-decoration: none; } Hey guys, I am working on www. paulfenton .tk/wordpress: The side margins of this site are filled with background gradients. (they take up the left and right halfs of the site, with the main content drawn over the middle). The problem is, the div "bottomLeftGradient" is the width of the whole screen. I know this might be because I am using position:absolute, but that seems to be the only way I can make bottom:0px; take effect and cause this to sit on the bottom of the div rather than the top. It seems that if I use width:50%; that it works, but I did not have to do that for bottomRightGradient so something must be messed up here. Thanks for the help, -Paul hi, i have the following css Code: #content { width:1000px; text-align:center; height:100%; border:2px #000 solid; } #mainbody { width:1000px; height:100%; display:run-in; border:#03F 1px solid; } and my xhtml looks like Code: <div id="content"> <div id="mainbody"> </div> </div> basically what i want to do is to have full available page height covered by content div so that i can stick a footer div at the end of it. so that regardless of the height of the contents covering the mainbody-div my footer always sticks to the bottom of the page. now even before i add footer, the problem is that mainbody is going 50px outside the content div at the bottom making the page to scroll. should it not take the available height within the content-div because it is nested within content div? thanks I had such good help with my last problem, I thought I'd come back for more. I'm trying to set up my pages to allow a nested div to expand the page vertically based on quantity of content. In other words, if a page requires a lot of content, I want it to automatically push the page down. As it is, the nested div is overlapping the parent. I've tried numerous tips from tutorials, but nothing doing. This article is the one that made the most sense to me but I couldn't achieve the desired effect. Here's the necessary info: HTML (Contact Page) : Code: <body class="contact"> <div id="Main_Container"> <div> <div id="Header-img"></div> <ul id="nav"> <li class="home-list"><a href="/index.php">Home</a></li> <li class="classes-list"><a href="../classes/">Pilates</a> <ul id="classes-sub"> <li><a href="../classes/pilates.php">Sign Up</a></li> <li><a href="../classes/dance.php">Schedule</a></li> <li><a href="../classes/gyrokinesis.php">Education</a></li> </ul> </li> <li class="schedule-list"><a href="../schedule/">Dance</a> <ul id="schedule-sub"> <li><a href="../schedule/class-schedule.php">Opportunities</a></li> <li><a href="../schedule/enroll-private.php">Contact about </a></li> <li><a href="../schedule/enroll-group.php">Enroll - Group</a></li> </ul> </li> <li class="education-list"><a href="../education/">Gyrokinesis</a> <ul id="education-sub"> <li><a href="../education/pilates/php/">What is it?</a></li> <li><a href="../education/dance.php">Dance</a></li> <li><a href="../education/gyrokinesis.php">Gyrokinesis</a></li> </ul> </li> <li class="about-list"><a href="../about/">About</a> <ul id="about-sub"> <li><a href="../about/philosophy.php">Philosophy</a></li> <li><a href="../about/cheryl-lemmer.php">Cheryl Lemmer</a></li> <li><a href="../about/in-the-news.php.php">In the News</a></li> </ul> </li> <li class="contact-list"><a href="../contact/">Contact</a></li> </ul> </div> <div id="home-container"> <div class="content-nav">heading <div class="content-nav-head"></div> </div> <div class="content-wrap"> </div> </div> </div> </body> </html> Relevant CSS : Code: html, body, form, fieldset { height:100%; margin: 0; padding: 0;} #Main_Container { position:relative; margin:auto; width:751px; min-height:100%; height:auto; !important; height:700px; background-color:#fff; border:solid 1px #cccccc; } #Header-img { margin:auto; width:751px; height:151px; background:url(../images/header.gif) no-repeat; background-color:#fff; } .content-wrap { position:relative; float:right; width:520px; height:600px; border:solid 1px #000; } .content-nav { float:left; position:relative; width:190px; } Hey, I have parent table, with several nested tables within. I'm changing the CSS values on-the-fly using Javascript so I'm using id's instead of classes. The CSS of all the tables is generated using this code: Code: /* mp_tip_CSS_x_TABLE CSS */ <? for ($i=1; $i<=12; $i++) { ?> #mp_tip_CSS_<? echo($i); ?>_table { border-color: <? echo($mp_tip_CSS_table_border_color[$i]); ?>; border-style: <? echo($mp_tip_CSS_table_border_style[$i]); ?>; border-width: <? echo($mp_tip_CSS_table_border_width[$i]."px"); ?>; border-collapse: collapse; } #mp_tip_CSS_<? echo($i); ?>_table td { border-color: <? echo($mp_tip_CSS_table_border_color[$i]); ?>; border-style: <? echo($mp_tip_CSS_table_border_style[$i]); ?>; border-width: <? echo($mp_tip_CSS_table_border_width[$i]."px"); ?>; border-collapse: collapse; } <? } ?> /* mp_tip_CSS_x_TABLE CSS END */ The parent table is mp_tip_CSS_1_table and the nested tables are mp_tip_CSS_2_table to mp_tip_CSS_12_table. The problem I'm getting is the nested tables seem to inherit the td border values of the parent table, so they have two borders instead of just the single one (the parent border and their own border). Is there any way to make the parent border td value only be applied to the immediate td's of the parent table, and not the td's of the nested tables as well? After browsing some web pages I came across using: Code: #classname >tr >td {} But that doesn't seem to work... Thanks for any help, -Ross I have elements in a certain class and they may have child elements. I want to position the child so that it's TOP is at the bottom of the parent. Right now its top is at a fixed place relative to the parent. The parent is variable height. So in my css I have ul.parent ul { top: <bottom of parent> } How do I refre to it? Hi I found it: ********************** Code: #tableLeftCol ul.menu li#current a { background-image: url('../images/menu-active-rect.gif'); background-position: right top; background-repeat: repeat-y; } #tableLeftCol ul.menu li#current ul li a { background-image: none; } *************************** I have a nested list representing a menu. I want the active menuitems (listitem) link to have a background image. When active menuitem is a parent then all the childs also get the background image...... How to I change the CSS so only active menuitems link get the background image set, and not the child links of the parent? If possible, I want to make it work without changing any in the HTML! Here is current CSS and list structu Code: #tableLeftCol ul.menu li#current a { background-image: url('../images/menu-active-rect.gif'); background-position: right top; background-repeat: repeat-y; } #tableLeftCol ul.menu li ul li#current a { background-image: url('../images/menu-active-rect.gif'); background-position: right top; background-repeat: repeat-y; } Code: <div id="tableLeftColPadding"> <ul class="menu"> <li id="current" class="parent active item54"> <a href="/index.php?option=com_content&view=article&id=48&Itemid=54"> <span>Parent</span> </a> <ul> <li class="item57"> <a href="/index.php?option=com_content&view=article&id=50&Itemid=57"> <span>Child-A</span> </a> </li> <li class="item81"> <a href="/index.php?option=com_content&view=article&id=71&Itemid=81"> <span>Child-B</span> </a> </li> <li class="item59"> <a href="/index.php?option=com_content&view=article&id=52&Itemid=59"> <span>Child-C</span> </a> </li> </ul> </li> </ul> </div> Hi I have a vertical menu containing main and subcategories. subcats are hidden, when a main cat is clicked then subcats are displayed, all is done with css no javascript. here is the structure, Code: <ul id="nav"> <li class="level item-1 nav-clothes active parent"> <a href="/clothes.html"><span>Clothes</span></a> <ol class="level item-1"> <li class="level1 nav-clothes-shirts"> <a href="/clothes/shirts.html"><span>Shirts</span></a> </li> <li class="level1 nav-clothes-tanks"> <a href="/clothes/tanks.html"><span>Tanks</span></a> </li> <li class="level1 nav-clothes-raincoats"> <a href="/clothes/raincoats.html"><span>Raincoats</span></a> </li> <li class="level1 nav-clothes-dresses"> <a href="/clothes/dresses.html"><span>Dresses</span></a> </li> <li class="level1 nav-clothes-swimsuits"> <a href="/clothes/swimsuits.html"><span>Swimsuits</span></a> </li> <li class="level1 nav-clothes-outerwear last"> <a href="/outerwear.html"><span>Outerwear</span></a> </li> </ol></li> <li class="level item-2 nav-beds parent"> <a href="/beds.html"><span>Beds</span></a> here is my all related css, external css file, Code: #nav { font-size:13.5px; color:#000; padding:0 0 0 0; margin:-20px 0 0 0; width:100%;} /* All Levels */ #nav li { text-align:left; } #nav li.over { z-index:999; } #nav a, #nav a:hover { display:block; line-height:1.3em; text-decoration:none; } #nav span { display:block; cursor:pointer; white-space:nowrap; } #nav li ul span {white-space:normal; } #nav li li.parent {} /* 0 Level */ #nav li { clear:both; position:relative; display:block; } #nav li.active a { color:#000; text-decoration:underline; } #nav a { float:left; padding:2px 14px 11px 0px; color:#000; font-weight:bold; } #nav li.over a, #nav a:hover { color:#000; text-decoration:underline; } #nav .item-1 ul a { background:url(../images/arr_sub_menu.gif) 0 9px no-repeat; padding:0 0 0 0; color:#1A1616;} #nav .item-2 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-3 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-4 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-5 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-6 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-7 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-8 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-9 ul a {padding:0 0 0 0; color:#1A1616;} #nav ul li a { padding:0 0 0 0;} #nav ul li a:hover { padding:0 0 0 0; text-decoration:none;} /* 1st Level */ #nav ul li, #nav ul li.active { float:none; margin:0; padding:6px 0 0 29px; background:#FFFFFF; border-left:1px solid #E8E7E7; border-right:1px solid #E8E7E7; } #nav ul li.over {} #nav ul li.last { background:#FFFFFF; padding-bottom:15px; } #nav ul a, #nav ul a:hover { float:none; padding:0;} #nav ul li a { font-weight:normal !important; } /* 2nd level */ #nav ul { position:absolute; width:199px; top:23px; left:-10000px; background:url(../images/bg_sub_menu.gif) 0 0 no-repeat; padding:23px 0 0 0; border-bottom:1px solid #E8E7E7; margin-left:100px; } /* 3rd+ Level */ #nav ul ul { top:5px; background:none; padding-top:0; border-top:1px solid #E8E7E7; } /* Show Menu */ #nav li.over > ul { left:0; } #nav li.over > ul li.over > ul { left:100px; } #nav li.over ul ul { left:-10000px; } #nav ul li a { background:url(../images/arr_sub_menu.gif) 0 9px no-repeat; padding:0 0 0 0; color:#1A1616; } #nav ul li a:hover { color:#1A1616 !important; } #nav ul span, #nav ul li.last li span { padding:3px 15px 4px 15px; } #nav li ul { display:none; } #nav li:hover ul{display: block; } #nav ol { margin-left:5px; margin-bottom:10px; } #nav ol li { padding-left:15px; background-image:url(../images/ol_bg_lines.gif); font-size:12px; font-weight:normal; } #nav ol li.last { background-image:url(../images/ol_bg_lines_last.gif); } inline css code to overwrite the default behavior for target page Code: ul#nav {margin : 0 10px; margin-bottom:0px;} ul#nav li {height : 14px; margin-top : 5px;} ul#nav li a, ul#nav li a:hover {} ul#nav ul {margin-top : -8px; background : url(/images/drop-ul-bgr.gif) no-repeat; } ul#nav ul li {height : auto; margin-top : auto;} ul#nav ol li a { padding:0px; } ul#nav ol li { margin:0px; padding:5px 0 5px 15px; } ul#nav ol { border:#ccc 1px solid; padding-bottom:30px; } I am attaching a screenshot to explain the problem, i have given border to the OL to explain the problem. In the screenshot the pink arrow is pointing the place, BEFORE BEDS, where i want to give more space but the child list keeps overlapping rather than pushing the parent list downwards. any help is much appreciated I am really stuck with this. this is bugging the hell out of me, cant find a working answer anywhere (i've tried a bunch of things) So I have 3 images for the top of my page and 3 images for the bottom. The page is enclosed in a div frame titled "frame" each of the 3 columns is enclosed in a frame "leftframe" "centerframe" and "rightframe" Each of the 3 columns has a top which is a fixed size image at the top, a middle which is just empty space for content to go, and a bottom which is a fixed size image at the bottom. Problem: I can't get any of the 3 column's bottoms to stick to the bottom of "frame" I've tried some code in here to do it and it doesn't work.. any help here? thanks! Code: <style type="text/css"> body { text-align:center; height:100%; min-height:100%; padding:0px; } #frame { width:800px; height:100%; min-height:100%; margin-right:auto; margin-left:auto; margin-top:0px; padding:0px; text-align:left; position:relative; } #contentlefttop { width:155px; height:282px; padding:0px; float:left; background-image: url(images/layout_01.gif); background-repeat:no-repeat; } #leftframe { float:left; width:155px; position:relative; height:100%; min-height:100%; } #contentleft { clear:left; float:left; padding:0px; width:155px; padding-bottom:270px; } #contentleftbottom{ width:155px; height:270px; /*clear:left; float:left;*/ padding:0px; position:absolute; bottom:0; background-image: url(images/layout_07.gif); background-repeat:no-repeat; } #contentcenter { width:486px; padding:0px; clear:left; float:left; text-align:center; min-height:100%; height:100%; padding-bottom:53px; } #rightframe { float:left; position:relative; height:100%; min-height:100%; width:159px; } #centerframe { float:left; position:relative; height:100%; width:486px; } #contentrighttop { width:159px; height:282px; padding:0px; clear:left; float:left; background-image:url(images/layout_03.gif); background-repeat:no-repeat; background-position:top; } #contentright { clear:left; float:left; width:159px; padding:0px; height:100%; padding-bottom:270px; } #contentrightbottom{ width:159px; height:270px; /*clear:left; float:left;*/ position:absolute; bottom:0; padding:0px; background-image: url(images/layout_08.gif); background-repeat:no-repeat; background-position:bottom; } #contentheader { width:486px; height:135px; float:left; background-image: url(images/layout_02.gif); background-repeat:no-repeat; } #contentfooter { /*clear:left; float:left;*/ width:486px; height:53px; background-image: url(images/layout_09.gif); background-repeat:no-repeat; position:absolute; bottom:0; } #sitemessage { margin-left:17px; margin-right:31px; height:90px; text-align:center; font-size:12px; } #wisemanquote { margin-left:22px; margin-right:24px; height:85px; text-align:center; font-size:12px; } p,h1,pre { margin:0px 10px 10px 10px; } h1 { font-size:14px; padding-top:10px; } #contentheader h1 { font-size:14px; padding:10px; margin:0px; } #contentright p { font-size:10px} </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body bgcolor="#FFFFFF"> <div id="frame"> <div id="leftframe"> <div id="contentlefttop"> <div id="sitemessage"></div> </div> <div id="contentleft">Left</div> <div id="contentleftbottom"></div> </div> <div id="centerframe"> <div id="contentheader"></div> <div id="contentcenter"> <p>Center</p> </div> <div id="contentfooter"></div> </div> <div id="rightframe"> <div id="contentrighttop"> <div id="wisemanquote"></div> </div> <div id="contentright">Right</div> <div id="contentrightbottom"></div> </div> </div> I'm using a web application for an online survey system. The pages rendered are XHTML transitional ("<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">")... but it doesn't validate (a big problem, I know). It looks like this initially... ...and I'm trying to indent the entire element below the header text like so... ...but the problem is that it applies the change not only the parent TABLE/DIV combo, but then the children as well (which is why the radio buttons ended up being shifted over too I believe). I can't change any of the code of the application, but the application references an external CSS file that I can edit only (so I can't change the fact that there aren't many/any classes assigned to the elements to use directly... but I can modify this one file and have the changes applied). What I've tried thus far is to use either of the following... Code: TABLE DIV {position: relative; left: 25px;} TABLE DIV {padding-left: 25px;} I found the tree using Firebug for Firefox. Is there a way to make the CSS code be applied to only the first/parent TABLE/DIV combo and not it's children? Maybe I could start with BODY TABLE DIV or something? I would really appreciate any assistance possible. I am confused by the "rules" of how to indicate what you are trying to style when an element is within other elements. Specifically in this case (but hopefully this lesson will be portable to other contexts). I have a UL with an LI (classed) that is within an id'd UL that is within an id'd DIV. Code: <div id="horzmenu"> <ul id="horznavmenu"> <li><a href='rooms.php'>Accomodations</a></li> <li class='hot'>Location & Info <ul> <li><a href='/otherprops.php'>Other Properties</a></li> <li><a href='/news.php'>News & Photos</a></li> </ul> </li> <li><a href='booking.php'>Booking</a></li> </ul> </div> So if I were to wish to style this new UL and its LI's do I refer to: The parent UL as in: #horznavmenu ul ul { The parent UL and the class'd LI as in: #horznavmenu ul ul li.class{ Or? Thanks in advance for any feedback or suggested reading... Please look at this page http://osake.garychus.com/menu2.asp I am trying to wrap a div (red border) around each category on this restaurant menu. For some reason the code looks right but the red border does not enclose the entire category section(s). I validated the html but think the issue is css related. Any help is appreciated. Please look at this page - http://hometown.tmhdesign.com/ask.asp?faq=9 See how the <p> exceeds the containing box at the bottom? I put a border-bottom on the containing div to show you where the issue occurs. It does not happen in IE7 I just noticed it does it also on this page http://hometown.tmhdesign.com/staff.asp Hey AHH I know that there is a lot of code to look at but I'm only working on the middle box with the cross. All I am wanting to figure out right now is how to get the parent div.icross to show all it's background in FF. It shows and looks how I want it to look in IE, so you can use that as reference. You guys are always so much help and I REALLY appercaite it. Thanks so much to whoever helps me. - Jacenta Here is the page: tri-m.com/index_newlayout.html Here is the css that only corresponds to the middle to make things easier for you to see: Code: div.icross /* index cross */ { background:url(trim_images/layout/cross_background.gif); background-color:#FFFFFF; background-repeat:no-repeat; background-position:top; width:540px; height:1%; } div.ilogo /* logo in cross, top left box */ { width:192px; height:57px; margin-right:1px; margin-bottom:2px; float:left; text-align:right; padding:0; } div.ind /* name/description in cross, top right box */ { width:346px; height:57px; margin-left:1px; margin-bottom:2px; float:right; text-align:right; padding:0; } div.iimage /* image in cross, bottom left box */ { width:192px; float:left; margin-right:1px; margin-top:1px; height:1%; } div.iinfo /* info in cross, bottom right box */ { width:346px; float:right; margin-left:1px; margin-top:1px; text-align:left; height:1%; } .trimdescription { color:#1b4da6; font-family:Arial; font-size:12px; text-align:left; font-weight:normal; width:540px; } .pname /* product name */ { color:#063891; font-family:Arial; font-size:28px; padding:0; } .pdescription /* product description */ { color:#f47720; font-family:Arial; font-size:12px; font-style:italic; text-align:right; padding:0; margin-left:15px; } div.clear /* clear div/container */ { clear:both; } div.fptitle /* featured products title/banner */ { width:540px; height:19px; padding:0; margin:0; } div.fproducts /* featured products small images */ { background-color:#e8e8e8; width:540px; height:76px; padding:0; margin:0; } http://weightlossforever.ca/ Works fine in everything but ie7 the leaves appear in front of their parent, they should be behind it. Thoughts? Is there a way to get the style sheet to let the inner tag to override the parent's tag? Seem that only one webpage need that while many other doesn't. I'll post the code below, take a look at the text-align:left ...... Code: <div style="margin:0px;padding:25px 30px;text-align:left;"> <img style="text-align:center;" src="..."> </div> Is there a way to get the style sheet to let the inner tag to override the parent's tag? Seem that only one webpage need that while many other doesn't. I'll post the code below, take a look at the text-align:left ...... Code: <div style="margin:0px;padding:25px 30px;text-align:left;"> <img style="text-align:center;" src="..."> </div> Hi everyone. I've come pretty close to solving this problem but certain problems keep showing themselves. Here's the mockup menu I'm trying to recreate. Current CSS: Code: .interior #sidebar ul{ padding:20px 0 5px 0px; list-style:none; } .interior #sidebar ul.outerUL {border-bottom:1px solid white;} .interior #sidebar ul.middleUL{border-top:1px solid white; margin:0; padding:5px 0 0 0;} .interior #sidebar ul.innerUL{padding:5px 0;} .interior #sidebar ul li a {padding:5px 0 5px 0; margin:0;} .interior #sidebar ul li.outerLI a{ border-top:1px solid white; padding:0 0 0 20px; color:#003371; width:100%; } .interior #sidebar ul li.middleLI a{ padding-left:25px; color:#3f699d; } .interior #sidebar ul li.innerLI a{ padding:2px 0 2px 30px; color:#0f8b53; } .interior #sidebar a {text-decoration:none;} Current HTML: Code: <div id="sidebar"> <ul class="outerUL"> <li class="outerLI"><a href="#">Our Misssion</a></li> <ul class="middleUL"> <li class="middleLI"><a href="#">Quality</a></li> <ul class="innerUL"> <li class="innerLI"><a href="#">Dedication</a></li> <li class="innerLI"><a href="#">Perseverance</a></li> </ul> <li class="middleLI"><a href="#">Choice</a></li> <li class="middleLI"><a href="#">Value</a></li> </ul> <li class="outerLI"><a href="#">Parkland Timeline</a></li> <li class="outerLI"><a href="#">Management Bios</a></li> </ul> </div> I've tried multiple different ways of acheiving the desired look, but each one has a certain problem with it. This is the best I can get while still keeping each link the correct color and font size. I'd be all set (I can deal with the padding later) if I could get the white bar above each of the top-level links to extend across the whole sidebar div. well if i dont put any css firefox does this with nested link: Code: link1 link2 sublink1 IE doesnt indent the sublink. so is there any hack available? PS>i tried using margin-left but by doing that firefox indents it even further so it looks bad? cheers |