This is a migrated thread and some comments may be shown as answers.

H1 Tag in TitlebarTemplate

3 Answers 101 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Haderach
Top achievements
Rank 1
Haderach asked on 07 Oct 2008, 03:48 PM
Hello,

I am trying to use a H1 tag in a TitlebarTemplate of a RadDock.
My problem is that the H1 style I defined in my CSS file is not applied.

If I put the H1 tag outside RadDockZone it is working well.

Is there anything is the Dock skin which prevent the style to be applied?

How can I define H1 tag style in the TitlebarTemplate ?

Thank you for your help,

Read you soon

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 08 Oct 2008, 01:33 PM
Hello Haderach,

The use of H1 in the titlebar template is not recommended, because this will make your code non-semantic. RadDock is a reusable control and you may have several docks on the page, while in standards compliance mode you cannot have more than one h1 on the page.

However, if you want to use h1 in the titlebar of the dock, you may try the following - force your the h1 settings with !important flag, as they may be overridden by RadDock, i.e:

h1
{
    color: red !important;
}


If this does not help, please, open a new support ticket and send us a small running project, along with your custom styles and RadDock and we will try to fix this for you.

All the best,
Martin Ivanov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Haderach
Top achievements
Rank 1
answered on 09 Oct 2008, 09:23 AM
Sorry but it doesn't work....

I have just posted a support ticket.

Thanks you for your help.
0
Accepted
Petio Petkov
Telerik team
answered on 13 Oct 2008, 12:39 PM
Hi Haderach,

We already answered in your support ticket. For your convinience I paste our answer here.


Actually the h1 was there, but due to purely CSS behaviour it was not visible, because as a block element it fell on a new line. That was caused by the image before it (<img /> is an inline element), and also that <h1 /> is nested within a <span />, which is infact invalid code. To put the things to work, I:

1. Set the image from inline to block element and float it to the left
2. Set float: left to the heading tag and reset its default padding and margin

Here is the additional CSS you have to use:

h1
{
 padding: 0;
 margin: 0;
 float: left;
}

.rdTitlebar img
{
 display:block;
 float:left;
}


Regards,

Petio Petkov
the Telerik team

 


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
Haderach
Top achievements
Rank 1
Answers by
Martin
Telerik team
Haderach
Top achievements
Rank 1
Petio Petkov
Telerik team
Share this question
or