Forum Moderators: not2easy

Message Too Old, No Replies

css

how to get text to adjust to window size

         

newgirl

9:45 am on Apr 17, 2006 (gmt 0)

10+ Year Member



Hi I am very new to web design, and I have started off by learning CSS. It is ok so far, but I have a problem with the site that I designed. I placed the text on the page based on pixel count, and it looks fine when i view the site when the monitor is 17", however when i view it with a higher monitor, the text is not where I placed it. How do i fixed this issue, and get it to adjust to the size of the monitor?

Here is a couple of the code that I used:

<html>
<head>
<style type="text/css">
p {text-indent: .5cm}
a:link {color:#FFFFFF;
text-decoration:none;
font-weight:normal;
font-style:normal;}

a:visited{color:#666666;
text-decoration:none;
font-weight:lighter;
font-style:italic;}

a:hover{color:#FFFFFF;
text-decoration:underline;
font-stretch:expanded;
font-weight:bold;}

a:active{color:#009999;
text-decoration:none;
font-weight:normal;
font-style:oblique;}

/*placing of the Opposites information on page*/
h1
{font:Nonserif;
font-size: 16px;
font-style:normal;
position:absolute;
top:142px;
left: 275px;
width:400px;
height:300px;
overflow:scroll;}

/*placing of the navigational bar on page*/
h2
{
font:Nonserif;
font-size:18px;
font-style:italic;
position:absolute;
left:155px;
bottom: 65px;
line-height:normal;
width: 700px;
}

Also how do I get the navigational bar, which i have placed on the screen, to not to jump into a new position when I click on it? (this also is not in the right place when viewed in a higher monitor screen size).

You can see what I am talking about @ <snip>

Thanks

Newgirl

[edited by: Woz at 12:02 pm (utc) on April 17, 2006]
[edit reason] No URLs please, see TOS#13 [/edit]

victor

10:42 am on Apr 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WMW

The text will seldom be where you want it. It'll be where the viewer wants it. Many viewers will be happy to rend according to the hints you supply in the CSS and HTML.

But they are only hints, not commands. Text has to flow into many weird and wonderful devices from cell phones to scrolling alphanumeric arrays.

If your hints are more general, then you are more likely to communcate the effects you want. specifically:

-- specify font sizes in percentages. That way, you are varying from the viewer's prefered default rather than ignoring that default completely.

-- specify widths as ems or percentages. Again, you are varying from the viewer's defaults rather than ignoring them.

Someone will probably be along to remove the URL of your site: check the TOS.

newgirl

11:06 am on Apr 17, 2006 (gmt 0)

10+ Year Member



Sorry for posting the url, didn't mean to offend anyone.

In terms of fixing the site, if i set the margins in percentages will that fix the text. I have an image as a background, and I want the text to be displayed on a specific place on the image. Where would I put the margins. Should I have a border then place the text in between the borders?

Thanks