473,770 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image Links Surrounded By Background....

4 New Member
I have coded my css so that my text links have a background and border which I want to keep but I cant seem to edit the css so that my image links dont have the same thing....

http://www.teenagedq.f orever-in-love.org/blends.php

If you click on the link that says leonardo dicaprio the java script will come up that shows the blend but the close button on the java script is surrounded by the same background and border as my text links... is there a code I need to put in my css to stop this happening ?

The navigation part of my css looks like this if it helps .... (the numbers are not a part of the css)

Expand|Select|Wrap|Line Numbers
  1.  
  2. #navigation {
  3. margin: 0;
  4. padding: 0;
  5. list-style-type: none;}
  6.  
  7. #navigation li {
  8. margin-bottom: 2px;}
  9.  
  10. #navigation a, a:link, a:active, a:visited {
  11. background: #ff99cc;
  12. color: #cc0066;
  13. display: block;
  14. border-bottom: 1px solid #cc0066;
  15. border-left: 5px solid #cc0066;
  16. border-right: 5px solid #cc0066;
  17. width: 208px;
  18. padding-left: 10px;
  19. text-align:left;}
  20.  
  21.  
  22. #navigation a:hover {
  23. background: #cc0066;
  24. color: #ff99cc;
  25. text-decoration: none;
  26. border-left: 5px solid #ff99cc;
  27. border-right: 5px solid #ff99cc;
  28. padding-left: 10px;
  29. }  
Sep 6 '08 #1
5 1952
Dormilich
8,658 Recognized Expert Moderator Expert
try
Expand|Select|Wrap|Line Numbers
  1. #navigation a, #navigation a:link, #navigation a:active, #navigation a:visited { /* line 9 */
you defined the style for all links with :link, :active, and :visited (not only the ones for navigation).

regards
Sep 6 '08 #2
EmmaEliza
4 New Member
try
Expand|Select|Wrap|Line Numbers
  1. #navigation a, #navigation a:link, #navigation a:active, #navigation a:visited { /* line 9 */
you defined the style for all links with :link, :active, and :visited (not only the ones for navigation).

regards

that takes the box away on the text links aswell...
is there any sort of code that makes a rule for images like the
a:link, a: active, a:visited like a a:img where you set the preferences for image links ?
Sep 6 '08 #3
Dormilich
8,658 Recognized Expert Moderator Expert
that takes the box away on the text links aswell...
is there any sort of code that makes a rule for images like the
a:link, a: active, a:visited like a a:img where you set the preferences for image links ?
two possibilities:
1) extend the style to the content div
Expand|Select|Wrap|Line Numbers
  1. #navigation a, #navigation a:link, #navigation a:active, #navigation a:visited, #content a, #content a:link, #content a:active, #content a:visited { /* line 9 */
2) or define the lightbox link like you want it to be (id of the anchor is bottomNavClose)
Expand|Select|Wrap|Line Numbers
  1. #bottomNavClose, #bottomNavClose:visited, #bottomNavClose:link, #bottomNavClose:active, #bottomNavClose:hover {
  2.   /* your definitions here */
  3. }
regards
Sep 6 '08 #4
EmmaEliza
4 New Member
I tried the 2nd one first as it looked easier and it worked I think or it just covered the pink thing up =], what do I do for it to work with other images ?
Sep 6 '08 #5
Dormilich
8,658 Recognized Expert Moderator Expert
what do I do for it to work with other images ?
shortly, the first option. to make it not too crowded apply it not to every id but to a class and attach the class everywhere you want the links styled in pink.

regards
Sep 6 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3487
by: Chris Beall | last post by:
I'm displaying an image that is also a link against a black background. In Netscape 7.1, the current background color is displayed as a horizontal bar below the image. This allows :hover effects that change the background color to have a visible effect, as this bar changes color. By default, it appears that the color is inherited from the body color, i.e. with no link style applied, the bar is black, and invisible against the background....
3
5632
by: Mark Tranchant | last post by:
On my site, I use a background image of a small arrow to denote links that lead away from my site. This page has four such links in the first section: http://tranchant.plus.com/notes/cable-wrap The links are coded thus: <a class="external" href="url">blah</a>
15
3098
by: Applebrown | last post by:
I've got a couple of errors on my site that I'm not sure how to fix. I'm using simple CSS for both text rollovers and my horizontal navbar, and here's what happens. First, the site: www.sunbadgeco.com/sunmetal/index.htm #1 { In IE6, rolling over an image in the navbar makes it "light" up. Clicking on the image takes you to another page (which is not finished). Then clicking the Back button keeps the image you just clicked on "lit" up,...
3
18846
by: MediaDesign | last post by:
so there's the problem: my text links have background images and when I put links around images on my page, they too get the background image treatment which I do not...I have tried several possible solutions and nothing has worked: my html code: <div class="borderCCC"> <div class="clients"><a href="../index.html"><img
14
11096
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin = window.open('images/KJV-THANKS.gif', 'Thanks', 'width=243,height=420,'); cwin.focus();
4
3056
by: lindsey.crocker | last post by:
I have this links list with background images set on them which changes when they roll over. The <td> is set valign="middle" however as soon as you apply the rollover to the link, the text jumps to the top of the <td> instead of staying middle. I can not put padding on the top as some links are 2 lines and some are 1 line.
1
3307
by: RJ | last post by:
Hello! I am trying to lay out a left navigation column with a background image, where the left nav column runs the entire scrolled height/length of the page. The float:left column layout works fine, but the background image doesn't continue downward in this column below the links. I tried this in FireFox 1.0.7 and IE6, but this image stops where the last link stops. I want the background all the way to the bottom. How can I force...
3
4980
by: Greg Heilers | last post by:
Hello everyone... If one has a <div> that is completely filled with a background-image; how does one style it so that the image *continues* to fill the <div> top-to-bottom, left-to-right; if the viewer adjusts the font-size on his browser? I have everything sized in em's, so that the actual <div> "box" resizes along with the text, but the background-image will not resize if the text is "zoomed". I can not find anything pertaining
7
1692
by: Dan Nash | last post by:
Hi I'm trying to create an external stylesheet for use in my Web App. It works fine, and I've got it linked and everything. The only problem is the "background-image" property isn't working. I've selected the iamge through VS, and its in the _images/ subdir. The code that VS created is as follows: background-image: url(_images/back.jpg) Yet it doesn't work. The image appears in the CSS style editor, but when I run my app in the...
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.