10 years ago
Topic

Hello,

I have a small problem using labels. In Content View I wanted to show labels, but since the text is too long it slips away to the next line under the label instead of being under the first word (of the field's content). See the attached link:

http://www.hakatedra.co.il/images/LABEL.png

Is it possible to fix it ?

Thank you all,

Ofer.

Get a Book for SEBLOD
148 Posts
pixelneco
10 years ago
0
Level 1

Hi ofer1984,


i never used labels, but guess default labels have a float, right? So just give the label a margin-bottom to fix it :)

10 years ago
9
Level 1

OOO...I just did something like this.  

You need to make a simple change to media>cck>css>cck.site.css

around line 84 

div.vertical div.cck_forms.cck_site div.cck_label { width: 225px; text-align: left; padding: 0px 0px 0px 0px; }
Change the width to whichever size you need. This will change the width of the label area.


-Dave

Don't forget to SOLVE this topic if this helps.

10 years ago
8
Level 2

Also, I believe you can go to the form designer page, click the square icon with the dot in the middle.  Just before the down arrow icon.  When you hover over it, you will see width + height. %.

The first column (I believe) will contain your labels.   So, if you need your label column to be larger, simply put a width in that first column for the fields you want to widen.  Doing it this way, you will have to change settings on each of your forms. (Admin, Site, Intro, Content) Doing it the way I earlier mentioned will work on ALL your forms.

10 years ago
7
Level 3

Hello everybody,

Thank you for replying so fast :) 

pixelneco I tried to change the margin bottum to fix it and it hasn't effected the margin of the label.

dniezby I searched for a similar code in line 84 and that's what i've found:

div.vertical div.cck_forms.cck_site div.cck_label { width: 145px; text-align: right; padding: 0px 0px 0px 0px; }

I guess it's because my website is RTL the text alignment is "right". 

So I changed the the width and later i played with the padding, but nothing has changed. (by the way i was affraid to try the second method, since i'm new to seblod and i didn't know exactly how to play with the width and hight).

What should i try next ?

Thank you all,

Ofer.





10 years ago
6
Level 4

I have confirmed this to work.  You need to force your browser to refresh most likely.  

Hold SHIFT then click the browsers refresh button.  That SHOULD do it. 

Let me know. 

10 years ago
5
Level 5

Hi dniezby,

I checked it on several computers with different browsers - changing parameters in the code line doen't "push" the text in the second line forward. I guess I'm missing somthing... Can you explain what does these parameters mean (if its not too complicated to ask)? Or maybe guide me in some other way? Because I know i'm missing somthing...

This might be a good example:

http://www.hakatedra.co.il/index.php/%D7%97%D7%99%D7%A4%D7%95%D7%A9/86-%D7%A9%D7%A8%D7%95%D7%9F-%D7%A8%D7%9E%D7%A8-%D7%91%D7%99%D7%90%D7%9C.html

Thank you for you time :)

Ofer.

10 years ago
4
Level 6

Wow...is that your site?  I can't read it; even with Translate. If it's not your site, can you post a link to your form that is having problems? We will need to see it and test some parameters.

Before you do that, we'll try another parameter.  In that same selector add this p:

white-space:nowrap;
The entire line should look like this: (You could keep it on one line but it's harder to read that way.

div.vertical div.cck_forms.cck_site div.cck_label {
width: 145px;
text-align: right;
padding: 0px 0px 0px 0px;
white-space: nowrap;
 }





Try that and let us know.
-----------------------------------------
-Dave
Don't forget to SOLVE this topic if this helps.


10 years ago
3
Level 7

Sorry for the RTL language. 

This is actually a small segment of my website. The pupose of the website is to offer lecturers a place to create a profile where they could write about theire proffesional activity. I'm new to Seblod but this tool provided me so many great features to work with.


The link that i've provided (above) is a profile of one of ther lecturers.


Unfortunately, nothing has changed after adding the code. (I refreshed the page using SHIFT + F5 and also tried it on another computer). 

If it's no burden and it's not to much to ask, I can send you the file cck.site.css so you could see the whole code.


Thanks again,

Ofer.

10 years ago
2
Level 8

Is there supposed to be a problem with the profile you linked?  On my computer, there is no wrapping of the labels. 

save image

Are you viewing the site zoomed in? 

Hold down CTRL + Scroll up / down on mouse (if you have a wheel mouse) or use CTRL + / - to zoom in or out. 

I also took a look at your CSS and we're pointing to the wrong place.  You're showing CONTENT not SITE form.

To change the size and position in Content you have to change a different file.

The file is: media>cck>css>cck.content.css

div.cck_contents.cck_content div.cck_label label {
  margin-bottom: 0px;
  white-space: nowrap; /* SHOULD prevent label from wrapping */
  font-weight: bold;  /* Will make your labels bold */
}





---------------------------------------
-Dave
Don't forget to SOLVE your post if you've solved your problem.

10 years ago
1
Level 9

Great !

Now we're at the right place, and I saw the improvement using bold. But still the second line is slipping away to the next line - that is the big issue (the link the i've sent is a good example). When i say "slipping away" I mean that when a subscriber writes a lot of words in content field, the text of the second line (the third, and so on) begins its margins under the label instead of starting the margins below the first line of the content.


I though that  "white-space: nowrap;" will solve the problem but it didn't...

I also checked the the zoom and it's on 100% (default).


What should I try next?

Thank you very much,

Ofer.

148 Posts
pixelneco
10 years ago
0
Level 10

hi,


give your field content a margin-right equal the length of your label. I guess in your example it should be this:

div.cck_contents.cck_content div.cck_value.cck_value_textarea {
margin-right: 145px;
}

10 years ago
2
Level 1

For that line you need to look at something else. It is NOT a label. All the code we've edited was ONLY valid for labels.

The item appears to be content and it looks like Pixelneco has found the Selector you need to edit. 

The "nowrap" setting was for labels.  It will NOT affect your content, nor would you want it to. So do NOT use it in this Selector.

Pixelneco's solution should fix the problem.

Let us know.

------------

-Dave

Don't forget to "Solve" your topics if it's been solved.

10 years ago
1
Level 2

Thank you dniezby and pixelneco ! That's exactly what I was looking for :)

Have a great week !

10 years ago
0
Level 3

Don't forget to mark this topic solved. It helps others know that their common question will have the answer. The solve button is on the right of your first message.

Get a VIP membership