CSS - Setting Link Target
is there a way to set the target of a class of links using css?
the html : target="_blank" is not xhtml compliant. Similar Tutorialsnew at this - learning the rope. baby steps. is there a way to set a link target to open the link in another div on the page? On my site I'm trying to have a messageboard within a CSS Div. While the phpBB/database is on a remote server, I think it would be easier to have it appear within the main div. Is there a way to do this? If not, I'm just going to make the messageboard appear in a new window. Thanks... I'm trying to combine Code: a img and Code: a:after So I'm trying to set :after for links that have images in them...I have no idea how to do it. This doesn't work: Code: a img:after This doesn't work either: Code: a>img:after I'm not sure if its my browser's lack of support for CSS again or just me. Is it possible to set link styles that are defined inside of a heading tag... for example, h1 a:link{bleh} h1 a:visited{bleh} h1 a:hover{bleh} I tried it... but it doesn't want to go, I'm thinking I might have to think of another solution Hi! How do I open a link in a new window in XHTML strict? (knowing that target="_blank" forbidden). Thank you Hey, I've run into a problem where I though i knew how to do it an easy way but it only worked for about 5 minutes. Here is what I have. All of my pages have the same navigation from an external PHP file. The style is saved in the main.css stylesheet. When you select a link it gets a background image. I thought that I could save my self having to edit every page for IE by doing this in the main.css stylesheet Code: * html>#navwhatever{ /*set to gif iamge instead of PNG image*/ background-image:url('image/splash_legion.gif'); } This doesn't work. It still uses the PNG images. I'd realy like not to have to edit every page to fix my site for IE, any suggestions would be great. Thanks for reading *insert newbie stuff here* got something i want to do in css that i dont even know if its possible. last time i did was in php and forgot how.lol. ok i have a side box div that i want to put links to images in and i want the images to load in another div box on the same page. so it opens the photo, just in a certain place on the page (in div id or position:absolute) is this possible in anyway? On this page (FAQs.html) I'm using css Code: Original - css Code *:target {background-color: #ffff00;} *:target {background-color: #ffff00;} to get the yellow highlight on the corresponding Q/A when you click a question. Works great in FF2, Opera, Chrome, Seamonkey, and Safari. But of course IE7 has to be a problem. It doesn't work in IE7. (Don't know about IE6, don't have that to test it on.) I've been Googling for a way to implement this effect in IE but haven't found anything. Any ideas? Thanks, Ez P.S - the text on the FAQs page is just dummy-text until i get the real content to insert. I'm using frames and I want all my anchors to launch in a separate frame. Right now I'm doing: Code: <a href="http://example.com" target="MAIN">example</a> Can I put something in my stylesheet that will automatically launch all links in the "MAIN" frame? Thanks. I'm struggling to target some headings in ie 6. They need more padding on the top as they look slightly chopped. www.efficient-heat.net/services The headings are Power Flushing and Condensing Boilers I've had a look at them in internet explorer developer toolbar and i'm seeing several paddings being applied. This suggests a conflict in the cascade. I've given the styling for the Power flushing header rule !important but that doesn't work. The headings look ok in ie 7 and ff3 How do I target these titles for styling in ie6? Hi all, I am developing a website and kiosk display hardware. I want to target the kiosk display using a specific stylesheet. What is the best way? @media display and height:??px and width ??px or using @media ???kiosk??? etc. What other specifics can I target to define which style sheet is used? Thanks for any help. Dale. Hi all, I'm trying to use CSS to apply style to ONLY images that are within paragraphs on my site. Code: <p> <img ... /> </p> In the past, some time ago, I thought I learned that "p img {...}" would accomplish what I'm trying to to. However, it applies the style to all images, not just images within paragraphs... Any one know any other methods? I have a couple hundred images already coded in, so just simply applying a class to the previous images isn't something I'd like to do. Thanks much, dbeg. Hi, How can I target the last element of a list. The number of items in the list is not always four. Thanks Code: <div id="mainmenu"> <div class="mod_menu"> <ul> <li>first</li> <li>second</li> <li>third</li> <li>last</li> </ul> </div> </div> Is there an equivalent to the target attribute in XHTML strict for anchor tags? 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; } http://tinyurl.com/5llwfl I'm having some problems with this page in particular. Try clicking on one of the Left or Right white image arrows below the main picture. This only occurs in Firefox 2.x. Once you click the link, the content area below "Starting from $278.497" should shift roughly 5 pixels down. I thought it may be related to the dotted link outline that surrounds the image, but that was not the case. I applied styles to get rid of that and there was no changes. I also thought it may be related to a position:relative; bug which this site has been notorious for. I tried making certain divs in that area position:relative to no avail. So to test further I tried an overall #content *{position:relative;} fix which could not fix the position shift, either. I'm not sure what else it could be. And while I do have access to the build of this app, I have not been able to reproduce the issue by downloading all HTML, CSS, and image files locally. Hello Is there a way i can restore my <a href> link back to its original color, that is before the a:visited event, when I click on another link? PS. no Javascript code needed, is their an alternative in css? I have my links defined with a dashed border, but I don't want this on linked images and I'm trying to figure out if I can accomplish this with CSS only without additional markup in my HTML file. Here is a sample file: http://www. shawkey.com/test/imagebordertest.html Any suggestions on how I can get the dashed border to not appear below the image and only appear below the text with just CSS? I need to have a div element with borders that use background image as border corner background. div must be able to expand in height and width automatically. How can I achieve this? Grrr for some particular reason in Firefox and IE div.userinfo wont stay to its assigned width.. what it is doing is that its expanding its width to fill up the text.. but.. it should just break to a new line. html Code: Original - html Code <div class="container"> <div class="subject">this is for your subject</div> <div class="userinfo">Your memosfasdfasdfasdfasdfasdfasdfasdfsadfasdfasdfsadfasfasdfsadfsadfasdfa</div> </div> <div class="container"> <div class="subject">this is for your subject</div> <div class="userinfo">Your memosfasdfasdfasdfasdfasdfasdfasdfsadfasdfasdfsadfasfasdfsadfsadfasdfa</div> </div> css Code: Original - css Code div.container { border: 1px solid #000000; position: relative; margin: 0 auto; width: 580px; height: 432px; } div.subject { position: absolute; border: 1px solid #cccccc; top: 0px; left: 290px; width: 290px; height: 50px; } div.userinfo { position: absolute; border: 1px solid #cccccc; width: 15px auto; height: 150px; } div.container { Anyone knows why? i even changed white-space: nowrap, and etc. |