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. |
|
|
|
Medi I need some CSS Support Apr 9 2009, 08:42 PM
PeRRiiN profile 1.0 or 2.0? Apr 9 2009, 09:47 PM
Medi QUOTE(PeRRiiN @ Apr 9 2009, 09:47 PM) pro... Apr 9 2009, 09:55 PM
Mike Can't you construct two tables next to each ot... Apr 10 2009, 05:11 AM
Medi QUOTE(Mike @ Apr 10 2009, 05:11 AM) Can... Apr 10 2009, 07:26 AM
PeRRiiN you can also use divs.
Use padding so that they wo... Apr 10 2009, 04:06 PM![]() ![]() |