Joint Blocks As Table Cells - how can i css that?

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

Joint Blocks As Table Cells - how can i css that?

Lozbo
I want some piece of paragraphs to ignore the space between them, and i dont know how to css that, i thought it could be "display:inline" but did not work...

I want this:

CODE

<p>text text text </p>
<p>text text text </p>
<p>text text text </p>


look like this:

CODE

<table border="0" cellpadding="0" cellspacing="0">
<tr><td>text text text</td></tr>
<tr><td>text text text</td></tr>
<tr><td>text text text</td></tr>
</table>


So that i can use different background colors for each paragraph, without having to break the design for sake of the parent background (like the body background color or something).

Thanks in advance.

 

 

 


Reply

Unregistered 015
Try this:
<p>
text text text <br>
text text text <br>
text text text <br>
</p>
or this
<p style="line-height:0.5">
text text text<br>
text text text <br>
text text text <br>
</p>
or the way you prefer:
<p style="line-height:0.5">text text text</p>
<p style="line-height:0.5">text text text</p>
<p style="line-height:0.5">text text text</p>

I dont know of any other way. You can adjust line height as you wish, but 1px is normal.

Reply

Lozbo
I certanly know that i can use <br /> to do so, i wanted independent <p>'s with different colors to be united without white space between them, not line breaks. And that "line-height" rule did not work either. Thanks anyway.

Reply

Tyssen
QUOTE(Lozbo @ Sep 7 2005, 07:58 AM)
I certanly know that i can use <br /> to do so, i wanted independent <p>'s with different colors to be united without white space between them, not line breaks

CODE
<p class="red">text text text </p>
<p class="blue">text text text </p>
<p class="green">text text text </p>

/* CSS */
p.red, p.blue, p.green { margin: 0; padding: 0; }
p.red { background: red; }
p.blue { background: blue; }
p.green { background: green; }

You might want to have some padding (other than 0) if you want some space around your text.

Reply

Lozbo
QUOTE(Tyssen @ Sep 6 2005, 04:32 PM)
CODE

... { margin: 0;... }

*


Dammit that was it! i swear i tried it! sad.gif blink.gif how could i miss it? thanks Tyssen! I would ask a moderator to close this...

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : joint blocks cells css


    Looking for joint, blocks, table, cells, css

Searching Video's for joint, blocks, table, cells, css
advertisement



Joint Blocks As Table Cells - how can i css that?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE