CSS - A Href Link - Without Leaving Page
Hi there,
I want to create a hyperlink to an external page from my web site. Is it possible to show that external content on my page without using frame set. From the attachment, link 1 & link 2 are external links inside a div. I want to show it on the second div on the bottom. Thanks. Similar TutorialsHello! could someone take a look at my site and tell me why the links inside my content are whacked out? when you click on them they jump around... i have been trying for two days to figure out which other style i am using is interfering, but i cant find that little sucker...and i have deconstructed it several times... i think i am just too close to the code and need another pair of eyes. here a link to a page with the problems...its the sample menu links in the center of the page green-bistro dot com on the menus page oh, and another strange thing, like on this page, if i link to a page with .php in the extention, the link wierds out, but the mailto link works fine... green-bistro dot com on the eco events page thanks in advance for anyone who can help!!! Hello there, im new to the forums. decided to register because im having a bit of a problem with CSS/HTML.(pretty inexperienced with css). Heres what i wanna do: I have a social website where users can register and comment on things etc. I want to show a drop down menu as soon as users hover their mouse over a user name. So i took this script: http://javascript-array.com/scripts...drop_down_menu/ And modified it. But i cant figure out how to make it work if the user name is surrounded with other text, it automatically creates a new line. Heres my code: Code: <html> <head> <style> <!-- #sddm a { display: block; } #sddm span { position: absolute; visibility: hidden; margin: 0; padding: 0; background: #3D97D6; border: 1px solid #5970B2} #sddm span a { position: relative; display: block; margin: 0; padding: 5px 10px; width: auto; white-space: nowrap; text-align: left; text-decoration: none; background: #3D97D6; color: #FFF; font: 11px arial} #sddm span a:hover { background: #2875DE; color: #FFF} --> </style> <script type="text/javascript"> // Copyright 2006-2007 javascript-array.com var timeout = 500; var closetimer = 0; var ddmenuitem = 0; // open hidden layer function mopen(id) { // cancel close timer mcancelclosetime(); // close old layer if(ddmenuitem) ddmenuitem.style.visibility = 'hidden'; // get new layer and show it ddmenuitem = document.getElementById(id); ddmenuitem.style.visibility = 'visible'; } // close showed layer function mclose() { if(ddmenuitem) ddmenuitem.style.visibility = 'hidden'; } // go close timer function mclosetime() { closetimer = window.setTimeout(mclose, timeout); } // cancel close timer function mcancelclosetime() { if(closetimer) { window.clearTimeout(closetimer); closetimer = null; } } // close layer when click-out document.onclick = mclose; </script> </head> <body> <span id="sddm"> <a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">This is a username</a> <span id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()"> <img src="linktoav" alt="avatar" /> <font color="#ffffff"><b>Koen</b></font></a> <a href="#">Add as Friend</a> <a href="#">Send message</a> <a href="#">View Profile</a> <a href="#">Report</a> </span> </span> this text comes after the username </body> </html> So i hope its clear what i wanna do, i always find it hard to explain things Hi, I have a link in my page. When the user hovers over the link, the page is flickering. This is the code I have used Code: a { color: #42C0FB; background: inherit; font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; line-height: 1.8em; } a:hover { color: #6C757A; background: inherit; font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; } <a href="WelcomePage.asp?UserName=User_nm" id="Welcome" title="Home Page" target="_blank">Welcome to my Page</a> I am checking in IE 6 and IE 7. How to avoid the flickering, when user hovers over the link. Thank you Alrite, I am trying to use a CSS to change the hover, visited, active, elements on a link. This works, however it does not seem to work when I use "#" links. I am tryin to use a dud link so that JavaScript can open another window. Any ideas??? Thanks This is how I created layout of my website: div.HEADER >div.logo >div.members >div.mainmenu div.CONTENT ........... After div.logo floats left, div.members floats right, and div.mainmenu just under. For some reason, there appears one empty line above div.main menu HEADER AREA: Code: #header, #logo, #members, #mainmenu { margin:auto; text-align:left; float:left; } #logo { width:500px; } #members { width:300px; } #members ul{ float:left; list-style-type:none; } #members li a{ display:block; font-weight:normal; text-decoration:none; } #mainmenu { width:800px; text-align:center; height:25px; background:#6078BF; border-bottom:1px solid #E6ECFF; font-size:14px; } #mainmenu ul { list-style:none; } #mainmenu ul li{ display: inline; margin:0; padding:0; } #mainmenu ul li a{ display:block; float:left; width:95px; height:25px; line-height:25px; overflow:hidden; color:#E6ECFF; font-weight:bold; text-decoration:none; background:#6078BF url(images/mmenu_line.gif) right no-repeat; } #mainmenu ul li a:hover { background:#809FFF right no-repeat; } Hello all, Is it ok to add the following on the same htm page??? The reason I think, and corrcet me if i am wrong, is that Netscape wants the IMPORT one as opposed to IE wanting the LINK one. Code: <link href="scripts/CoffsCoast.css" rel="stylesheet" type="text/css" /> <style type="text/css">@import url("scripts/CoffsCoast.css");</style> I'm making a page and I've got an a:link specification. I want a separate specification for a part of the page under a .header tag. The background on that part of the page doesn't match the a:link color I have specified for the rest of the page. So I want one specifically for the .header tag. Doesn't seem to be working though. How do you think I should throw it in there? Hi All, I would like to figure out a way to have my menu item font stay a different color if the user is on that page. I thought that the a:active would do the trick, but apparently a link is only active immediately after clicked and does not carry over to the page that was linked. I am trying to stay away from images and javascript because I can't get them to look right against my background, so I was wondering if there was a css way to create this effect without changing every page. I have a header file that contains this menu because I will be updating it frequently with new links and pages and would rather only change it once... thanks! Hi all, I am making a test page for a client. It's a VERY simple site (he's a simple guy ), but I am having a little trouble with something that's probably pretty easy. For some reason, though I just can't get it to cooperate. The site is at www.bartlett-family.net/test On the footer, you'll notice that it also has a few links and those links have the SAME properties (through the CSS) as the other page links on the left and right. I don't want that. I want the links in the footer to be WHITE at all times, whether clicked, hovered over, etc. How can I do this? Thanks! Chris Thanks for taking the time to read my question. Is is possible to have different link attributes on different sections of a page? For example: I'd like to have all links on the menu section be white font, visited be black font, hover to be green font and active to be yellow font On the rest of the page, I'd like all links to be green font, visited to be blue font, hover to be yellow font, and active to be whtie font. here is my css: Code: @charset "iso-8859-1"; body { text-align:center; margin-top: 10px; background-color: green; /*background-color: #d8d8d8;*/ } #frame { width: 640px; text-align: center; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: white; } #header { width: 640px; height: 100px; background-color: blue; } #menu { color: white; font-weight: bold; float: left; width: 100px; text-align: left; text-transform: uppercase; font-size: medium; background-color: #FD9800; font-size: 16px; border: medium solid #E0E0E0; padding: 4px; } #menu a.nav { width:92px; /*How can I have different colored links in this section v.s. the rest of the page?*/ } a:visited { color:#FFFF00; font-size: 12px; } a:hover { color:#FFFFFF; font-weight: bold; font-size: 12px; } a { color:green; font-size: 12px; } Code: <!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=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color:#060606; background:url(images/background.png) repeat-y left top; } ul, ul li { margin:0; padding:0; list-style:none; } ol, ol li { margin:0; padding:0; list-style:none; } div { margin:0; padding:0; } .clear { clear:both; } .wrapper { width:100%; height:1000px; border:1px solid #FF0000; } .header_wrapper { background:url(images/banner_bg.png) no-repeat left top; height:115px; width:100%; border-bottom:2px solid #FCE66F; } .header_wrapper .header { width:906px; height:115px; margin:0 auto; outline:1px solid #0000FF; } .header_wrapper .header .logo { float:left; left:0; top:0; width:136px; } .header_wrapper .header .title { float:left; margin-left:10px; padding-top:42px; width:491px; } .header_wrapper .header .right { width:245px; height:115px; float:right; outline:1px solid #0000FF; position:relative; } .header_wrapper .header .right .link { font:Tahoma, "Times New Roman", "Trebuchet MS", Verdana, Georgia, Arial, sans-serif; color:#F4E8D1; padding-top:28px; width:145px; height:20px; outline:1px solid #0033FF; position:absolute; right:0; } .header_wrapper .header .right .search { width:245px; height:35px; outline:1px solid #FF0000; position:absolute; bottom:20px; right:0; } .header_wrapper .header .right .link ul li a { line-height:10px; border-left:1px solid #F4E8D1; float:left; text-decoration:none; margin-left:15px; padding-left:15px; color:#F4E8D1; } .header_wrapper .header .right .link ul li.first a { border:none; } .header_wrapper .header .right .link ul li a:hover { text-decoration:underline; } .container_wrapper { width:923px; margin:0 auto; background:#060606; outline:1px solid #FF0000; } .container_wrapper .nav { margin:0 auto; padding-top:30px; width:923px; height:32px; font:12px Tahoma, "Times New Roman", "Trebuchet MS", Verdana, Georgia, Arial, sans-serif; } .container_wrapper .nav ul { list-style:none; margin:0; padding:0; } .container_wrapper .nav ul li { display:inline; margin-top:27px; } .container_wrapper .nav ul li a { padding:17px 35px; color:#FF6600; text-decoration:none; } .container_wrapper .nav ul li.first a { margin-left:30px; } .container_wrapper .nav ul li a:hover { background:url(images/hover_button1.png) center center no-repeat; color:#FF6600; } .container_wrapper .home_container { margin:0 auto; width:906px; outline:1px solid #0000FF; position:relative; } .container_wrapper .home_container .container_bg { background:url(images/body_bg.png) repeat-y left top; } .container_wrapper .home_container .left { float:left; width:219px; outline:1px solid #0000FF; margin-left:10px; } .container_wrapper .home_container .left .background { background:url(images/left_box_bg_img.png) repeat-y left top; } .container_wrapper .home_container .left .background .title { font: bold 12px Verdana, Arial, Helvetica, sans-serif; color:#FDFD31; width:190px; border-bottom:2px solid #FF7811; margin-left:12px; padding-bottom:5px; padding-left:2px; } .container_wrapper .home_container .left .background .pruduct { width:190px; margin-left:12px; margin-top:5px; } .container_wrapper .home_container .left .background .pruduct ul li { font:12px Verdana, Arial, Helvetica, sans-serif; color:#FFF500; padding-bottom:5px; } .container_wrapper .home_container .left .background .pruduct ul li a { color:#FFF500; text-decoration:none; } .container_wrapper .home_container .left .background .pruduct ul li a:hover { color:#FFF500; text-decoration:underline; } .container_wrapper .home_container .contain_box { float:left; width:400px; margin:0px 10px 0 10px; } .container_wrapper .home_container .contain_box .contain_title { font:bold 14px Verdana, Arial, Helvetica, sans-serif; color: #FDFD31; padding:5px 0 8px 0; } .container_wrapper .home_container .contain_box .text { font:12px Verdana, Arial, Helvetica, sans-serif; color:#ffffff; font-style:normal; text-align:justify; } .container_wrapper .home_container .right { float:right; width:253px; outline:1px solid #0000FF; } .container_wrapper .home_container .right .right_box_bg { background:url(images/right_box_bg_img.png) repeat-y left top; } .container_wrapper .home_container .right .right_box_bg .daily_news { width:195px; height:120px; outline:1px solid #00FF00; margin:0 auto; padding:0; } .container_wrapper .home_container .right .right_box_bg .daily_news .News_title { font: bold 24px "Times New Roman", Times, serif; color:#000000; text-align:center; border-bottom:2px solid #FA7815; } .container_wrapper .home_container .right .right_box_bg .daily_news .news_scroll { font:12px Verdana, Arial, Helvetica, sans-serif; text-align:center; width:175px; padding-left:20px; } .container_wrapper .home_container .right .right_box_bg .login_nox { width:230px; height:200px; outline:1px solid #0000FF; margin:0 auto; margin-top:20px; } .footer { margin:0 auto; width:906px; height:73px; background:url(images/footer2.png) no-repeat; margin-top:5px; outline:1px solid #0000FF; text-align:center; } .footer ul li { font:12px "Times New Roman", Times, serif; color:#C1A579; display:inline; line-height:80px; margin-left:20px; padding-left:20px; } .footer ul li a { font:12px "Times New Roman", Times, serif; color:#C1A579; text-decoration:none; } .footer ul li a:hover { text-decoration:underline; } </style> </head> <body> <div class="wrapper"> <div class="header_wrapper"> <div class="header"> <div class="logo"><img src="images/logo.png" height="171" width="136"/></div> <div class="title"> <img src="images/banner_title.png" width="500" height="56" /></div> <div class="right"> <div class="link"> <ul> <li class="first"><a href="">Register</a></li> <li><a href="">Login</a></li> </ul> </div> <div class="search"> <table width="245"> <tr> <td><img src="images/search_bg.png" width="179" height="27" /></td><td> <img src="images/go_button.png" width="49" height="29" /></td> </tr> </table> </div> <div class="clear"><!-- --></div> </div> <div class="clear"><!-- --></div> </div> </div> <div class="container_wrapper"> <div class="nav"> <ul> <li class="first"><a href="#">Home </a></li> <li><a href="#">Voluntee </a></li> <li><a href="#">About Us </a></li> <li><a href="#">Events</a></li> <li><a href="#"> Donate </a></li> <li ><a href="#"> Carrier with us</a></li> </ul> </div> <div class="clear"><!-- --></div> <div class="home_container"> <div><img src="images/body_top.png" width="906" height="12"></div> <div class="container_bg"> <div class="left"> <div><img src="images/left_box_top_img.png" width="219" height="14" /></div> <div class="background"> <div class="title">EVENTS</div> <div class="pruduct"> <ul> <li>* <a href="#">Whatexpect on Sundays</a></li> <li>* <a href="#">Location and directions</a></li> <li>* <a href="#">Where to go to wear</a></li> <li>* <a href="#">What for your child</a></li> <li>* <a href="#">Meet the staff</a></li> <li>* <a href="#">ExploreFaith.org</a></li> <li>* <a href="#">Mission Opportunities</a></li> </ul> </div> </div> <div><img src="images/left_box_bottom_img.png" width="219" height="15" /></div> </div> <div class="contain_box"> <div class="contain_title">Welcome to Elite Brigade</div> <div class="text"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br> <br> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> </div> <div class="right"> <div> <img src="images/right_box_top_img.png" width="253" height="18" /></div> <div class="right_box_bg"> <div class="daily_news"> <div class="News_title">Daily News</div> <div class="news_scroll"> <marquee height="80" behavior="scroll" direction="up" scrolldelay="50" truespeed="truespeed" scrollamount="1" onmouseover="this.stop()" onmouseout="this.start()" > Put Your Images tag here </marquee> </div> </div> <div class="login_nox"></div> </div> <div><img src="images/right_box_bottom_img.png" width="253" height="17" /></div> </div> <div class="clear"><!-- --></div> </div> <div><img src="images/body_bottom_.png" width="906" height="23"/></div> </div> <div class="clear"><!-- --></div> <div class="footer"> <ul> <li><a href="#">About Us</a></li> <li><a href="#">Contact us</a></li> <li><a href="#">Privacy Policy</a></li> <li><a href="#">Copyright statement</a></li> </ul> </div> </div> </div> </div> </body> </html> Quote: Hi Friends........... Above code is an home page of website and I want that when user clicks on register link, the registration form(PHP File) displays below "Welcome to Ankit" by replacing "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br> <br> <span style="font-weight: bold">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."</span> instead of another page. Anyone plz help me?????????????? Thx in advance............ Hello, I am currently making a site, and this is my first experience using css, and so far I love it. Now I have a page with multiple links on it, and this page has its css info stored in a seperate css file. Now I want some of the links to show up in all satus's (hover, visited ect)with one color, size ect, and some links to show up with a different color. I know i can modify all the links on the page color by adding this to the css page... ------------------------ A:LINK {font-family: Arial, Helvetica, sans-serif; color:#000000; text-decoration:none; font-size:12pt; font-weight:bold;} ----------------------- but how can i make it so each class has a differnt a:link, a:visited, ect. Thanks! Hi there, this is concerning 'id' tags...i've got a style set for my <a> tags, and i wish to create a second <a> style, to be applied to a small set of the <a>'s in my site. I know the #blah should be used to set an id for it, but here's my concern; 1. where do i state the id for the <a>? (ie. <div id="blah"> or <a href="http:///////" id="blah">). 2. do i need to define an id for the existing style? or can i just leave it the way it is and apply the id to the one i want different? thanks in advance. Code: <div id="topNav"> <ul id="cssdropdown"> <li class="topNavTitle"><a href="" class="atopNavTitle">---A---</a> <ul class="subuls"> <li><a href="a.php">AAA</a></li> <li><a href="b.php">BBB</a></li> </ul> </li> <li class="topNavSep"></li> <li class="topNavTitle"><a href="" class="atopNavTitle">---B---</a></li> </ul> </div> <style type="text/css"> li.topNavTitle a.atopNavTitle { margin-top: 20px; padding-top: 20px; } </style> Hi, I am trying to move <a href="" class="atopNavTitle">---A---</a> <a href="" class="atopNavTitle">---B---</a> down 20px. I have tried the above style but it does nothing. What do I do wrong? how may i define that <a name> is not related to general selector by <a> tag? e.g. i don't want when i mouse over <a name> to change its color defined ny a:hover. assidning separate class to them is nightmare. Hi, I am at this point too tired to continue to search for my answer, so I am going to just ask... I would like to be able to control the color and underlining of the links in the unordered list. This list will appear on every page in the site. I am not sure what the CSS code is or in which class/id to place it in my css file. the page code is: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="description" content=""/> <meta name="keywords" content=""/> <link rel="shortcut icon" href="" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script src="nav.js" type="text/javascript"></script> <title>Natura Culina :: Welcome</title> </head> <body marginwidth="0" marginheight="0" style="margin: 0" onLoad="writeMenus()" onResize="if (isNS4) nsResizeHandler()" bgcolor="#D89607"> <div class="allcontent"> <div id="header"> <ul id="navigation"> <li><a href="index.php">home</a></li> <li><a href="products.php">products</a></li> <li><a href="ingredients.php">ingredients</a></li> <li><a href="about.php">about us</a></li> <li><a href="testimonials.php">testimonials</a></li> <li><a href="links.php">links</a></li> </ul><!---end navigation---> </div><!-- end header --> <div class="textArea"> <p align="center"><span class="header1">Welcome to Natura Culina Organic Skin Care </span></p> <p><br /> <img src="/images/all229.jpg" width="367" height="233" align="left" class="left" /><span class="bodyBold">Natura Culina</span> creates luxurious skin care products that will appeal to your senses, inspired by skin care traditions used at centuries old European Spas.</p> <p>We are <em><span class="bodyBold">so over</span></em> using chemical solutions for our skin problems because they are so unsatisfactory.<br> We are <em><span class="bodyBold">so back</span></em> to feeding our skin with natural ingredients, oils, vitamins and antioxidants.</p> <p>All the oils used in our products are cold pressed and certified organic. All our ingredients are carefully blended to create effective, nourishing and natural products for your skin. All body products are made after placing an order to assure freshness. </p> <p> </p><p> </p><p> </p> <p align="center"><em><span class="bodyBold">Start loving your skin again with Natura Culina Food For Your Skin.</span></em></p> </div><!---end contentBGColor---> </div><!---end allcontent---> </body> </html> and the CSS sheet code is this: Code: body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; background-color: #D89607; } #body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; background-color: #E1A21A; } .allcontent { width: 736px; margin-left: auto; margin-right: auto; border: thin dotted; margin-top: 10px; } #header { background-image: url(/images/banner1.jpg); background-repeat: no-repeat; height: 260px; margin-top: -18px; } .textArea { background-color: #E1A21A; padding-top: 0px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; } #navigation li { float: left; list-style: none; padding-left: 20px; padding-right: 20px; padding-top: 240px; } #navigation { font-size: 16px; font-weight: bold; color: #fff; } img.left { padding: 0px 10px 0px 0px; float: left; } .header1 { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; } .bodyBold { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; font-weight: bold; } .small { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000; } .itemBorder { border: 1px solid #73090E } .itemText { text-decoration: none; color: #F3F7FD; font: 14px Arial, Helvetica } .itemTextHeaders { text-decoration: none; color: #E6EBF2; font: bold normal 13px Verdana, Arial, Helvetica, sans-serif} Hi, is there a method of setting the color for title="some text" in a hyperlink ? e.g. [<a href="index.php?page=links.php" title="Redlake Valley business websites">Local Links</a>] TIA Mike Okay... I'm working more with CSS these days, and am trying to accomplish something that I can't figure out... I know that I can create a div, assign a specific size, and background image, and then inside that div, I can add an empty href tag with a display:block and height assigned, and the entire div is linked, the same as linking the image itself... What I'm trying to accomplish is the same thing, only with a div that has textual content.... I could throw the href tag outside the div, but it isn't valid XHTML 1.0, and throws warnings... I've tried display:block, and height as usual, and even tried throwing the z-index on top of the other items, and with a clear:none; but to no avail.... I hope this is a decent enough description of the problem... anyway to accomplish this??? Hi, My CSS has a simple declaration for "A" href tags: Code: a { color:#8D603B ; text-decoration: underline; font-weight:bold; } a:visited { color:#8D603B ; font-weight:bold; } a:hover { color:#A97043 ; font-weight:bold; } So, this is used throughout the site. However, I want to specify a different style for the "A" tag if it is within a certain DIV. For example, Code: <div class="whitebox">This <a href='mypage.php'>link</a> displays fine because it is inside a white box.</div> <div class="blackbox">I want this <a href='mypage2.php'>link</a> to be white, since it is inside a black box.</div> The problem is - I can't simply add a "class" to the link tag - i.e. <a href='mypage2.php' class='whitelink'>link</a> - because all this will be remote authored via a CMS. Rather than adding complexity to my CMS - is there a simple CSS declaration to specify that all links within the "blackbox" DIV must be a different style (including the 'hover' effect)? Thanks very much! Hi, I just want to change the color when I mouseover an href without a style sheet. This does not work: <a href="test.html" style="a:hover { color: #DA8525; }">Test</a> Is that suppose to work? |