Computing.Net > Forums > Web Development > css question

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

css question

Reply to Message Icon

Name: chalks
Date: August 17, 2005 at 10:41:37 Pacific
OS: windows xp
CPU/Ram: 2.7ghz
Comment:

hey hey...I just recently learned how to use css. I love it. :)

however...i'm having some problems with positioning and sizing of elements. What is the best way to position elements in a css document?

My biggest question though:
When you resize the text using the built in option on ie6 ('view' 'text size' 'larger'), the text size will change, but my elements will not expand to fit the new sizes. How can I make it so that they DO resize? Almost all of my elements are positioned absolutely and I have sized text using ems.

HELP! :)

Leadership is the art of influencing and directing others in a way that will gain their respect, confidence, and loyal cooperation in achieving a common goal or objective



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: August 18, 2005 at 10:44:48 Pacific
Reply:

"What is the best way to position elements in a css document?"

Need more specifics. Whattype of elements? What are you trying to accomplish? The "best" method can change depending upon the desired outcome.

"...my elements will not expand to fit the new sizes."

What do you mean by elements? Are you refering to your text elements? If so, then when you explicitly define a font size for a text element, then the browser will not resize the text using the method you described. This, I believe, is by design. Allowing the browser to resize text would break sites that were designed around the text being a specific size.

Michael J


0

Response Number 2
Name: chalks
Date: August 18, 2005 at 13:33:47 Pacific
Reply:

when I say element I mean anything refered to in my css document. for example:

#header {
}

#content {
}

I do not mean things like:
p {}
or
h1 {}

as for resizing...I went to msn.com's website. I like the way that is set up...when you resize the text with the browser there you can see what I'm talking about.

Leadership is the art of influencing and directing others in a way that will gain their respect, confidence, and loyal cooperation in achieving a common goal or objective


0

Response Number 3
Name: Michael J (by mjdamato)
Date: August 18, 2005 at 20:05:48 Pacific
Reply:

Well, I'm not going to go through their code line by line, but I can think of at least one way, off the top of my head, to accomplish what I see on their page.

The trick is to first carefully plan out your site, otherwise this will become very difficult. For a simple example, assuming you have one "block": First create a master DIV. Then create the content DIV within that. Now create a "sizing" DIV (above or below the content DIV, but within the master DIV) which consists of a series of non-breaking spaces. You will need to adjust the number and size of the spaces to get the desired results. But, now when the user changes font size, the sieries of non-breaking spaces will expand and contract the size of the blocks.

The above example may not quite work as explained, but you should get the reasoning - you might have to tweak it a little.

There are probably other, and better, methods, but that is just the first one that comes to mind.


0

Response Number 4
Name: chalks
Date: August 19, 2005 at 06:09:50 Pacific
Reply:

hmm....sounds like that might work. Thanks!

I think I may just give in and just define how large my text should be. :)

Leadership is the art of influencing and directing others in a way that will gain their respect, confidence, and loyal cooperation in achieving a common goal or objective


0

Response Number 5
Name: Michael J (by mjdamato)
Date: August 19, 2005 at 10:49:21 Pacific
Reply:

That's what I do, but...

It has been my experience that text will appear much smaller on IE on the MAC. I used to have two differnt style sheets that were determined by the platform/browser. I haven't done any sites for a coulpe years that would have heavy MAC traffic, so I haven't tested this in quite some time.

Michael J


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: css question

css question www.computing.net/answers/webdevel/css-question/508.html

Simple CSS help? www.computing.net/answers/webdevel/simple-css-help/228.html

CSS questions: www.computing.net/answers/webdevel/css-questions/2493.html