41 Replies - 3626 Views - Last Post: 13 August 2009 - 09:49 AM
#1
image as a link, but with no border
Posted 08 August 2009 - 06:36 PM
Replies To: image as a link, but with no border
#2
Re: image as a link, but with no border
Posted 08 August 2009 - 06:41 PM
<a href=""><img src="image.jpg" border=0></a>
CSS:
border-style: none;
** Renamed title to be more descriptive **
#3
Re: image as a link, but with no border
Posted 08 August 2009 - 07:27 PM
Here's the code from the page with the image:
<div id="read_more_button-crusher"> <a class="links1" href="Start-2.htm" > <img src="Images/readmore-button.png"/> </a> </div>
and here's the segment from my css file for that class:
.links1
{
margin:0;
border-style: none;
}
what did I bork here?
#4
Re: image as a link, but with no border
Posted 08 August 2009 - 07:29 PM
<img class="links1" src="Images/readmore-button.png"/>
It isn't the href that you want to specify the class for, it's the image.
#5
Re: image as a link, but with no border
Posted 08 August 2009 - 07:32 PM
no2pencil, on 8 Aug, 2009 - 06:29 PM, said:
<img class="links1" src="Images/readmore-button.png"/>
It isn't the href that you want to specify the class for, it's the image.
yeah, really simple. I knew it was something simple. Thanks for the reset kick, no2pencil. Gotta love how sometimes ya can't see the trees for the forest.
#6
Re: image as a link, but with no border
Posted 08 August 2009 - 07:34 PM
At least you know you were in the right direction
#7
Re: image as a link, but with no border
Posted 09 August 2009 - 10:19 AM
img {
border:0px;
}
I have NEVER come across a place where I actually wanted the border to I just turn it off for all images by default.
#8
Re: image as a link, but with no border
Posted 09 August 2009 - 12:20 PM
img { border:0; }
.link-img { border:0; }
<img class="link-img" src="URL" />Works fine for me.
#9
Re: image as a link, but with no border
Posted 09 August 2009 - 05:15 PM
Though I seem to have encountered a new annoyance.
Outriders Members
If you look at the page, you'll see the black footer div with the various logos in it. That is supposed to be the bottom of the page. Now, I said that is supposed to be the bottom, not be at the bottom.
here's an example of what I mean:
Welcome to the Outriders
So I guess my question is what's giving me all that extra space at the bottom of the page?
Here's a link to the CSS file for convenience:
Outriders CSS file
#10
Re: image as a link, but with no border
Posted 09 August 2009 - 10:54 PM
In your CSS file. Change the following:
From:
#Toon-image
{
position:relative;
top:-675px;
left:400px;
}
To:
#Toon-image
{
position:relative;
margin-top:-675px;
left:400px;
}
This post has been edited by J0K3R: 09 August 2009 - 11:10 PM
#11
Re: image as a link, but with no border
Posted 10 August 2009 - 12:31 AM
img {
margin: 0px;
padding: 0px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}add this code in your css file
#12
Re: image as a link, but with no border
Posted 10 August 2009 - 12:37 AM
#read_more_button-crusher .links1 img {
margin: 0px;
padding: 0px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
#13
Re: image as a link, but with no border
Posted 10 August 2009 - 10:35 AM
Just get rid of it - I don't even see the reason in having it (it takes ages to load).
Try removing any of the fat (set padding to 0 and margins as well, unless you are using them).
Also, avoid positioning - it is tricky to get exact results if in-experienced.
I really am trying to help - its just that its hard to understand what you are doing (the coding is hard to read).
img { padding:0; margin:0; border:0 }
... cutting the fat also, you can use an image for lists with CSS.
li { background: url('URL') no-repeat }
you will have to add the left padding to suit - perhaps margin will do
This post has been edited by Quin: 10 August 2009 - 10:40 AM
#14
Re: image as a link, but with no border
Posted 10 August 2009 - 12:42 PM
Quin, on 10 Aug, 2009 - 09:35 AM, said:
Just get rid of it - I don't even see the reason in having it (it takes ages to load).
Quote
Also, avoid positioning - it is tricky to get exact results if in-experienced.
well, the only way to become experienced is to experiment, right? What other option is there for layering?
Quote
How so? I thought I had the CSS file pretty well formatted to make it easier to read.
Quote
li { background: url('URL') no-repeat }
you will have to add the left padding to suit - perhaps margin will dookay..... I don't have a clue what that is in reference to.....
#15
Re: image as a link, but with no border
Posted 10 August 2009 - 02:10 PM
There are two types of layout that I see fit; busy and clean.
(I've just named them now).
Busy layouts would have lots of content, clean would have a simple design.
Busy layouts would benefit more from being tabular based (using tables) and clean using div layering.
For div layering (that's what I am calling it) what I find beneficial is using main layers then nesting other layers in them (usually only a few layers in each layer, and only going so far down).
<body>
<div id="container">
<div id="header">
<div id="navigation">main navigation</div>
</div>
<div id="content">
<div id="menu">this would just be a floating side menu</div>
PAGE CONTENT
</div>
</div>
<div id="footer"></div>
</body>
With this example, I can set the container to be centre aligned with margin:0 auto; in its styling, and it would be displayed in the centre of the screen, despite resolution. I would also use float:right; to make the menu layer float to the top right of the content area.As for the footer, I can imagine that to be exactly like yours.
#footer {
position: absolute;
bottom: 0;
background: #000;
width: 100%;
height: 50px;
text-align: center;
padding: 0;
margin: 0;
}
Finally, as to your CSS. It seems very busy.
You seem to have many different styles, which I didn't even read to see if they were similar. I usually find a way to have my HTML short and simple, referring all styling to the stylesheet (with it all being there). Also, to reduce my CSS so it covers every aspect so that I do not get any surprises (even when styling the headers - I set the paddings and margins, font sizes, colours; the same with links). With the links, for example, if I have anything different, I change the one thing.
a:link { color:blue; text-decoration:none; }
a:hover { color:blue; text-decoration:line-through; }
a:link { color:blue; text-decoration:none; }
a:hover { text-decoration:line-through; }
Hope that helps
EDIT: I've just thought of something. Perhaps the problem lies with position:relative. Try changing it to absolute. I think it is causing that space afterwards to normal go there, but you are forcing the content up, leaving the area empty (put waiting).
This post has been edited by Quin: 10 August 2009 - 02:18 PM
|
|

New Topic/Question
Reply



MultiQuote





|