Drags111 Posted December 15, 2007 Share Posted December 15, 2007 Hey, I wanna know how to make my div only expand with the text, so theres not a bunch of blank space on my div. Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/ Share on other sites More sharing options...
dbrimlow Posted December 15, 2007 Share Posted December 15, 2007 ??? That's like asking us: "What size shoe should I buy so my feet stop sliding around in 'em so much"? Show us what you mean (give us an example of your css and html to go by) There are so many possible ways for us to guess what you mean that it would be impossible to help without any context. So, the first guess would be to say: "don't designate any width or padding to your id or class ("div")". Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-415738 Share on other sites More sharing options...
Drags111 Posted December 18, 2007 Author Share Posted December 18, 2007 yah sorry, I need to be more specific :S Anyway the no height thing worked, but i got another question. I want to position another Div under the main content one, But it cant be a specific location, as the both will change due to the amount of text in them. Website: http://www.dragscave.com/ Look at the Div that says "welcome blah blah" I wanna put something under that. Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-417562 Share on other sites More sharing options...
SyncViews Posted December 18, 2007 Share Posted December 18, 2007 To get them underneath just have it like that in your html. Presuming you didn't use absolute positioning or anything like that your web browser will place them one under the other. <div> top content </div> <div> middel content </div> <div> bottom content </div> Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-417596 Share on other sites More sharing options...
Drags111 Posted December 18, 2007 Author Share Posted December 18, 2007 oh i see silly me. Sorry been a rough few days Will it provide any padding, so its not like rubbing against eachother? Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-417603 Share on other sites More sharing options...
SyncViews Posted December 18, 2007 Share Posted December 18, 2007 Well each div will start on a new line. To provide an extra gap use: "margin-top: 16px" in the style Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-417614 Share on other sites More sharing options...
dbrimlow Posted December 19, 2007 Share Posted December 19, 2007 SynViews, sorry to hit you with this, but, your html structure is not in the least web standards compatible; your whole site will default to quirks mode therefore trying to get any cross-browser precision in layout using css will be literally impossible. You may get away with getting by in IE, but modern browser will frustrate you to no end! 1st, for many reasons (including css can do it better), frames are just not used anymore. 2nd, you have no doctype - if you MUST use frames, at the least, put this in your main frameset page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> . But, just loose the frames altogether, it will cause nothing but headaches with layout css and cross-browser rendering. You've already decided that you want to do the right thing and use css instead of tables, take the first step and use proper, 1 page semantic html markup. Dave Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-418892 Share on other sites More sharing options...
SyncViews Posted December 20, 2007 Share Posted December 20, 2007 wtf you going on about? Nobody other than me even knows the url to my site and if you did you would find that adition files are added with <?php include('./includes/header.php'); ?>.. So on that grounds i'm going to presume your talking about Drags111 lol Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-419309 Share on other sites More sharing options...
dbrimlow Posted December 20, 2007 Share Posted December 20, 2007 LOL!! My bad. I AM talking about the drags site. Sorry. Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-419363 Share on other sites More sharing options...
pquery Posted December 26, 2007 Share Posted December 26, 2007 I'm going to agree with dbrimlow here and say break out of the frames before you your really get started. Besides for SEO purposes you're going to get knocked down for a frameset. Also in your navbar2.html A:link {text-decoration: none; font-weight: bold; color: 99CC00;} A:visited {text-decoration: none; font-weight: bold; color: 99CC00;} A:active {text-decoration: none; font-weight: bold; color: 99CC00;} A:hover {text-decoration: none; font-size:14; font-weight: bold; color: white;} p {text-decoration: underline; color: white; font-size:18;font-weight: bold;} why are you changing the font size so that the menu seems to be bouncing as you hover over it? It's just not good style practices these days. Keep a consistant font size and either change color or place a background color on the hover state. Just a few tips to keep your site looking more professional, especially if your looking to attract advertisers / revenue streams at a later point Quote Link to comment https://forums.phpfreaks.com/topic/81803-help-with-divs/#findComment-423096 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.