CSS - Newbie Link Question
I have one link on a web page that I want the default colors to appear on. How do I turn off A:link, A:visited, A:active, & A:hover styles for one single link? I want all the other links to remain as they are presently set with CSS. Also, I want the font attribute(s) to remain set for the link in question.
Thanks, Thad Similar TutorialsHi everybody. I am trying to transition from awkward HTML and haphazard CSS to valid XHTML (transitional) and a central stylesheet. I'm trying to create a small link list where each item "hovers" in a different color, but I'm clearly doing something wrong. The HTML file is http://www.bsuto.com/valid.html ( and the CSS is http://www.bsuto.com/sheet.css ) Thanks in advance for any help! Hello all... it's been brought to my attention that css is a solid method to build sites. my question is this; would css work well for a website that displays a variety of products stored in a database and brought up via php. the page length would vary depending on the number of products per section etc... also, i typically generate my pages in photoshop/image ready (being a designer ahead of a developer)...are sliced images easily useable in css? Thanks in advance! hi there i am quite new to css and i would appreciate your help. i would like to make the following thing : my gallery contains 10 images (600/400 pixel) i would like to make one single page that shows only one photo at a time and has (text or icon) links to the other 9 images ... of course it would be nice to have some minimalistic transition effect between the images too but if its too much for you i am mainly interested in the functionality part if this (as so many things) has been made as a tutorial i will be glad to get a link too thanks zs I need to build web page like this. Is it possible to make it with divs. I believe it is, but I can't manage how. Can you please help me with my little problem? Thanks in advance! Could someone take a look at http://nexleads.com/projdemos/fc/test.html and tell me why it;s fine in IE and not in firefox ?? I undertsand that firefox is right and IE isn't, but could you point me to the right direction ? Thanks !! Hey everyone! I'm brand spankin' new to the forum, but hopefully I'll become a regular fixture here! I have a real estate agent client that I am doing SEO for, but my duties have expanded (a little outside my expertise) into the website itself. I can't post hyperlinks (which precludes me pasting code here) so this should be an interesting task of explaining my problem! Currently, there is a vertical navigation bar on the left side of the page that is simply an < ul > of hyperlinks. So, for example, if the list item was "Brooklyn", it would return a search of the MLS listings for the city of Brooklyn. The client wants these hyperlinks to instead go to pop-out menus. So, the tab would still say "Brooklyn", but there would be two popout items "Brooklyn Brownstones" and "Brooklyn Apartments" for example. The original tab would no longer hyperlink to search results, but the pop outs would link to results for their specific parameters. The current template is using <ul class="navSec"> to accomplish the nav bar. I cannot write code (aside from HTML) from scratch. I can, however tweak and edit existing code in .css, .php, .js etc. If there is any way you can help me, I'd appreciate it. Since I can't link the site, I can tell you it is Maui Just Listed (all one word) with the dot and then the com. Eileen As the title says, I just started learning HTML/CSS, cause our robotics group need to have a website, and all that. Sooo....first, I did a basic (photoshop) outline of how it should look like, and all. -since I can't post picture links for some reason, I'm not sure how can I explain this...- And so, I tried my hands on CSS, and all. And well...I succeeded, and failed...ish. Basically, I tried to make the menu. While it looked fine and all, I think I mis assigned my CSS styling, so whatever I type in the <html> is now considered part of it. I tried to id the links out, but I don't think I did it correctly, or that's the wrong way to do it. >__> . To be specific, I want to place some text around, but they start at midway down for no reason, and the same goes for images with hyperlink. So I'm assuming it's still thinking whatever I'm typing is still considered part of the "menu". So is there a way to well, isolate the menu out, or something? Code: </body> </html> <html> <head> <style type="text/css"> a:link,a:visited { display:block; font-weight:500; font-family:Arial; letter-spacing: 1px; color:#FFFFFF; background-color:#3366cc; width:145px; text-align:center; padding:6px; text-decoration:none; position:relative; left:8px; bottom:-83px; } a:hover,a:active { background-color:#99ccff; } </style> </head> <head> <style type="text/css"> body { background-image:url('http://img220.imageshack.us/img220/3707/backgroundtesteq.jpg'); background-repeat:no-repeat; } </style> </head> <html> <a href="http://facebook.com" target="_blank">ABOUT US</a> <a href="http://google.com" target="_blank">JOINING US</a> <a href="http://youtube.com" target="_blank">THE FRC</a> <a href="http://tvtropes.org" target="_blank">OUR ROBOT</a> <a href="http://fanfiction.net" target="_blank">2011</a> <a href="http://thegame.youlostit.com" target="_blank">EVENTS</a> <a href="http://ihotrobotics.org" target="_blank">PREVIOUS YEARS</a> <a href="http://aischool.org" target="_blank">COMMUNITY</a> <a href="http://questionmark.com" target="_blank">SPONSORS</a> </html> So uh, can anyone help tell me what's the problem? =x Thank you very much. I keep seeing the same things online "Make the body container 100%" Tried that and it still isn't working. Site is http://www.columbusindiearts.com/indexfull.html and here is the code Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <style> body { background-color: #999999; height:100%; width:100%; } div#outer { background-color: #FFFFFF; display: table; width:600px; height:100%; margin-left:auto; margin-right:auto; } </style> </head> <body> <div id="outer"> test </div> </body> </html> What am I doing wrong? need it to work in IE7 and Firefox. Hosted on linux Apache hey all, ive got a newbie question here, just got a book and am trying some things but can figure out this.. i have the following Code: ul, li { display: inline; margin: 10; padding: 15; font-weight: bold; font-style: italic; } <ul> <li><span align="center" class="normal">Image 1</span></li> <li><span align="center" class="normal">Image 2</span></li> <li><span align="center" class="normal">Image 3</span></li> <li><span align="center" class="normal">Image 4 </span></li> <li><span align="center" class="normal">Image 5</span></li> </ul> and the prints age 1 Image 2 Image 3 Image 4 Image 5 which is good but ide like to have the following age 1 Image 2 Image 3 Image 4 Image 5 age 1 Image 2 Image 3 Image 4 Image 5 i have tried this Code: <ul> <li><span align="center" class="normal">Image 1</span></li> <li><span align="center" class="normal">Image 2</span></li> <li><span align="center" class="normal">Image 3</span></li> <li><span align="center" class="normal">Image 4 </span></li> <li><span align="center" class="normal">Image 5</span></li> </ul><br> <ul> <li><span align="center" class="normal">Image 1a</span></li> <li><span align="center" class="normal">Image 2a</span></li> <li><span align="center" class="normal">Image 3a</span></li> <li><span align="center" class="normal">Image 4a </span></li> <li><span align="center" class="normal">Image 5a</span></li> </ul> but it isn't quite right, basically i want to implement a 2 row 5 colum table using this method...is there another way of doing it?? thanks in advance RF Hi, First, before you get on my case, I'm using a table, because that's what the teacher wanted. And as I've never worked with CSS, let alone divs, I was more comfortable with it anyhow. Okay, the question I have is probably very dumb, and the answer very simple, but I'm not getting it. I'm just trying to get an image aligned to the top of a cell. http://esdcar.org/web/test/templatem2.html I could use valign in the cell tag, and it almost works (but it doesn't quite align at the top, about 5px short), but I'd like to do it with CSS, especially as I'm going to have a different header image on every page. The cell has its own id of contentm. Inside the img src tag, I put class="pageheader." In the stylesheet, I gave .pageheader an attribute of vertical-align: top. But, it's not working. What am I doing wrong? hi all. i am trying to leave the world of table formatting and need a bit of help i have a container div with two divs in it the first div has an image in it that should sit at the bottom, like so: _____________________ logo div ____IMG______________| __nav div_____________| i have the following code as my css: #container{ margin-left:60px; border:1px dotted black; } #logo{ margin-top:60px; width: 395px; height: 140px; background-color:#EBEBEB; padding: 10px 0px 0px 20px; } #nav{ margin-top:5px; height: 25px; width: 395px; background-color:#FFFF00; padding: 10px 0px 0px 20px; } img { display: block; border: 0; } img.bt { display: block; vertical-align: bottom; } and my html: <div id="container"> <div id="logo"><img src="i/logotype.gif" class="bt"></div> <div id="nav">Practice Areas | Firm Profile | News | Attorneys</div> </div> it is not vertical aligning to bottom. can anyone help me? i am testing on mac ie5 and safari for super @ssyness!! but i want it to work everywhere if possible. i am sure it is something simple, but im not sure what it is thanks a lot everyone. Hi guys, I'm new to CSS so pleaz forgive me if the following questions are stupid. 1/ Let's say we have in traditional HTML this: <img src=".."><font class=""><b>French Jokes</b></font> <br> <img src=".."><font class=""><b>French (Freedom) Fries</b></font> <br> <img src=".."><font class=""><b>F*** Jacques Chirac</b></font> <br> <img src=".."><font class=""><b>A bas la France</b></font> Now how should I write that in plain CSS? (I know I cannot use <b>, nor <font> tags). I suppose the <p> tag, correct? Something like: <img src=".."><p id="cat_title">French Jokes</p> <br> <img src=".."><p id="cat_title">French (Freedom) Fries</p> <br> <img src=".."><p id="cat_title">F*** Jacques Chirac</p> <br> <img src=".."><p id="cat_title">A bas la France</p> My problem with CSS is not the table design with float and so on but rather how to lay out a page combining many fonts (some on the same line), some <b> and some <u>'s, some font tags etc. (should I choose <span> rather than <p>?, <div>, rather than <p>, <b> or <strong>, etc, etc ,etc) Thank you for your help. Cheers Andreas hi, just started with css and im having trouble centering 3 columns in a container. Code: <div id="container"> <div id="content"> <h1>Title Header</h1> <div id="top"> <div class="col"> <h2>Section Header</h2> <p>Lorem ipsum est cu voluptatum efficiantur deterruisset, nec et solum lucilius argumentum, eum ei regione bonorum suavitate. Lorem nonummy suscipiantur sit cu, id eum soluta putant. Sale porro rationibus mei no. Vis ut primis virtute nostrud, sea an malis menandri definiebas, his agam ancillae delectus ei. Ei deleniti noluisse interesset quo, vis at quem scriptorem cotidieque. Sit an virtute gubergren expetendis, at ludus dolor accusam per.</p> </div> <div class="col"> <h2>Section Header</h2> <p>Ferri docendi nec ut. Viris tamquam ad quo, nam admodum facilisis adolescens ut, usu meis iriure tractatos at. Ei duo eros qualisque elaboraret, paulo vivendo inciderint an duo, mea eius exerci constituam cu. Ne facer exerci appetere vis, id dicat malorum mel, an sed ferri ludus aliquyam. Ut omnis meliore praesent usu, te sit quas tempor moderatius, accusam voluptua eam at. Duo agam etiam facilisi eu, cum an aeque congue contentiones, id omnium persecuti sadipscing sit. Ne eum invidunt laboramus, eum error nostro ad.</p> </div> <div class="col"> <h2>Section Header</h2> <p>Quem feugiat adipisci no sed, simul solet mandamus ut sea, no vocent corrumpit argumentum per. Cu iisque facilisi insolens est, posse nonummy adipisci vel ut. An has nibh natum dissentias, te lorem legere posidonium eam, te quodsi prompta euripidis sed. Ne noluisse petentium cum, sed utroque offendit recteque eu. Te cum petentium disputando, id duo oratio fuisset gloriatur, in sed timeam ponderum.</p> </div> </div> <div class="clear"></div> </div> <div id="footer"> <h3>Footer Header</h3> </div> </div> css: Code: * { margin: 0; padding:0; border: 0; } body { background-color: gray; text-align:center; } #container { width: 900px; background-color:white; margin: auto; } #content { } #top { margin: auto; } .col { margin: auto; width: 267px; float: left; text-align: left; } .clear { clear: both; } #footer { clear: both; } this obviously doesnt work. and has some serious issues. if not, coded wrong altogether. im free to any suggestions as far as my div markups and what i should be doing to keep code efficient. i also am wondering what the keyword 'auto' mean in css. ive searched all around and never found a good exp or example explaining what it is. again, the css is pretty screwed. i added and deleted so much that i cant even remember what i did and getting a little frustrated in the process. thanks in advance for the response. Hello and thanks for your patience. I have a page here that is having a positioning problem for "sidebar2". I can't seem to get it to stick to that right side of the page in a fixed position. Code: @charset "UTF-8"; * { margin: 0px; padding: 0px; } body { text-align: center; font-family: Arial, Helvetica, sans-serif; font-size: 0.8em; color: #32240C; line-height: 1.5em; } a:link { color:#C42617; } a:hover { color: #687ABB; } a:visited { color:#C42617; } a:active { color: #687ABB; } h2 { font-size: 1.2em; line-height: 2.3em; color: #34260b; border-left-width: thin; border-left-style: double; border-left-color: #34260b; text-indent: 10px; background-repeat: no-repeat; } #clear { clear: both; } #welcome { color: #325084; float: left; width: 590px; text-align: left; padding: 15px; border: thin solid #D0DAEF; background-color: #FFF; margin-left: 25px; margin-right: 5px; } #welcome h2 { padding-left: 2px; } #welcome p { padding-left: 2px; } input { width: 185px; } /* reset width for non-text inputs */ input.radio, input.checkbox, input.submit, input.dropdown { width:auto; } /* display labels next to form elements add a class for when you want them to stack */ label { float: left; margin-right: 1em; } label.top { display: block; float: none; } .sidebar2 { position:absolute; top:182px; right: 150px; text-align:left; width: 255px; padding-top: 0px; padding-right: 0; padding-bottom: 10px; padding-left: 10px; margin-top: 0px; } .sidebarheader { color:#D75500; padding-bottom: 5px; font-weight: bold; font-style: italic; font-size: 16px; } ul { list-style: none; margin: 0; padding: 0; } img { border: none; } /*- Menu 3--------------------------- */ #menu3 { width: 250px; border-style: solid solid none solid; border-color: #BCD2E6; border-size: 1px; border-width: 1px; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; font-size: 12px; } #menu3 li a { height: 32px; voice-family: "\"}\""; voice-family: inherit; height: 24px; text-decoration: none; } #menu3 li a:link, #menu3 li a:visited { color: #325084; display: block; background: url(menu3.gif); padding: 8px 0 0 10px; } #menu3 li a:hover { color: #627EB7; background: url(menu3.gif) 0 -32px; padding: 8px 0 0 10px; } #affiliates { color: #325084; float: left; width: 580px; text-align: left; margin-left: 25px; margin-right: 15px; } #affiliates table td { padding: 15px; } Can you tell me how format that div? You're probably not going to fully understand what I'm asking, because I can't describe things well, but just try. Okay? I've seen websites that have the navigation on the left side in a panel. And when you click a link on there, the page loads in the bigger panel on the right. But, the whole page doesn't reload (in other words only the big right panel reloads). I'm pretty sure they use CSS for that, not frames. Because when I look at the code on those certain pages, I can see that they use style sheets. Are you still following? My question to you is, how do you target the link to shoot into that panel??? I can't figure it out. Maybe you can. Feel free to ask any questions. Later, a fellow geek (and proud of it!) ~Sam~ Marvelgirl@ameritech.net http://www.x-mencharacters.com I want to create a schema for different colored links. I'm stumped because I am pretty sure my syntax is correct, but it's not working correctly. I have created a class called "add" but my links in add are still showing up as the default. A portion of my css: Code: a.add:link{ color: #FFFFFF; text-decoration: none; } a.add:visited { color: #0000FF; } a.add:hover { color: white; text-decoration: underline; } My link using "add": Code: <a class="add" onclick="window.open('add_tnosc_password.jsp', 'window_one');" style="cursor:hand">Add</a> Hey all, I have a seemingly simple problem with my link and header styles that I keep thinking had a really obvious solution which I can't see, so maybe it will be glaringly obvious to someone on here! Notes: I'm a bit of a css beginner and I'm using Wordpress on my site. I want to style the link-attributes of a specific <h3> tag so it won't underline when hovered. (the current hover-decoration is specified in the overall a: styles of the website). Only thing is that I can't use a link class because the <h3> tag has only <?php the_category(', ') ?> inside, which displays and links to the relevent categories of a blog post. So how can I style the link without creating a link class?? Appreciate anyone's thoughts on this, Cheers! 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! PROBLEM: I create a nice button using the sliding doors technique for rounded corners. But the button displays with 100% width unless I float it. My layout requires that the buttons be inline with the text, so floating won't work. Anyone know an alternative? I wouldn't mind floating but I want the button to show inline with the text. When I use float:left, it removes it from the inline flow. Basically, I want a very modular button that can be used in several different places on a page. In many cases, floating is fine because the mockup has it out of the inline text, but I want to use it there, too. Here's the HTML: <a class="button" href="#"><span>Update Profile</span></a> Here's the css: a.button:link, a.button:visited { background:url(button_right.gif) no-repeat right top; } a.button span:hover, a.button span:active { background:url(button_left_hover.gif) no-repeat right top; } a.button span { background:url(button_left.gif) no-repeat left top; color:#fff; cursorointer; display:block; height:20px; line-height:20px; margin:0 2px 0 0; padding:0 10px; position:relative; white-space:nowrap; } |