Site Reference Forums

You are not logged in.

#1 2007-11-26 01:53:36

laurie_m
Member
From: Bega, Sapphire Coast Australia
Registered: 2005-08-18
Posts: 1377
I've been thanked 30 times.

Thank me Website
Buy me a beer

Image Without Border

G'day.

I have some css code which gives a border on all images on the page:

Code:

img {
        padding: 0px;
        display: inline;
        border: solid black 1px;
        }

Code:

p.right_350 {
        float: right;
        text-align: center;
        width: 350px;
        margin: 0 0 2px 7px;
        color: #666666;
        }

Code:

<p class="350_right"></p>

Works like a charm.

Trouble is, now I need to add some logos to the pages and I can't stop the borders. See Sapphire Coast News link in my signature.

I've tried a few things including:

Code:

img noborder_200: {
        padding: 0px;
        margin: 0 7px;
        border: 0;
        width: 200px;
        }

Code:

<img noborder_200 src='http://www.sapphirecoastnews.com/wp-content/uploads/2007/11/mission_logo_01.jpg' alt='Mission Australia Logo' />
<img noborder_200 src='http://www.sapphirecoastnews.com/wp-content/uploads/2007/11/mission_logo_02.jpg' alt='Mission Statement' />

Doesn't work. Any help, please? roll

Thanks,
Laurie.

Last edited by laurie_m (2007-11-26 01:55:02)


John McDouall Stuart - Explorations in Australia
First Expedition Second Expedition Third Expedition Fourth Expedition

Online

 

#2 2007-11-26 02:21:39

Northie
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2592
I've been thanked 62 times.

Thank me Website
Buy me a beer

Re: Image Without Border

Code: html

<img src='logo.png' alt='' title='' style='border:0px none;' />

Now taking free-lance inquiries; Please contact me for more details
Internet Marketing Books
Promote Yourself on Site Reference!

Offline

 

#3 2007-11-26 02:52:24

laurie_m
Member
From: Bega, Sapphire Coast Australia
Registered: 2005-08-18
Posts: 1377
I've been thanked 30 times.

Thank me Website
Buy me a beer

Re: Image Without Border

Thanks Northie. Works like a charm. You're a lifesaver. storstark

Regards,
Laurie.


John McDouall Stuart - Explorations in Australia
First Expedition Second Expedition Third Expedition Fourth Expedition

Online

 

#4 2007-11-26 04:01:01

Northie
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2592
I've been thanked 62 times.

Thank me Website
Buy me a beer

Re: Image Without Border

As with a lot of CSS stuff; the 0px part will fix it in some browsers and the none part will fix most of the rest


Now taking free-lance inquiries; Please contact me for more details
Internet Marketing Books
Promote Yourself on Site Reference!

Offline

 

#5 2007-11-26 04:06:20

nybc
Member
Registered: 2006-12-15
Posts: 162
I've been thanked 6 times.

Thank me Website

Re: Image Without Border

Northie wrote:

Code: html

<img src='logo.png' alt='' title='' style='border:0px none;' />

but this code adds css styles inside the html-tags.

The mistake is, you didnīt define classes.

<img class="noborder_200" ... would work, and for the css:

img.noborder_200: {

thatīs my advice.

Offline

 

#6 2007-11-26 04:37:01

laurie_m
Member
From: Bega, Sapphire Coast Australia
Registered: 2005-08-18
Posts: 1377
I've been thanked 30 times.

Thank me Website
Buy me a beer

Re: Image Without Border

Aah! So there's where my mistake was:

Code:

img.noborder_200: {

I left the dot out.

Thanks nybc.

Regards,
Laurie.

Last edited by laurie_m (2007-11-26 04:37:33)


John McDouall Stuart - Explorations in Australia
First Expedition Second Expedition Third Expedition Fourth Expedition

Online

 
Never
Sponsored Results


Board footer

Powered by PunBB
© Copyright 2002–2008 Rickard Andersson