Jump to content

stuck in between


nidhi
 Share

Recommended Posts

i m trying to format an already existing web page by linking a CSS at the headusing a code in C, so that it fits for a handheld size.in C code, i m opening that webpage and start reading char by char. as soon as head tag comes,i concatenate thelink as a string. the CSS is being successfullyattached and the contents are fitted into the specified screen size: 360*240. then istore the result into a htm file.but some entities are creating problem especially flash. i don't want to display flashon the mobile screen,hw can i do it using CSS.can u gv me correct guidelines wat should i hv in my CSS to reformat analready existing web page.plz help me, i m stuck in between.if anyone shows interest,i'll send my CSS code alsowaiting 4 ur valuable reply,

Link to comment
Share on other sites

What are you using to place the flash on the page? If you post your code and the css, you are guaranteed to get more reply's. For now, I am going to assume you used the object tag, since most people do. I believe you can have it not display if you do this in the CSS

@media handheld {object .flash {display:none;}}

Edit: Thanks to boen_robot

Link to comment
Share on other sites

What are you using to place the flash on the page? If you post your code and the css, you are guaranteed to get more reply's. For now, I am going to assume you used the object tag, since most people do. I believe you can have it not display if you do this in the CSS
@media handheld {object .flash {display:none;}}

Edit: Thanks to boen_robot

i m attaching a CSS using link. if using external style sheet, thn we should link CSS like this:<link rel=\"stylesheet\" type=\"text/css\" href=\"handheld.css\" />we use @media handheld when we have CSS in the same html na? in my CSS, wat should b done to make a web page compatible to a mobile screen.give me some guidelines...i m giving my code, plz hv a look over it. it works fine for simple pages, bt not for heavily decorated pages. i don't want to display flash objects, hw to da that?just tell me that writing in this way is OK? if i specify width in body, then will that b applicable throughout the page or i shall take some other approach?body { width: 176px ; /* nokia 176px screen */ border: thick solid red /* just to see the 'screen' limits */}*:not(#ImPoSsIbLeId):not(#ImPoSsIbLeId):not(#ImPoSsIbLeId):not(body):not(img) { /* the negated ID selectors above are here just to increase specificity */ width: auto ! important ;}*:not(#ImPoSsIbLeId):not(#ImPoSsIbLeId):not(#ImPoSsIbLeId) { /* the negated ID selectors above are here just to increase specificity */ position: static; float: none; text-align: left; padding: 0px; margin: 0px; top: auto; left: auto;}table,tbody,thead,tfoot,tr,td,th,col,colgroup { display: block;}iframe { display : none;}li { list-style-position: inside;}img[width=1] {display: none}var l = document.getElementsByTagName('img');for(var i = 0;i < l.length; i++) { if(l.width > 176) { l.height *= 176 /l.width; l.width = 176; } else if(l.naturalWidth > 176) { var e = 176 / l.naturalWidth; l.height = l.naturalHeight * e; l.width = 176; }}
Link to comment
Share on other sites

This is the code to not display flash objects

object .flash {display:none;}

Just put that at the end of your css code. Everything else should be fine I believe.

Link to comment
Share on other sites

Uh...you are using the object tag to place the flash content on your page correct? If you're using the embed tag, you should definitely switch it to the object tag.

Link to comment
Share on other sites

Scince when cell phones display Flash? I thought it's a really fancy feature which is not going to be widely implemented anyway (unlike SVG but that's another story).As for this issue... hm... I have no idea what kind of object the object element is (excuse the pun). I'm however sure that block elements could have width and height, so try this:

object.flash {display: block;height:176px;width:176px;}

Which btw also leads me to a small correction to the quoted code of mine. Whitespace is critical for this to work.

object .flash

Applyes to every element of class "flash" which is inside an object element.

object.flash

Applyes to every object element with class "flash".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...