800x600 screen size in HTMLPad 2008

Discuss general web development questions. Help others and get help from others.

Moderator: kfury77

800x600 screen size in HTMLPad 2008

Postby jjstccean » Tue Jul 08, 2008 12:52 pm

Hi
I'm new to this so please bare with me, thank you. :)
Is there a way to tell/set if the screen size is 800x600 in HTMLPad, or is this default mode for HTMLPad? Can these settings be set in my css file? Any ideas on how to phrase it in the css file please? The reason for my asking is that when I attempt to place an image or text using - "position: absolute; left: 10px; top: 650px;" for example - the result is not placed at the given measures...the result is placed in the middle of the screen below a table with its LEFT position set as 143px; - if it's a line of text it appears to be crunched up. :? Is it wise to use px's instead of (pt) points? I hope I'm making some sense of this.

Thank you.

jjstccean
jjstccean
 
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: 800x600 screen size in HTMLPad 2008

Postby syrupcore » Wed Jul 09, 2008 3:35 am

Honest to god, if you're just learning CSS layouts, do yourself a HUGE favor and stay away from position: absolute;. It's just so tempting but it can be an unbearable mistress until you've really got stuff sussed out. I smashed my face, losing teeth in the process, into the keyboard so many times at first because position: absolute didn't seem absolute at all!

absolute positioning isn't necesarrily based on the page width. Instead, it's based off of the positioning of the parent container. That may be the page but likely it's whatever it's currently living in. so:

Code: Select all
<div id="content">
  <div id="innerdiv" style="position: absolute; left: 0; top: 0;">
     lorem ipsum
  </div>
</div>


#innerdiv will be at the absolute top left of #content, not the browser window. Position absolute also REMOVES the item from the flow of the page causing all manner of things to go silly.

Maybe put your page up and post a link. We can help a little better that way. Seriously though, avoid absolute for a while.

Will
User avatar
syrupcore
Top Contributor
 
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa

Re: 800x600 screen size in HTMLPad 2008

Postby jjstccean » Mon Jul 21, 2008 10:03 am

thank you syrupcore! I understand. I've a new problem though. I'm using HTMLPad Pro 2008 for editing my designs. All goes swell, and I'm not use tables any longer - I've found a huge amount of info on the net on why-and-why-not regarding tables. That said, when I preview my pages in FireFox (FireFox diehard) my pages looks good and in sync with div positioning etc. I'm also try very hard not use the absolute: positioning unless I have to. My point here is - I already know about IE's :x way of rendering elements in displaying webpages - the reason why I'm mentioning this, is that if I preview same said webpage in IE 6 and 7 some elements moves out of sync! How can I overcome this issue, where will I find the correct info? Will I have to do double coding to accomodate both IE! and any other broweser? Any help on this will be greatly appreciated, thank you.

I've got this set at the top of my webpages: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Have I got this right?

jjstccean.
jjstccean
 
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: 800x600 screen size in HTMLPad 2008

Postby syrupcore » Mon Jul 21, 2008 11:04 am

You really want to use a strict doctype when doing all CSS layouts.

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


This will get IE behaving much better in general although it may not fix your problem.

There's a lot of reasons why IE6/7 can misbehave so it's impossible for me to really help but here are a couple of hacks to target ie6 or ie7.

Code: Select all
#myelement          {width: 300px;} /* Targets all browsers */
* html #myelement   {width: 306px;} /* Targets ONLY IE6 */
* + html #myelement {width: 314px;} /* Targets ONLY IE7 */


It's important that the declaration that targets all browsers is first. Since the IE browsers also understand this, you have to include the browser specific overrides afterwards so it's overwritten in that browser's memory.

Will
User avatar
syrupcore
Top Contributor
 
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa

Re: 800x600 screen size in HTMLPad 2008

Postby syrupcore » Mon Jul 21, 2008 11:07 am

http://www.quirksmode.org/css/quirksmode.html for more on doctypes and "standards" mode vs "quirks" mode. A little geeky but readable and worth the time I reckon.
User avatar
syrupcore
Top Contributor
 
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa


Return to Web Developer Talk

Who is online

Users browsing this forum: No registered users and 10 guests