Results 1 to 5 of 5

Thread: styling empty p tags

  1. #1
    Member sudhakararaog's Avatar
    Join Date
    Sep 2009
    Posts
    224

    Default styling empty p tags 19 Dec 2010 @ 20.06

    i am using the following for p tags
    p{
    margin: 0 0 8px 0;
    line-height: 18px;
    }

    with this each para has a line height and margin between paragraphs

    however in the html editor where the content is written when i add spaces empty <p></p> tags are being created by the editor and with the above style for p tags there is lot of unwanted vertical gaps being created

    is there a way to style empty <p></p> tag so that these vertical gaps will not be created



    also i am using a separate css for printing when i print in firefox i have set the url to print at top right and if the url is too long only a portion of the url is being printed, is there a way to print the entire url or is this a normal printer behaviour to print the url to whatever extent the width is available
     

  2. #2
    Senior Member Jason's Avatar
    Join Date
    Dec 2008
    Posts
    911

    Default 19 Dec 2010 @ 21.06

    Not really, you could use JavaScript but I would avoid it as people that have JavaScript disabled would still see this.

    Option 1: Use a different HTML editor.
    Option 2: If the source code is available you could change the way the editor handles line breaks.
    Option 3: You could write some form of script which processes your documents and replaces instances of <p></p> with something you could style better.

    I personally would go for option 1. Its simple and there are plenty of good HTML editors around who handle this better.
     

  3. #3
    Member sudhakararaog's Avatar
    Join Date
    Sep 2009
    Posts
    224

    Default 19 Dec 2010 @ 21.29

    i noticed that when i hit enter tiny mce editor is generating
    <p>&nbsp;</p>

    is there a way to change the editor settings to change <p>&nbsp;</p>
    to <br>
     

  4. #4
    Senior Member Jason's Avatar
    Join Date
    Dec 2008
    Posts
    911

    Default 20 Dec 2010 @ 07.09

    What version of TinyMCE are you running. I think it is out of date.
     

  5. #5
    New Registered User irfan96's Avatar
    Join Date
    Jan 2013
    Posts
    8

    Default 11 Jan 2013 @ 12.41

    p
    {
    margin: 0 0 8px 0;
    line-height: 18px;
    }


    you were using high value to the line-height. So the paragraph content has more vertical gap.

    you will have to reduce the line-height size.
     

Similar Threads

  1. Styling the Menu/NavBar
    By Wrams in forum HTML & CSS
    Replies: 21
    Last Post: 6 Dec 2011, @ 13.01
  2. styling table cell
    By sudhakararaog in forum HTML & CSS
    Replies: 2
    Last Post: 13 Jun 2011, @ 08.46
  3. Replies: 3
    Last Post: 27 Dec 2010, @ 12.35
  4. styling iframe
    By sudhakararaog in forum HTML & CSS
    Replies: 1
    Last Post: 7 Dec 2010, @ 01.38
  5. Question about styling
    By Dre in forum HTML & CSS
    Replies: 17
    Last Post: 24 Jul 2009, @ 16.11

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •