473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to make vertical text in js with browser compatibility

I am using CSS property [writing mode:tb-rl] to make vertical text using java script.it is working fine with IE browser but not with mozila firefox... do anyone have any simple solution for the same....?? I do'nt want to use image control for that because it is so painful coding .. please suggest me what to do?
Feb 3 '09 #1
20 7528
acoder
16,027 Expert Mod 8TB
Does this link help?
Feb 3 '09 #2
thanx for reply but i am making ASP.net application and using visual studio 2008 for IDE and it is not working into this IDE.. ? and also it should be work in IE-7 and FF..?
Feb 3 '09 #3
acoder
16,027 Expert Mod 8TB
You could just type it directly into the file.

If you want to avoid SVG, you can just use JavaScript to add line breaks (the <br> tag) after each character.
Feb 3 '09 #4
ok.. but in <br>
a
v
i
n
a
s
h
type of output will displayed..i want a output like whole word should be
rotate by 90 degree..?
Feb 3 '09 #5
acoder
16,027 Expert Mod 8TB
Clockwise or anti-clockwise?
Feb 3 '09 #6
i want a output same as (writing-mode:tb-rl).. as u asked it should be clockwise..?thanxx
Feb 4 '09 #7
acoder
16,027 Expert Mod 8TB
Ah, I see-a complete rotation. Well, SVG would work here as would the canvas tag.

If your IDE doesn't support these tags, etc., edit the file directly. Here's a simple SVG tutorial.
Feb 4 '09 #8
but canvas is not works in IE ... i m makin the application with IE & FF compatibility?
sso what should i do... plz suggest me...?
Feb 4 '09 #9
acoder
16,027 Expert Mod 8TB
For IE, you can use what you're using now. You can use canvas for all other browsers.
Feb 4 '09 #10
a lot f thanx but i have to made a single common code for my application which will works on both of the browser.... i c'nt use the two different code for different browser for a single functionality....?plz suggest me?
Feb 4 '09 #11
acoder
16,027 Expert Mod 8TB
That's not a problem at all. You can put the text (with writing-mode set) within the canvas tags for browsers which don't support it. See the section Fallback Content on this page:
This is very straightforward: we just provide alternative content inside the canvas element. Browsers which don't support <canvas> will ignore the container and render the fallback content inside it. Browsers which do support <canvas> will ignore the content inside the container, and just render the canvas normally.
Feb 4 '09 #12
but i am not able to make text vartical using canvas... can u send me some code example?
Feb 4 '09 #13
plz help me how to make text vertical using canvas?
Feb 4 '09 #14
acoder
16,027 Expert Mod 8TB
Here's one example. It uses SVG rather than canvas. Just one way of doing it.
Feb 4 '09 #15
drhowarddrfine
7,435 Expert 4TB
'writing-mode' was a proprietary attribute for IE until it was introduced into CSS3. I don't know what other browsers support that right now.

You can look into Firefox's vendor extensions to see if there's something there that does the vertical thing you want.
Feb 4 '09 #16
thanx .. but how to use svg in asp.net 3.5 application .... n how can also include IE functionality in the same?
Feb 5 '09 #17
i tried to use SVG in asp.net 3.5 but it is not supported by asp.net....?
Feb 5 '09 #18
plz rply me what should i do in this condition,,,,,.,?
Feb 5 '09 #19
acoder
16,027 Expert Mod 8TB
First, get it working in plain HTML. Getting it working in ASP.NET is not a question for this forum (ask in ASP.NET), though I would assume it shouldn't be difficult.
Feb 5 '09 #20
drhowarddrfine
7,435 Expert 4TB
As you said above, SVG does not work in Internet Explorer so I'm not surprised it's not supported in any Microsoft product. You should be able to write the HTML to get SVG to work in the modern browsers but it just won't happen in IE.
Feb 5 '09 #21

Sign in to post your reply or Sign up for a free account.

Similar topics

82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
1
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
8
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
23
by: gregf | last post by:
I have a paragraph of text pasted into a word document, it's in Polish, complete with polish characters. They show up just fine in word, but the program I use for web page programming, HomeSite,...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: larzeb2000 | last post by:
I made a vertical navbar using a background image for the buttons. When I tested under FF or Opera, it looks fine, with the buttons touching vertically. However, in IE6 the buttons are spaced apart...
18
by: ~john | last post by:
Sorry if this is a dumb question buy my CSS is pretty bad... but how do I get text to center vertically within a div tag? Here's my code below... the text is displaying on the far top-right. I...
5
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up...
3
by: acunnon | last post by:
I am trying to put together an login page my problem is getting the three items aligned to the middle verticaly without specifing a height to anything on the page. CSS html{ height:100%;...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.