CSS - <br> Stops My Style
Whenever I use <br> the above class style no longer applies to the following content. Can I use something else instead of line-break to jump a line?
Similar TutorialsI am just wondering if there is a way to simply extend a style rule from one previously defined. For instance, if I have this rule: Code: .textarea-box { color: #990000; background-color: #fff; width: 375px; height: 200px; border: #000 solid 1px; } ...if I want another text area rule to be the same except for one difference, the height should be 80px, do I have to write the rule out again with a new name, incorporating the new height, or is there some nifty way to just change the height in the new rule? Thanks for help with this. j9 After hours, upon hours of trying to figure out what I did wrong, I've given in and i need to ask for help. Problem: The left Side Nav section BG stops toward the bottom for no reason. I want the left side to continue to repeat like the right side as new content is added. Website: Http://www.ihorde.wowstead.com CSS Code: Code: body { background:#000000 url(http://ihorde.wowstead.com/files/bg.jpg) no-repeat center 0; color:#999999; font-size:12px; } #header { background:transparent url(http://ihorde.wowstead.com/files/header_tl.png) no-repeat scroll 0 0; border:0 solid #FFFFFF; clear:none; height:190px; margin:-15px 202px 0; position:relative; text-align:center; z-index:52; } #header .title_name { background-color:transparent; background-image:url(http://ihorde.wowstead.com/files/header_tr.png); background-position:right center; background-repeat:no-repeat; border:0 solid red; color:transparent; display:block; font-size:0; height:190px; left:auto; margin:0 0 0 auto; position:relative; top:0; width:100%; } #header .title_realm { display:none; } #contentarea { margin:0; } #content { background-color:transparent; border:0 solid #FFFFFF; left:-10px; margin:0 220px 3px 0; padding:0; position:relative; } div#pagenavbar { background:transparent url(http://images.wowstead.com/templates/nexus/wotlk/breadcrumb.png) repeat scroll 0 0; border:1px solid #253039; margin:0 230px 3px; padding:1px 20px; } #leftnav { background-color:transparent; background-image:url(http://ihorde.wowstead.com/files/sidepanel.png); background-repeat:repeat-y; border:0 solid #FFFFFF; display:block; float:left; height:1000px; left:0; margin-right:20px; position:relative; top:-175px; width:220px; z-index:50; } #rightnav { background-color:transparent; border:0 solid #FFFFFF; display:block; height:100%; margin-left:25px; position:absolute; right:0; top:-175px; width:220px; z-index:50; } #bg { background:transparent url(http://ihorde.wowstead.com/files/sidepanel.png) repeat-y scroll right center; min-height:1000px; } div.divheadline { background-color:transparent; background-image:url(http://ihorde.wowstead.com/files/headerdiv2.png); background-position:center center; background-repeat:no-repeat; border:0 solid #FFFFFF; color:#090909; font-family:Copperplate; font-size:16px; font-variant:small-caps; font-weight:bold; height:39px; margin-left:auto; margin-right:auto; width:180px; } div.divcontent { border:0 solid #FFFFFF; margin-left:auto; margin-right:auto; padding:4px; width:180px; } #netbar { background:transparent url(http://ihorde.wowstead.com/files/netbar.png) repeat scroll 0 0; border-bottom:0 none; height:37px; } .bordered .c { background:transparent url(http://ihorde.wowstead.com/files/content_bg.png) repeat scroll 0 0; padding:7px; } .bordered .tl { background:transparent url(vborder-tl.png) repeat scroll 0 0; } .bordered .tr { background:transparent url(http://ihorde.wowstead.com/files/border-tr.png) repeat scroll 0 0; } .bordered .bl { background:transparent url(http://ihorde.wowstead.com/files/border-bl.png) repeat scroll 0 0; } .bordered .br { background:transparent url(http://ihorde.wowstead.com/files/border-br.png) repeat scroll 0 0; } #footer { background:#000000 url(http://ihorde.wowstead.com/files/netbar2.png) repeat-x scroll 0 0; border-color:#FFFFFF #FFFFFF -moz-use-text-color; border-style:solid solid none; border-width:0; height:37px; margin:0; padding-top:15px; } Someone please help! I have a menu bar made up of <a href> elements that have a hover style of:
PHP Code: #mainMenu a:hover { color:#000000; background-color: #66c74c; padding: 1px 4px 1px 4px; margin: 1px 1px 1px 1px; } This will provide a green colored rollover visual as the user moves their mouse over the menu bar. I just added some JS today that will highlight the clicked (selected) menu so there is visual feedback of the section the user is in. For some reason, after setting the background color of the <a href> and color attributes, the HOVER: no longer functions. Here is the code to do the hilite where I pass the ID of the <a href> menu selection in the variable "menu": PHP Code: //--- Simplify setup by creating an array of the menus and hilight ID's --- var menus = ["menu1","menu2","menu3","menu4","menu5", "menu6","menu7","menu8","menu9","menu10"]; function J_hiliteMenu(menu) { //--- first make sure all the menu are hidden and unhilited --- for(i=0; i < menus.length; i++) { if (menus[i] == menu) theIndex = i; // Hold on to the chosen index position var obj = document.getElementById(menus[i]); if (obj == null) continue; // if menu is not available skip it obj.style.color = "#ffffff"; obj.style.backgroundColor = "#234fd7"; } //--- hilite the menu we're interested in --- var obj = document.getElementById(menu); obj.style.color = "#000000"; obj.style.backgroundColor = "#f8f400"; } Prior to hiliting the menu I un-hilite all the menus (since we may be switching from another). I think this is where the problem is. Maybe I need to redefine the rollover "hover" attribute for all elements during the un-hilite loop? Does anyone know how to set a HOVER: attribute using JavaScript? Thanks! hi there, i'm using code from http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/P10/ for my menubar, the problem is when i refresh the page the menubar is on it stops working. help please! Hi I'm putting a page together with a vertical tiling background. It's ok in Safari, but the tiling image seems to stop before the bottom of the page. It should be held by the #container div, but the developer toolbar shows this ending way before the end of the page - even though I have contained content still appearing down to the page edge. The site is at bringmyshuttle.com As far as I can see my code makes sense... Any ideas? Thanks I update the website of a local gaming center and I recently redesigned it. I am not a CSS expert and now that I have integrated it into to site, the background will not fill the screen on larger monitor sizes. When you scroll down to the bottom of the page it turns leaves a large white space at the bottom of the screen. There is also an odd white border around the site. The css can be found in the source code. The site is nextlevelchardon.com Real odd one here. Take a look at http://www.moxiegirlz.com/?section=moxiegirlz Note that you can click on one of the characters at the bottom to see their info. But when you do so, the characters no longer get the "hand" pointer icon (in FF and Safari, haven't tested IE). I've tried applying cursor:pointer directly to the a tags, though one shouldn't need to, and still nada. Somehow, calling a jscript in the href is killing the hand pointer. Anyone know why? I am sure there is an obvious explanation but why does using display:inline in this class definition stop the height/width working? Remove it and the dimensions are preserved. PHP Code: DIV.special_offer_middle { width: 100px; height: 20px; display: inline; border: 1px dashed white; } I did a web page for a company and it looks fine in ie7 where I tested it. The problem is when viewed in IE6 its like it ignores the sizes I put in. The box appears too big in IE6 and is the propr size in IE7. Is there any way to fix it so it would look the same in IE6 as IE7? Hello, In the css below, why I can't set it on the same time? Code: background: #FFF url(../images/main_bottom.gif) no-repeat bottom ; background: #FFF url(../images/main_top.gif) no-repeat top ; I was reading a tutorial were they always style both <tr> & <td> with the same thing... Is this needed? Or do you just need to style <tr>? Code: table.navigation tbody tr.odd { background: #252525; color: #fff; } table.navigation tbody tr.odd td { background: #252525; color: #fff; } How would you go about creating a navbar like the one Red cross uses on the left side for generic website mapping? Red Cross Example Is this pure css with dual images? Or is this done with some effect with other forms of CSS (or even DHTML?) on my site I have a list with the UL Class of threads. I am not good with CSS at all I have this Code: #threads { padding:0; margin:0; } #threads li { list-style:none; border-bottom:1px dotted #ccc; display:block; padding:2px 0px 2px 13px; background:url(images/sub.png) no-repeat 0 0px; } not doing what I want, my site is mypricesavings(dot)com you can see the list on the homepage under Recent Activity, I'd like to make it so that the avatars line up on top of each other and a line between each one like the featured section located on this site, however, without the scrolling. http://demo.colorlabsproject.com/?theme=arthemia-premium thank you for attempting Hi, just writing to get peoples oppinions. i have created a template for standardising the way my collegues at work layout their style sheets. any feedback will be welcome; PHP Code: /* ==== General Rules ==== */ body { } h1 { } h2 { } h3 { } h4 { } h5 { } h6 { } p { } a:link, a:visited { } a:hover { } img { } th { } td { } dt { } li { } /* ==== Layout Rules ==== */ #topBar { } /* ==== Specific Rules ==== */ #topBar h1 { } #topBar h2 { } #topBar h3 { } #topBar h4 { } #topBar h5 { } #topBar h6 { } #topBar p { } #topBar a:link, #topBar a:visited { } #topBar a:hover { } #topBar img { } #topBar th { } #topBar td { } #topBar dt { } #topBar li { } #leftBar { } /* ==== Specific Rules ==== */ #leftBar h1 { } #leftBar h2 { } #leftBar h3 { } #leftBar h4 { } #leftBar h5 { } #leftBar h6 { } #leftBar p { } #leftBar a:link, #leftBar a:visited { } #leftBar a:hover { } #leftBar img { } #leftBar th { } #leftBar td { } #leftBar dt { } #leftBar li { } #rightBar { } /* ==== Specific Rules ==== */ #rightBar h1 { } #rightBar h2 { } #rightBar h3 { } #rightBar h4 { } #rightBar h5 { } #rightBar h6 { } #rightBar p { } #rightBar a:link, #rightBar a:visited { } #rightBar a:hover { } #rightBar img { } #rightBar th { } #rightBar td { } #rightBar dt { } #rightBar li { } #mainContent { } /* ==== Specific Rules ==== */ #mainContent h1 { } #mainContent h2 { } #mainContent h3 { } #mainContent h4 { } #mainContent h5 { } #mainContent h6 { } #mainContent p { } #mainContent a:link, #mainContent a:visited { } #mainContent a:hover { } #mainContent img { } #mainContent th { } #mainContent td { } #mainContent dt { } #mainContent li { } #bottomBar { } /* ==== Specific Rules ==== */ #bottomBar h1 { } #bottomBar h2 { } #bottomBar h3 { } #bottomBar h4 { } #bottomBar h5 { } #bottomBar h6 { } #bottomBar p { } #bottomBar a:link, #bottomBar a:visited { } #bottomBar a:hover { } #bottomBar img { } #bottomBar th { } #bottomBar td { } #bottomBar dt { } #bottomBar li { } #vNav { } /* ==== Specific Rules ==== */ #vNav h1 { } #vNav h2 { } #vNav h3 { } #vNav h4 { } #vNav h5 { } #vNav h6 { } #vNav p { } #vNav a:link, #vNav a:visited { } #vNav a:hover { } #vNav img { } #vNav th { } #vNav td { } #vNav dt { } #vNav li { } #hNav { } /* ==== Specific Rules ==== */ #hNav h1 { } #hNav h2 { } #hNav h3 { } #hNav h4 { } #hNav h5 { } #hNav h6 { } #hNav p { } #hNav a:link, #hNav a:visited { } #hNav a:hover { } #hNav img { } #hNav th { } #hNav td { } #hNav dt { } #hNav li { } /* ==== Custom Rules ==== */ .imgLeft { margin: 2px; float: left; } .imgRight { margin: 2px; float: right; } Hi all, I was wondering if anyone could help me create a new bar similar to that on DeviantArt. I've had a shot at it, but mine shifts when you put the mouse over it and I don't know why. There seems to be enough room for it etc. Here's my homepage so you can see what I mean - http://www.ltheobald.co.uk Here's what I have so far... Code: HTML (cut down version - just one button): <table height="100%" width="100%" cellspacing="1" cellpadding="0"> <tr height="34px"> <td class="NavHolder"> <div class="NavButton" onmouseover="this.className = 'NavButtonOver';" onmouseout="this.className = 'NavButton';"> <table class="NavButtonTable"> <tr> <td class="NavButtonPic"> <a href="index.php"><img src="images/home.gif" alt="Home"></a> </td> <td class="NavButtonText"> <a href="index.php">Home</a> </td> </tr> </table> </div> </td> </tr> </table> CSS: .NavHolder { padding: 3px; background-color: #AACCFF; } .NavButton { float: left; } .NavButtonOver { float: left; background-color: #8CAAD4; border: 1px solid black; } .NavButtonTable { padding: 0px 5px; } .NavButtonPic { } .NavButtonText { vertical-align: middle; Font-Size: 11px; } No idea why NavButtonPic is there. I'll remove that later. Anyway, can anyone see from this why the buttons are shifting? Also if anyone can tell me how to get a rounded rectangle border like on DeviantArt (http://www.DeviantArt.com), I'd like to know. Thanks, Lee Hi, I'm new to CSS and am trying to design my blog template. For the styles, I have this so far: Code: <style type="text/css"> #navbar-iframe{display: none;height: 0;} body{background: #FFFFFF; font: 13px arial;color: #999;line-height: 150%;} .left { width: 460px; text-align:justify; } .right { width: 180px;font: bold 11px arial;color: #c8c8c8; } .navigations{ background: #6a6a6a; text-decoration: blur; padding-top: 1px; border-bottom: 3px solid #666 ;float: right; width: 190px; font: 28px arial; color: #aaa; line-height: 200%;text-transform: lowercase; letter-spacing: -2px; } .navigations :hover{ font: 28px arial; text-decoration: none; padding-top: 1 px; border-bottom: 3px solid #666; float: right; width: 190px; color: #F2EAEA; background: #777; line-height: 200%;text-transform: lowercase; letter-spacing: -2px; cursor: crosshair } .cloud { font: 26px georgia;letter-spacing: 1px;color: #BDA28F } .icon {border: 20px solid #eee; width:100px; height:100px;} .h1 { font: 20px times new roman;color: #FD0479; letter-spacing: 0px; line-height:18px;text-transform:uppercase} .h2 { font: 12px arial; color: #6a6a6a; letter-spacing: 1px; text-transform: lowercase;padding:4px;background: url((URL address blocked: See forum rules)); } .h3 { font: 12px arial; color: #6a6a6a; letter-spacing: 1px; font-weight:bold;padding:4px;} a:link,a:active,a:visited {font: 12px arial; color: #aaa; border-bottom: 1px solid #6a6a6a; text-decoration: none;text-transform: none;letter-spacing: 0px; } a:hover { color: #8BC4C4; border-bottom: 1px solid #e8e8e8;background: #f2f2f2; text-decoration: none; cursor: crosshair} b { color: #BE0304;font-weight:bold; } i { color: #FA727C; } s { color: #ddd; } em {font-family: georgia} blockquote{ color: #999; background: #f5f5f5;padding: 8px; } </style> But I can't seem to get the hover navigations to change background colour and text colour. What am I doing wrong? Thanks! heya! sorry if this is a real stupid quiestion/in the wrong area, im a bit new to css and this forum! Im wondering if there is any way to have a border only apply for part of a box... ie only the first/last 50% or 250px of the top and bottom borders. Hope this makes sence. Any help appriciated, even if it is to say it cant be done. hi, i have this style for a div hover effect, but how cani stop my other links having this efect? i want 2 different link styles. Code: <style type="text/css"> a:link { text-decoration:none; color:#000000; background:#B1DB9D; width: 200px; display:block; } a:active { text-decoration:none; color:#000000; background: #A2D389; width: 200px; display:block; } a:visited { text-decoration:none; color:#000000; background:#B1DB9D; width: 200px; display:block; } a:hover { text-decoration:none; color:#000000; width: 200px; background: #A2D389; display:block; } </style> Any ideas? I know how to use the class etc but i can't get he link part right. Thanks I need some help. I'm starting out with php and i'm already stressing out. Here's the challenge: I have to make a page that contains 3 radio buttons the radio buttons control which color font you'll like to display on that page the page must reference itself (no outside css stylesheet) I must use the switch function to switch the stylesheet. So far, this is what I have. Can someone help me figure out what I'm doing wrong? Thank you. Dan --------------clipping starts here--------------------- <html> <head> <title></title> <body style="font-family:Arial, Helvetica, sans-serif; color: green;"> </table> <tr> <td> <form name="stylecolor" method=POST" action asgn_2j.php"> Green <input type="radio" name="style" value="a"> Blue <input type="radio" name="style" value="b"> Red <input type="radio" name="style" value="c"> <INPUT TYPE=HIDDEN NAME=stylecolor VALUE=true> <INPUT TYPE=submit NAME="SUBMIT" VALUE="Submit"> $stylecolor=$HTTP_POST_VARS['stylecolor']; switch($stylecolor) { case 'a' echo '(<body style="font-family:Arial, Helvetica, sans-serif; color: green;">)' ; case 'b' echo '(<body style="font-family:Arial, Helvetica, sans-serif; color: blue;">)' ; case 'c' echo '(<body style="font-family:Arial, Helvetica, sans-serif; color: red;">)' ; default: echo 'you didn't choose' ; break; } </form> </td> </tr> </table> </body> </html> Hi guys, This has been driving me crazy for the past couple of hours which leads me to the conclusion that this is a bug. The code is self explanatory, any ideas why it will not work: <option value="images.php?vidno=1"><span style="color:#ff0000;">Title:</div>XYZ Thanks in advance, Rob. |