#1 (permalink)  
Old 09-24-08, 07:22 PM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
div span

I was wondering how can I space the span out?
PHP Code:

<div style='width:100%; display:block; text-align:center; '>

    <
span style='font-weight:bold; width:25%;'>Col 1</span>
    <
span style='font-weight:bold; width:25%;'>Col 2</span>
    <
span style='font-weight:bold; width:25%;'>Col 3</span>
    <
span style='font-weight:bold; width:25%;'>Col 4</span>
</
div
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Reply With Quote
  #2 (permalink)  
Old 09-27-08, 03:08 AM
Sdry Sdry is offline
Newbie Coder
 
Join Date: Sep 2008
Location: Belgium
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not sure you can this way, i think it would help you to larn valid xHTML.

I'd use floating div's.
Reply With Quote
  #3 (permalink)  
Old 09-27-08, 09:14 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
I tried that already with no luck. I tried to float them but they didn't want to work with me
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Reply With Quote
  #4 (permalink)  
Old 09-29-08, 04:15 PM
Dwagar's Avatar
Dwagar Dwagar is offline
Newbie Coder
 
Join Date: Sep 2008
Location: Ohio
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
The following code seems to work fine both in IE and firefox for me, seems if percentages are used it doesn't work correctly.

<div style='width:400px; display:block; text-align:center; '>
<span style='font-weight:bold; width:80px;float:left;'>Col 1</span>
<span style='font-weight:bold; width:80px;float:left;'>Col 2</span>
<span style='font-weight:bold; width:80px;float:left;'>Col 3</span>
<span style='font-weight:bold; width:80px;float:left;'>Col 4</span>
</div>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
div css theighost CSS 11 09-14-08 02:30 AM
put span / div tag inside <option> ?? ben777 CSS 1 07-26-08 12:42 PM
[SOLVED] Change content in a DIV with links in another DIV s1yfa JavaScript 3 05-04-08 04:10 AM
Can't Understand java script maverickminds JavaScript 1 07-16-06 01:23 PM
CSS Div + Span help Arctic CSS 5 07-20-05 04:27 PM


All times are GMT -5. The time now is 09:02 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.