none
Removing the s4-titlerow Div will break my team site, while it will work well for the community site

    Question

  • To better utilize my web page space, I want to remove the hole title Div, so using the developer tool I capture that the Div which is responsible for the tilte is named s4-titlerow inside the seatle.master page.

    But if I remove the whole s4-titlerow Div the web page for my team site will break and I will get the following error “Sorry, something went wrong”. Any idea why it is happening.

    Baring in mind that inside my community site if I remove the same s4-titlerow , I will NOT get an error and the title will be removed successful.

    Thanks in advance for any help.

     

    Monday, September 02, 2013 12:39 PM

Answers

  • Don't actually remove the DIV from the masterpage.  Instead just apply some custom CSS to the Div to make it hidden by applying Display:None.  That way it will still be on the master page so items in the team site that populate it will still be able to find it.  But it won't show in the display.

    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Monday, September 02, 2013 1:00 PM

All replies

  • Don't actually remove the DIV from the masterpage.  Instead just apply some custom CSS to the Div to make it hidden by applying Display:None.  That way it will still be on the master page so items in the team site that populate it will still be able to find it.  But it won't show in the display.

    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Monday, September 02, 2013 1:00 PM
  • i have added the following to m seatle.master page :-

    <head runat="server">
    <style type="text/css"> div#s4-titlerow{ display: none;} </style>
    <style type="text/css"> div#siteIcon{ display: none;} </style>
    <meta name="GENERATOR" content="Microsoft SharePoint" />
    

    but it did not hide the title row ?

    Monday, September 02, 2013 1:48 PM
  • That would be because the display style on that row is actually set inline to display:block.  You'll need to create a custom master page or implement Javascript/JQuery to change it.  If you look you'll see that your setting in the header is being overwritten by the inline setting.

    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.


    Monday, September 02, 2013 6:36 PM
  • That would be because the display style on that row is actually set inline to display:block.  You'll need to create a custom master page or implement Javascript/JQuery to change it.  If you look you'll see that your setting in the header is being overwritten by the inline setting.

    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.



    Thanks for the reply. but can you provide more details about this , and what approaches i can follow to hide the DIV in this case ?
    Tuesday, September 03, 2013 9:32 AM
  • As I said.  The only way to change an inline style on the master page is either to edit the master page itself and create a custom master or to have Javascript make the change at run time.  I'm not sure what additional details you are looking for.

    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Tuesday, September 03, 2013 11:18 AM