Click here to Skip to main content
14,298,626 members
Rate this:
Please Sign up or sign in to vote.
I have a content which has many div and tables inside it.. I mean they are tags (HTML).. Bu t i have to show them in a reduced format.. needs re sizing of it.. How can i achieve that???

For example i tried to paste this in my message part of mail

Table of keyboard shortcuts
From Wikipedia, the free encyclopedia
In computing, a keyboard shortcut is a sequence or combination of keystrokes on a computer keyboard which invokes commands in software.
Some keyboard shortcuts require the user to press a single key or a sequence of keys one after the other. Other keyboard shortcuts require pressing and holding several keys simultaneously. Keyboard shortcuts may depend on the keyboard layout (localisation).
Contents [hide]
1 Comparison of keyboard shortcuts
1.1 General shortcuts
1.1.1 Navigation
1.1.2 Power management
1.1.3 Screenshots
1.2 Text editing
1.2.1 Text formatting
1.3 Browsers / Go menu
1.3.1 Web browsers
1.3.2 Tab management
1.4 Window management
1.5 User interface navigation (widgets and controls)
1.6 Command line shortcuts
1.7 Accessibility
2 See also
3 References
4 External links
[edit]Comparison of keyboard shortcuts

Main article: Keyboard shortcut
Keyboard shortcuts are a common aspect of most modern operating systems and associated software applications. Their use is pervasive enough that some users consider them an essential element of their routine interactions with a computer. Whether used as a matter of personal preference or for adaptive technology, the pervasiveness of common conventions enables the comparison of keyboard shortcuts across different systems. The following sections detail some of these comparisons in widely used operating systems.
[edit]General shortcuts
A note regarding KDE's shortcuts is that they can be changed and the below list contains the defaults.
Action Windows Mac OS KDE / GNOME Emacs
Activate current application's Menu bar Alt With full keyboard access active (System Preferences > Keyboard > Full Keyboard Access > All Controls):[1][2]
Ctrl+F2 (or Fn+Ctrl+F2 on some keyboards)
Alt in KDE Meta+`
File menu Alt+F Ctrl+F2, then F Alt+F Meta+`, then f
Edit menu Alt+E Ctrl+F2, then E Alt+E Meta+`, then e
View menu Alt+V Ctrl+F2, then V Alt+V
Undo the last operation Ctrl+Z ⌘ Cmd+Z Ctrl+Z Ctrl+x, then u
or Ctrl+/
or Ctrl+_
or Undo
Redo the last operation Ctrl+Y ⇧ Shift+⌘ Cmd+Z ⇧ Shift+Ctrl+Z Same as undo, when undo is exhausted, it redoes. Move the cursor after one or more undos, and further undos will be redos.
Cut the selected area and store it in the clipboard Ctrl+X ⌘ Cmd+X Ctrl+X Ctrl+w
Copy the selected area into the clipboard Ctrl+C, or Ctrl+Ins ⌘ Cmd+C Ctrl+C Meta+w, or Ctrl+Ins
Paste contents of clipboard at cursor Ctrl+V, or ⇧ Shift+Ins ⌘ Cmd+V Ctrl+V Ctrl+y, or ⇧ Shift+Ins, or
Paste special Ctrl+Alt+V Ctrl+⇧ Shift+V Meta+y
Select everything in focused control or window Ctrl+A ⌘ Cmd+A Ctrl+A Ctrl+x, then h
Toggle among installed keyboard languages ⇧ Shift+Alt ⌘ Cmd+Space
Configure desired keypress in Keyboard and Mouse Preferences, Keyboard Shortcuts, Select the next source in Input menu.[3]
Ctrl+Alt+K via KDE Keyboard
⇧ Shift+Alt in GNOME

But when i try to display in div the table width is so large that my design get destroyed...

So i need to find div and tables inside the content and resize them to(450 x 450) resolution....
Updated 21-Jul-12 18:58pm
Arjun Menon U.K 21-Jul-12 9:38am
Is it possible to find a table tag in a string using c#
Like this
if (message.Contains("<table style='width:*px;'>"))
Arjun Menon U.K 21-Jul-12 10:33am
I am trying to display the abv content in a div which is inside a td... Please help me out guys

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

This is an HTML and CSS question, and here is the code.
* { margin:0; padding:0; }
TABLE { border-collapse:collapse; border-width:0px; }
TD DIV { width:450px; height:450px; overflow:hidden; }

      <div>Hi! This is a big long string of text.</div>

I just gave the generic tag names but if that breaks your design then rename.
Alternatively you can use the code to scroll the contents of the DIV, just make sure you adjust the width to account for the Scroll Bar that will show up, they are usually around 16px.
TD DIV { width:434px; height:450px; overflow:scroll; }
Arjun Menon U.K 21-Jul-12 13:34pm
Smith... My div is inside a td not the other way round.... No shall i create a CSS like this
TABLE DIV { padding:0; margin:0; width:450px; height:450px; border-collapse:collapse; }
WoodenLegNamedSmith 23-Jul-12 11:08am
I've modified my solution as per your comment.
It would really help if you could post some layout code.
The code above will only work for a single-column, or one TD per row table, anything else will be break the layout.
Arjun Menon U.K 22-Jul-12 4:30am
Still the problem persist
Arjun Menon U.K 25-Jul-12 8:01am
What if i have broken HTML contents like an unclosed div or table?
WoodenLegNamedSmith 25-Jul-12 9:02am
wrap it in a <pre> tag to just show the code, or tell people to get better HTML skills. Otherwise you'll have to devise of form of syntax validation before your content is upload and correct it all in the database
Arjun Menon U.K 28-Jul-12 5:27am
ha ha nice one smith.. but the problem is the system am doing is a bug reporting one and one can copy some contents from it which may have tables and the selected regions may have broken tags

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100