Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-08-2012, 12:14 AM   PM User | #1
matanl1234
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
matanl1234 is an unknown quantity at this point
div's location when zooming

hello,
when i zoom in or out the div's location changes insted of getting bigger or smaller and staying in relatively in the same location.
how can i change that?
thanks for helping.
matanl1234 is offline   Reply With Quote
Old 10-08-2012, 03:34 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello matanl1234,
It sounds like you are using absolute positioning to place your div element. Do you have some code for us to see the problem in action?
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 10-09-2012, 01:03 AM   PM User | #3
matanl1234
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
matanl1234 is an unknown quantity at this point
I did not use any css programming, if it helps i used visual studio 2010.
matanl1234 is offline   Reply With Quote
Old 10-09-2012, 04:01 AM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by matanl1234 View Post
I did not use any css programming, if it helps i used visual studio 2010.
We'd still need to see your code to know what's happening. A link to the test site would be even better.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 10-09-2012, 01:58 PM   PM User | #5
matanl1234
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
matanl1234 is an unknown quantity at this point
I created this example: http://jsfiddle.net/shLjX/ .
Its simillar to to the problem i'm having, the div's width changes too instead of only getting smaller or bigger.
matanl1234 is offline   Reply With Quote
Old 10-10-2012, 04:56 AM   PM User | #6
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
In that example, you don't give div.a a size so it takes what's available to it minus the left and right 50px margin. I did not try it out... not sure that's really how it works.

Maybe you're looking for a percentage based layoutlike this?
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 10-10-2012, 11:32 AM   PM User | #7
matanl1234
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
matanl1234 is an unknown quantity at this point
I tried percentage based layout before and didn't like it so much.
Can you give me a simple example of a div that stays in the same location when zooming?
matanl1234 is offline   Reply With Quote
Reply

Bookmarks

Tags
div, html, loaction, positon

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:04 PM.


Advertisement
Log in to turn off these ads.