|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
some problems with CSS across browsers
Hello,
I have a couple of questions I would love answers to that I've been accumulating and trying to solve myself without much luck ![]() 1. Does anyone know how I set the BR tag in CSS for changing line heights. In IE5.5 and Opera BR seems to put a line space between, but Mozilla doesn't and I would like it to do this consistently. I need BR because my form based PHP code inserts BR automatically for each new line (which is what I want), I've tried such things as BR{line-height: 2em;} but nothing seems to work. Just to qualify this, I have put in the following in an included stylesheet that seems to make Mozilla remove the line break: BR {display: block } but cannot see how this is causing the problem. 2. Is there a way of making background images in style sheets actually be incorporated into the element for sizing purposes. What I mean is, as an example, if I set the background of a table cell to have a background image when I resize the form to be smaller than the image, the image crops, but if the image was an image element or the actual content of a TD then it isn't cropped. thanks. Last edited by retroman : June 2nd, 2003 at 09:24 AM. |
|
#2
|
||||
|
||||
|
1. <br> is an inline element and line-height needs to be applied to the containing block element.
Code:
<p style="line-height:2em;">foo<br>bar</p> |
|
#3
|
|||
|
|||
|
The problem is that applies to the whole block, all I want to do is reduce the size of the paragraph break and leave the normal wrapped text as it is. I'm sure it could be done by replacing all the <br /> elements in code with something like '<p class="smalllinebreak"> but I'd rather just take the content from the mySQL table and output it.
There has got to be something that formats BR as in my browser BR changes to a 1em line space and so must be a way of chaning this, as I want to make this 0.5em? Neil. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > some problems with CSS across browsers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|