SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 30

Thread: Div Adjusting

  1. #1
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Div Adjusting

    I want to prevent the
    Code:
    class: sidebar
    from effecting the
    Code:
    id: sidebar
    which can be seen here. I want to reside the
    Code:
    class: sidebar
    larger then what it is and position it

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I don't understand wat the question is

    In the link you posted there is a #bg_sidebar and a #sidebar only..no .sidebar
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  3. #3
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ryan, i think the OP means the .bg_sidebar instead of .sidebar. But even then i don't understand the question either: preventing bg_sidebar to effect #sidebar but in which way? And position it to where?
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Validate your page, HTML and CSS because I am seeing missing quotes on some class names and other invalid HTML .
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  5. #5
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You've mentioned in other posts that you're working from a Photoshop mockup. Making the mockup available for viewing will help with this and other problems as it'll show what you're aiming for.

  6. #6
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want the class: bg_sidebar not to effect the id: sidebar. If I set a width and height for the class: bg_sidebar it ends up scaling the id: sidebar which I don't want because I want to make the class: sidebar just a background image.

  7. #7
    SitePoint Enthusiast phillip_davies's Avatar
    Join Date
    Dec 2009
    Location
    Cheltenham, UK
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds a bit like your doing something odd?

    If you dont want the id: sidebar to scale then set a height/width in the css and overflow: hidden. That should stop the class sidebar pushing the id sidebar down/accross.

    Although if your just adding a background image you could just apply it to sidebar id? Also you have set the sidebar class height and width but not the sidebar id height?

    If you have a jpg of what your trying to do that would be ideal as I think you might be making things harder on yourself with your html / css!

  8. #8
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    I want the class: bg_sidebar not to effect the id: sidebar. If I set a width and height for the class: bg_sidebar it ends up scaling the id: sidebar which I don't want because I want to make the class: sidebar just a background image.
    In the link you provided, the class has a background color set on it, a width and a height. If you don't want the div to be effected by the dimensions, just remove the width and height from the class. Is that what you want?
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  9. #9
    SitePoint Enthusiast phillip_davies's Avatar
    Join Date
    Dec 2009
    Location
    Cheltenham, UK
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^^ that as well, but then your background-image would only show when you put content inside sidebar-div so it depends what you want it to do?

  10. #10
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phillip_davies View Post
    ^^ that as well, but then your background-image would only show when you put content inside sidebar-div so it depends what you want it to do?
    Correct but i was working with his code so don't know if he wants a background-image or color..... and so we're back to the beginning it seems
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  11. #11
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    You could set a min-height to have it at least the background images height, and if it has enough content it wil expand to suite
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  12. #12
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let's just wait until we get the definitive word from the OP
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  13. #13
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    We can still offer stuff so when he comes back he won't have to wait for an answer
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  14. #14
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    We can still offer stuff so when he comes back he won't have to wait for an answer
    I agree ... i love solving puzzles and riddles
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  15. #15
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My ID Sidebar is now moving when I adjust the position of the class sidebar, which I don't want to happen I want the original position of the ID side bar to stay where it is for now and only position the class sidebar but when I position the class:sidebar so moves the ID:sidebar

    The link can be found in message #1

  16. #16
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Hi, I'm not following you. If I increase the top margin of ".bg_sidebar" to change its' position, I don't see the sidebar moving.

    Which property do you want us to change around with to see what you are seeing? Nothing I'm doing to .bg_sidebar is moving the #sidebar
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  17. #17
    SitePoint Enthusiast phillip_davies's Avatar
    Join Date
    Dec 2009
    Location
    Cheltenham, UK
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you provide an image of what you are trying to achive?

    Its hard to advise as everything you are telling the class bg_sidebar and the id sidebar in the css is happening? you have set a margin top to both class bg_sidebar and id sidebar?

    The main thing that will cause an issue is that id sidebar is floated right which usually causes an issue in the ie's. To fix that the right floated item must come before the left floated element in your html. Either that or just float it left as well.

  18. #18
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phillip_davies View Post
    The main thing that will cause an issue is that id sidebar is floated right which usually causes an issue in the ie's. To fix that the right floated item must come before the left floated element in your html. Either that or just float it left as well.
    Sorry to telll you but the direction of the float has nothing to do with IE bugs (except the double float margin bug, which isn't happening here)
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  19. #19
    SitePoint Enthusiast phillip_davies's Avatar
    Join Date
    Dec 2009
    Location
    Cheltenham, UK
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ive had many a bug with float right, its pretty subtle but can really throw a spanner in the works if your going pixel detail.

  20. #20
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    If you could show me an example I'll believe you . IE has issues with an inline element (not floated) coming before a float (FF/good browsers will show the inline and then float on the same line, but Ie needs a float to be first), but there is nothing buggy about the direction of a float.

    Put up or shut up I always like to say lol (not to be rude)
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  21. #21
    SitePoint Enthusiast phillip_davies's Avatar
    Join Date
    Dec 2009
    Location
    Cheltenham, UK
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont think I have any specific examples to hand, but trust me float: right has caused me a few hours of head scratching in the past! Anywho like you say its probably not the issue with this perticular problem as form a quick browser check it seems to render the same across ie 6/7/8 ff etc

  22. #22
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at the page.
    Changed the Class:bg_sidebar MARGIN-TOP: 0px
    now add 50px to that you'll see the ID:BG_sidebar moving but I don't want it to move I want it to stay in the original position (for now) that it was when that rule was set to 0px

  23. #23
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phillip_davies View Post
    I dont think I have any specific examples to hand, but trust me float: right has caused me a few hours of head scratching in the past! Anywho like you say its probably not the issue with this perticular problem as form a quick browser check it seems to render the same across ie 6/7/8 ff etc
    Well until I see something to back it up please forgive me for being a skeptical person
    Quote Originally Posted by SiberianHuskey View Post
    Look at the page.
    Changed the Class:bg_sidebar MARGIN-TOP: 0px
    now add 50px to that you'll see the ID:BG_sidebar moving but I don't want it to move I want it to stay in the original position (for now) that it was when that rule was set to 0px
    I set .bg_sidebars margin-top to 0. Then I increased it to 50px..it wasn't moving.

    Setup 2 different pages showing the move. Aka use the same code but do wahtever change you do to show them in a differnet place. Do test1.html and test2.html for example
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  24. #24
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    I vaguely remember issues with right floats but that was long ago when I was first starting... it's likely something that I learned to code around and never see it much any more (I do still run into it when I'm doing weird box positioning such as in my horizontal site. Float right is definitely a nono in IE on those!!)


    I've read this whole thread and I can't make heads or tails of what's going on. : (

  25. #25
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,722
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    I vaguely remember issues with right floats but that was long ago when I was first starting... it's likely something that I learned to code around and never see it much any more (I do still run into it
    I'm still waiting for examples of these
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •