[SOLVED] CSS border

This is a discussion on "[SOLVED] CSS border" within the Web Page Design section. This forum, and the thread "[SOLVED] CSS border are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jan 5th, 2008, 11:50
Junior Member
Join Date: Dec 2007
Location: london
Age: 36
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] CSS border

Hi all,

I have tried to search this forum for my question but get the message, seach string needs to be 4 charactors or above. Maybe this is due to the first word only containing 3 letters?

www.usbtvtuner.co.uk


I am trying to create a border around my 3 images on the left of the page like the borders around the images in the grey boxes. Can anyone advise on the code please?

Also when I tried to resolve this matter before posting on the forum I noticed that the top grey box has width and height options within the index.html page wheres the second box does not. Also there is the option to change the width and height of the first box in the CSS which at the time appeared to be different to that on the index.html.

Regards. John.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 5th, 2008, 13:21
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS border

Just add the following around the image:
HTML: Select all
<div class="thumb">
<!-- image here -->
</div>
Then, change your CSS a bit. Like this:
Code: Select all
.thumb {
background:none;
border:1px solid #D4D4D4;
color:#FFFFFF;
float:left;
margin:0pt 15px 15px 0pt;
padding:5px;
I removed some unnecessary styles that were messing it up.

Cheers
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)

Last edited by Stuart; Jan 5th, 2008 at 13:25.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 5th, 2008, 18:26
Junior Member
Join Date: Dec 2007
Location: london
Age: 36
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS border

Thanks Stuart,

I presume I add the code above the following code?

<img

src="../tn/tn_encoder440.jpg" alt="Play"

width="96" height="94" border="0" align="left"/>Lorem ipsum dolor


When I changed the tumb statement the CSS disappeared around the organge boxes, any ideas?

Regards. John.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jan 5th, 2008, 19:01
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS border

Here is what you do:
HTML: Select all
<div class="thumb">
 <img  src="../tn/tn_encoder440.jpg" alt="Play"  width="96" height="94" border="0" align="left"/>
</div>
Then, replace the current .thumb CSS with this:
Code: Select all
.thumb {
background:none;
border:1px solid #D4D4D4;
color:#FFFFFF;
float:left;
margin:0pt 15px 15px 0pt;
padding:5px;
And that should be it.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jan 5th, 2008, 19:05
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS border

Hi Jonathon

As stuart said in his above post in your html code it would look like this.

HTML: Select all
<div class="thumb"><img  

src="../tn/tn_encoder440.jpg" alt="Play"  

width="96" height="94" border="0" align="left"/><div>Lorem ipsum dolor
and replace your .thumb in your css file with what stuart posted.

that should do it.

Pat

damn!, to slow again

Last edited by dab42pat; Jan 5th, 2008 at 19:06. Reason: too slow
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jan 5th, 2008, 19:11
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,788
Thanks: 0
Thanked 16 Times in 16 Posts
Re: CSS border

Just to let you know, the "align" attribute is depreciated in HTML.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jan 5th, 2008, 19:21
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS border

Good point, Marc. So, do the following instead:
HTML: Select all
<div class="thumb">
 <img  src="../tn/tn_encoder440.jpg" alt="Play" width="96" height="94" border="0" class="alignleft" />
</div>
And here's the CSS:
Code: Select all
.thumb {
background:none;
border:1px solid #D4D4D4;
color:#FFFFFF;
float:left;
margin:0pt 15px 15px 0pt;
padding:5px;

.alignleft {
float:left;
}
And that's all you need.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jan 5th, 2008, 19:26
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS border

I think what jonathon has done is he has copied and pasted certain parts of his code as he now has 14 errors.
His page validated before he posted this thread.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jan 5th, 2008, 19:33
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS border

Well, the code from my last post up there is valid, so if he uses that, there shouldn't be any errors.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] border-radius RZX Developer Web Page Design 19 Dec 15th, 2007 23:32
Border to a form paddywhack Web Page Design 3 Feb 7th, 2007 13:44
Apache FOP Border davedran Other Programming Languages 0 Dec 18th, 2006 15:28
Why only one border? timmytots Web Page Design 1 Nov 30th, 2005 21:32
CSS Border Question! freebirdnz Web Page Design 2 Nov 23rd, 2004 17:51


All times are GMT. The time now is 01:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42