I need some CSS Support |
I need some CSS Support |
Apr 9 2009, 08:42 PM
Post
#1
|
|
![]() Coming from Illinois ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 319 Joined: Mar 2009 Member No: 718,627 |
How do you style text to be like newspaper style? Here's what I mean (photoshopped)
![]() all within the same div (because I only want one scrollbar) |
|
|
|
![]() |
Apr 9 2009, 09:20 PM
Post
#2
|
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 1,237 Joined: May 2008 Member No: 648,123 |
within the same div without using separate divs inside is somewhat possible, but it's a little bit of an ugly result.
CODE <style type="text/css"> div { height:300px; margin:0 auto; overflow:auto; width:500px; } p { float:left; margin:10px; width:210px; } </style> <div> <p>text</p> </div> it unfortunately won't look exactly like a newspaper column, as each paragraph will be next to one another, rather than going down, then starting a new column. the issue is because if you have the text within a scrolling div, the browser won't know when to start a new column, unless you use divs nested within divs, like this: CODE <style type="text/css"> .main { height:300px; margin:0 auto; overflow:auto; width:500px; } .column { float:left; height:600px; margin:10px; width:210px; } </style> <div class="main"> <div class="column"> <p>text</p> </div> <div class="column"> <p>text</p> </div> </div> of course, you'd just have to change the heights and widths to what you're looking for. edit: if this wasn't for myspace, you could write a PHP script (or any script) that counts the number of characters or words in one column, then starts a new one. you can also do columns in CSS 3, if everyone who visits your profile uses a browser that supports CSS 3. |
|
|
|
Apr 9 2009, 09:47 PM
Post
#3
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 69 Joined: Jul 2008 Member No: 668,177 |
profile 1.0 or 2.0?
|
|
|
|
Apr 9 2009, 09:55 PM
Post
#4
|
|
![]() Coming from Illinois ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 319 Joined: Mar 2009 Member No: 718,627 |
|
|
|
|
Apr 10 2009, 05:11 AM
Post
#5
|
|
|
Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 |
Can't you construct two tables next to each other inside a DIV or something?
|
|
|
|
Apr 10 2009, 07:26 AM
Post
#6
|
|
![]() Coming from Illinois ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 319 Joined: Mar 2009 Member No: 718,627 |
|
|
|
|
Apr 10 2009, 04:06 PM
Post
#7
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 69 Joined: Jul 2008 Member No: 668,177 |
you can also use divs.
Use padding so that they won't look really crunched together. You should style the first div with float:left; along with more properties to fit your needs. |
|
|
|
![]() ![]() |