ḥari
2 years agoFrequent Contributor
How to get text alignment
Hi
I tried to verify the text alignment in TC with the below code
getComputedStyle(var).textAlign
but its not fetching the alignment
Can you please help me regarding these???
Hi
I tried to verify the text alignment in TC with the below code
getComputedStyle(var).textAlign
but its not fetching the alignment
Can you please help me regarding these???
It looks like <div class="feedback_item text-center"> centres the text. You might have to use this instead if there's no other attributes.
But using this class attribute I can't expect the text alignment in log correct.
What does the HTML code look like?
For example
Hi rraghvani
No, only having <div class="feedback_item text-center">
and finally am getting unable to find the object getComputed(null)
And also Is it posible to check text spacing in TC???
Thanks!
Look at the example I have provided, and check the spelling of what you have.
Also understand the difference between Inline and Computed Styles.
Yeah, that's typing mistake.
It's printing empty message in log file because In DOM structure CSS selector not available refer below image for DOM reference
>>only class attributes only available
A div tag defines a division or a section in an HTML document. If you look at the styling in this example, you can use the inherited object i.e. div.myDiv
You will have to find the correct styling for your object.
Thanks for the information. I didn't try this way it's new for me.
So, here for me (div.text-center) it shows 1 of 5 for me.
How to use this method in TC. If you don't mind, can you please help me
Not sure if you understood my previous response, but I was showing you an example that the class called myDiv inside the div tag, has styling properties defined, which can be seen using Chrome DevTools.
The screenshots you have provided doesn't indicate what object you are referring to, so I can only provide you with suggested solutions.