CSS - Changing A Certain Link To A Different Colour
hey,
i want to change a certain link to a different colour. but i want all the other links to be the 'original' i have tried appling a class but the 'original' link seems to be taking over i want to change the "Top" link to red site is located at: http://studentwork.qantm.com.au/pking/website/seminars.cfm the css is located at: http://studentwork.qantm.com.au/pking/website/ptwm.css any help would be great thanks Similar TutorialsI have a FAQ web page which has a list of questions at the top which link to the answer for that question (on that page). I have used 'on click' to change the background colour of the div which contains the answer to the question you have clicked on. Code: <a href="#name" onclick="document.getElementById('namediv').style.background='#99ccaa'" >click here !!! </a><br> And this works, but it becomes a problem when i scroll back to the questions and click on another one. It will change the background of the new div as required but I can't find a way to revert the previous div back to its original background color. any ideas? Thanks i currently have the following code for links.. Code: a { color:#666666; font-size:11px; text-decoration:none; font-weight:600; font-family: arial, helvetica, sans-serif; } a:link {color:#666666;} a:visited {color:#333333;} a:hover {background-color:#eee;} is there a way of having another set so that some have the colour settings as above and another set have the colour settings that are blue or something??? any suggestions would be great.... thanks RF I have a block that im trying to change the colour of when a user moves their mouse over it, but it isnt a link. At the moment its a div and the css for the block is simply: .postbitleft { background-color: #0B198C; } (aside from the size attributions which are already defined. What do i need to add to that CSS for it to change colour when someone hovers over it? Can i actually use CSS for that or will i have to use javascript? Regards, James I would like the link colour to change and the background of the <li> to change as well. I can't figure out what CSS to use for it though. I have made bold and underlined the li I want to change on hover. Code: <li id="menuitem_2mainnav"> <a id="menulink_2mainnav" class="mainlevelmainnav" href="/example/index.php?option=com_content&view=article&id=1&Itemid=2">Meetings</a> <ul id="menulist_2mainnav"> <li id="menuitem_2_1mainnav"><a id="menulink_2_1mainnav" class="sublevelmainnav" href="/example/index.php?option=com_content&view=article&id=1&Itemid=14">TEST 1</a></li> <li id="menuitem_2_2mainnav"><a id="menulink_2_2mainnav" class="sublevelmainnav" href="/example/index.php?option=com_content&view=article&id=1&Itemid=15">TEST 2</a></li> <li id="menuitem_2_3mainnav"><a id="menulink_2_3mainnav" class="sublevelmainnav" href="/example/index.php?option=com_content&view=article&id=1&Itemid=16">TEST 3</a></li> <li id="menuitem_2_4mainnav"><a id="menulink_2_4mainnav" class="sublevelmainnav" href="/example/index.php?option=com_content&view=article&id=1&Itemid=17">TEST 4</a></li> </ul> </li> I have tried: Code: #menulist_2mainnav li:hover{ color:#000000 !important; } But it doesn't change the links text colour. Hi. Really hoping someone can help me with this... I'll try and explain this as best I can(!) Basically I've got a page containing a block of 9 images, with each linking to a video clip. At the moment I've got the CSS coded so that whenever the mouse is hovered over the 'infobar' (at the bottom of each image) it goes from having a transparent background with black text to having a grey background with white text. What I'm trying to achieve is that same effect whenever the mouse is hovered over any part of the image and infobar. The live online link can be found at: www.markmcm.co.uk/test/test.html The CSS is as as follows: Code: /* * Page Stylesheet */ body { font-family: Arial, Helvetica, sans-serif; background-color: #eaeaea; border:0; margin:0; padding:0; height: 100%; } a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } #container { margin-left: auto; margin-right: auto; min-height: 100%; width: 936px; } * html #container { height: 100%; } #content { float:left; position: relative; height: 528px; width: 936px; z-index: 0; } .miniscreen1, .miniscreen2, .miniscreen3, .miniscreen4, .miniscreen5, .miniscreen6, .miniscreen7, .miniscreen8, .miniscreen9 { position: absolute; float: left; display: block; width: 312px; height: 176px; } .miniscreen1 { top: 0; left: 0; } .miniscreen2 { top:0; left: 312px; } .miniscreen3 { top: 0; left: 624px; } .miniscreen4 { left: 0; top:176px; } .miniscreen5 { left: 312px; top:176px; } .miniscreen6 { left: 624px; top:176px; } .miniscreen7 { left: 0; top:352px; } .miniscreen8 { left: 312px; top:352px; } .miniscreen9 { left: 624px; top:352px; } .info { height: 30px; top:3px; left: 40px; width: 265px; float: left; position: absolute; } .infobar { left:0px; position: absolute; top: 140px; width: 312px; height: 36px; outline: none; color:#000; background: url("data/infobar.png") no-repeat 0 0; z-index: 650; } .infobar:hover { background-position: 0 -36px; outline: none; color:#fff; } #infobar span { display: none; outline: none; } .clip_title { outline: none; font-size: 85%; font-weight: 700; vertical-align: top; text-align: left; } .clip_sub { outline: none; height: 13px; font-size: 80%; line-height: 13px; font-weight: 700; vertical-align: top; text-align: left; } And the HTML is: 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"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test Page</title> <meta name="description" content=" " /> <meta name="keywords" content=" " /> <meta name="generator" content=" " /> <link rel="stylesheet" type="text/css" href="page.css" media="screen" /> </head> <body> <div id="container"> <div id="content"> <span class="miniscreen1"> <a href="#"> <img src="img/clip1.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 1<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen2"> <a href="#"><img src="img/clip2.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 2<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen3"> <a href="#"><img src="img/clip3.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 3<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen4"> <a href="#"><img src="img/clip4.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 4<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen5"> <a href="#"><img src="img/clip5.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 5<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen6"> <a href="#"><img src="img/clip6.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 6<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen7"> <a href="#"><img src="img/clip7.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 7<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen8"> <a href="#"><img src="img/clip8.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 8<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen9"> <a href="#"><img src="img/clip9.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 9<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> </div> </div> </body> </html> There must be a better (and easier?) way to do this. Any help would be very-much appreciated - and save an old bloke from tearing too much of his hair out(!) I have a webpage that has a Link tag that links to a style sheet Code: <html> <head> <link rel="stylesheet" type="text/css" href="http://cdn-media.madaboutbrighton.net/css/main-min-v1.4.css" /> </head> <body> Test 0.0.1 </body> </html> However, when viewing the source of this page in IE, Chrome and Firefox the Link tag has transformed into a Style tag which contains a dump of the linked style sheet Code: <html> <head> <style type="text/css" style="display:none">body... whole style sheet content dumped in here...</style> </head> <body> Test 0.0.1 </body> </html> This is a fairly old site, and nothing has changed recently. But when i first published the site the Link tag appeared normally. I have tried passing it a css file with no content or with just one definition in it, but it keeps changing the Link tag into a Style tag. I obviously don't want the css dumped into a Style tag each time as this is very inefficient and bypasses all my caching/expires settings. You can see an example of this here madaboutbrighton.net/test This is not an isolated case and is effecting some but not all sites on my webserver, which were all displaying correctly the last time i checked but now have this problem. Even though all sites have the same settings. I am baffled. All ideas most welcome, or even just let me know if you are having the same problem. Cheers!!! Hey guys, Just seeing if this is possible. By the way this is for a myspace page. Looking to have a link to change opacity on current page. table table table, div table table{ border-color:rgb(0,0,0); border-style:solid; border-width:2px; background-color:rgb(55,55,5); opacity:0.8; -moz-opacity:0.7; filter:alpha(opacity=50); } This is the code currently. Is it possible (without java) to have a link that would set "opacity:0" Thanks! currently i have links defined as a certain color and changes to a certain color when i hover over them.. i have a table which has these links inside the cells and when i hover over the cell, the background of the cell changes color but the link wont change color until i hover over the link.. is there anyway so that when i hover over the cell i can make the link change color too? the problem is i have some padding for the cells, so once i go inside the cell but dont hover exactly over the link, the background will change but the link won't until i hover over it thanks Is it possible to set the colour of the padding in a table cell? In CSS, is it possible to define certain colours for a certain piece of text? For example, in the site I'm doing at the moment, the paragraph font-colour is black, but when the text ''CrudeSep'' comes up, I would like The 'sep' piece of the text to be in orange. This would save me having to make an image to do this! Any help appreciated. I'm having trouble with my list on a site im working on. When you hover over the link, I want it to display a background colour the full width of the box, not just the length of the text. You can see the menu, on the left hand side - HERE. Here's the CSS of the list. Code: div #leftcontent { padding-left: 0px; padding-top: 0px; display: block; font-size:90%; font-family:Arial, Helvetica, sans-serif; } #leftcontent a { text-decoration:none; padding:0px; color:#000066; } #leftcontent a:hover { text-decoration:none; background-color:#66CCFF; background-color-width:30px; } #leftcontent ul{ margin: -10px 10px 2px 5px; padding: 0; list-style: none; } #leftcontent li a{ margin: 0 0 .5em 0; padding: 2px 5px 5px 0px; line-height: 1.4em; font-size:100%; color:#FFFFFF; } Any help is appreciated. Cheers. __________________ ULTRASUK Hi, im trying to create a block of colour of various width. Im trying to do it with <span> like so <span style="background-color:#336699; width:100px"></span> Now why wouldnt that work and is there a better way to do what im trying to achieve? Hi. Is there any way to: a) Change background color of the title box that appears when you hover over an image AND b) Reduce the delay it takes to appear? Thanks. I'd like to be able to have different hover colours for different table rows. I have a general hover colour for the whole page and I'd like to have a different hover colour for the table rows. In the head I have a:hover { color: green } a.white:hover { color: white } So by hand I can insert the class="white" to each individual cell as part of the link but what if I wanted a whole row to hover white? How would I code this or is there still no way to do it? Hi, I have some text which has a line through it, i.e. .sale_originalprice { color:#666666 ; font-family: Verdana, Arial ; font-size:10pt ; font-weight:normal; text-decoration: line-through; } What I want to do is change the line-through colour to red. But the text should remain grey (i.e. #666666) Is this possible? I tried text-line-through-colour: red; already but that didnt work Thanks! A background image is being applied to an image, but I cant find anywhere in the CSS where this color is being applied. Ive also been fiddling with the position of the arrows using margins and padding, but these dont seem to have an effect either. Here is a link to my page: http://www.zombiemod.com/rm/nina2/main.php?g2_itemId=14 Here are the two images in question: http://www.zombiemod.com/rm/nina2/t...ntrols-left.png http://www.zombiemod.com/rm/nina2/t...trols-right.png You can see there is a background color to the images of #f0f0f0 and the positioning isnt correct, im trying to remove the background colour and find out how to reposition the horizontal position of these images. Here is my HTML: Code: <div id="content"> <div id="main-image-container" {if $theme.imageCount == 0}style="display:none"{/if}> {if $theme.imageCount > 0} <div id="slideshow-controls"> <ul id="control-buttons"> <li><button id="controls-left"> <img src="{g->theme url="images/controls-left.png"}" alt="{g->text text="Left"}" /> </button></li> <li><button id="controls-play"> <img src="{g->theme url="images/controls-right.png"}" alt="{g->text text="Play"}" /> </button></li> <li><button id="controls-right"> <img src="{g->theme url="images/controls-right.png"}" alt="{g->text text="Right"}" /> </button></li> </ul> </div> Here is my CSS: Code: #slideshow-controlsx { position: relative; height: 14px; margin: 0px 0 -58px; overflow: hidden; z-index: 100; text-align: left; top:200px; } #main-image-container > #slideshow-controlsx { margin-bottom: -50px; margin:0 auto; } #slideshow-controlsx ul { position: relative; margin: 0; padding: 0px 0px 0px 0px; list-style: none inside; width:690px; /* background-color: #000;*/ /* opacity: 0.6; -moz-opacity: 0.6; filter: alpha(opacity=40); Lower opacity for IE since the controls don't hide */ } #slideshow-controlsx ul li { float: left; margin: 0; padding: 0; } #slideshow-controlsx button { width: 8px; height: 14px; /*margin: 0; padding: 0;*/ /* background-color: #000;*/ padding:0px; border: none; text-align: center; cursor: pointer; } Can anyone please tell me where the background colour #f0f0f0 is being applied, and how I should be modifying the code to move the images closer in towards the centre of the image. James Hey Guys, I have validated both my html and css. The only errors that come back for my css is that I have the same colour background and whatnot. BUT that's what I want. So there aren't really errors. Here is my page: jacenta.com/whichsbc What I have been attempting to achieve and been utterly failing is: If you goto the menu on the side and hover over you will see a light grey background show up. Basically I want that to extend to ethier ends of the box. Is there anyway for this to be done??? I've tried everything and I just can't seem to figure this one out. A good example of what I am looking for is in my drop down menu at the top when you select a heading and a dropdown comes down, hover over an item and a light blue background will show up. It's probally something simple... I know. But ahh. It's just so frusterating! If someone could help me out I would apperciate it so much! You all are such a great help. - Jacenta Hi all, the page i am talking about is... http://sydneynightowl.com.au/home.php The problem is the the div 3column seems to start too early in the work flow and also the background colour on the header bleeds. The div and header should be starting after the first 3 divs (which are set to float) I hope i have explain this correctly, any help is apriciated. The css code is Code: @charset "utf-8"; /* CSS Document */ body {background-color:#000000; background-image: url(../images/background.jpg); background-repeat:no-repeat; background-position:center top; color:#FFFFFF; font-family:"Lucida Sans Unicode", sans-serif; font-weight:100; font-size:12px;} #container { position:absolute; width: 700px; left:50%; margin-left:-358px; } #header { margin-top:0px; height: 115px;} #toolbar {height: 30px; line-height:10px; padding: 0px 10px; font-variant:small-caps; } #cornerlogo { position:fixed; top:5px; left:5px; } #topnavigation {height: 35px; line-height:35px; text-align:center;} #content { border-bottom:1px;} .3column {width:695px; padding-right:5px; padding-left:5px; margin-top:5px;} #leftcolumngl {float:left; width:223px; height:370px; padding-right:5px; padding-left:5px; padding-top:5px; margin-top:15px; margin-right:5px; border:#FFFF00 solid thin;} #middlecolumngl {float:left; height:370px; width:225px;} #rightcolumngl {float:left; height:370px; width:230px; padding-left:5px;} #leftcolumn { float:left; width:230px; padding-right:5px;} #middlecolumn {float:left; width:230px;} #rightcolumn {float:left; width:230px; padding-left:5px;} #imagecolumn {float:left; width:340px; padding-left:5px;} #infocolumn {float:left; width:340px; padding-left:5px;} #footer {height: 30px; border:thin solid #FFFFFF; clear:both; text-align:center; margin-bottom:30px; margin-top: 30px; line-height:25px;} #bgfirst { position:absolute; top:190px; left:0px; width:90%; height:200px; margin-bottom:20px; background-color:#00CC00; } #bgsecond {position:absolute; top: 400px; right:0px; width:90%; height:200px; background-color:#660066; } a:link {color: #fffc00; font-weight: normal;} a:active {color: #fffc00; font-weight: normal;} a:visited {color: #fffc00; font-weight: normal;} a:hover {color: #fffc00; font-weight: bold;} a.event:link {color: #fffc00; font-weight: normal;} a.event:active {color: #fffc00; font-weight: normal;} a.event:visited {color: #fffc00; font-weight: normal;} a.event:hover {color: #fffc00; font-weight: bold;} a.club:link {color: #fffc00; font-weight: normal;} a.club:active {color: #fffc00; font-weight: normal;} a.club:visited {color: #fffc00; font-weight: normal;} a.club:hover {color: #fffc00; font-weight: bold;} h1 { text-align:center; color:#000000; background-color:#fffc00; margin-left:3px; margin-right:3px; font-variant:small-caps; font-size:22px;} h2 {text-align:center; color:#fffc00; background-color:#333333; margin-left:3px; margin-right:3px; font-variant:small-caps; font-size:18px;} .ourprice { display:inline; color:#FF0000; line-height:20px; font-variant:small-caps; font-size:14px;} img { border-color:#fffc00; border-style:solid; border-width:thin; } img.noborder { border:none;} img.venues {float:left; margin:10px;} .mainnavimages { border-color:#979700; border-style:solid; border-width:thin; } p {line-height:15px;} strong { color:#fffc00;} Hi, I have found this code in a php thing of mine and I would like to change it, and this bit off css is what makes it "happen". As it stands, when you mouse over a row nothing happens. What I would like it to do is change colour of the whole row (rows 1-4) (Like in phpMyAdmin browse section). This is the code I think I should change: Code: /* Common elements */ .row1 { background-color: #F5F9FD } .row2 { background-color: #DFE6EF } .row3 { background-color: #EEF2F7 } .row4 { background-color: #E4EAF2 } I also have this bit of CSS that can change ONE row's colour, but not all of them at the same time. If it helps, this is the code. I have edited the code into the main php file I have, in all the rows, but it only changes one "cell" when you hover over it, and not the whole row. Code: <td class="row4" onmouseover='window.status="{$info['name']}"; this.style.backgroundColor=iOver;' onmouseout='window.status="Done"; this.style.backgroundColor=iOut;' onclick="javascript:window.location.href='{$ibforums->base_url}showforum={$info['id']}';">; </td> </span></td> Thanks, Prism128 PS: The iOver and iOut (in the second code) are colour references in a php file Hi, I gave in, and would like to change my colour scheme. However I do not know from where to start to select good coloures for my website I want my website to still leave an imprint in peoples mind, but at the same time it is relaxing to see and browse in. I tought of black orange and brown .. however black does not look like a relaxing colour to me ... I could use different shades of brown as well .. Anyways .. anyone having any sugestions are more then welcome. dd112g |