2 Questions

  • Thread starter Sage
  • 15 comments
  • 590 views

Sage

Staff Emeritus
12,533
United States
United States
GTP_Sage
1) Say, for example, that you have two images that are both 400 pixels wide placed side by side. If you were to resize your window to less than 401 pixels wide, obviously the one on the right would get "wrapped" underneath the other one. How do you prevent this, so that no matter how much a user resizes their screen, the two pictures will always be side by side? I'm aware of the <nobr> tag, but that's been depreciated. Will the White-Space CSS property do the trick, or does it only apply to text?

2) In Dreamweaver, how do you get an image to automatically resize? For example, if you resize the window right now, you'll notice that the blue space between the Flash movie and the GTP logo is the "auto-fit" space... Or, as another example, on Apple's Website, the secondary nagivation bar stretches across the entire screen, while still keeping the image map (the links) centralized. How do you do that?

Thanks,
Sage
 
1. Put the images into a table. If you define the table thus:
Code:
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr><td><img src="image1.gif"></td><td><img src="image2.gif></td></tr>
</table>

You'll find that the table will be created, both images will be side by side with no space in between. If you want space in between, increase the cellspacing attribute.

Note that you can do this in the menus. Click the Table[/icon], and set it up in the window as shown in the attachment to this post...

2. You'll see, if you view the source of GTP, the following statement:
Code:
<table width="100%" border="0" cellpadding="0" cellspacing="0" [color=red]background="/i/bg_blue.jpg"[/color] bgcolor="#112B4B">

The Background attribute in a table (not supported in IE < 3, Netscape < 4) allows you to load an image which you see resizing. If you play with the size of the GTP window, you can see the wrap (sorry Jordan!!!), where there is a pair of fuzzy vertical lines close together.
 
Sorry, attachment was stripped...
 

Attachments

  • dwtable.gif
    dwtable.gif
    4.4 KB · Views: 58
Sorry, two more Dreamweaver questions:

1) Does Dreamweaver have a way of using its WYSIWYG interface to use CSS in positioning of elements, or must that be done "manually"? (I'm trying to avoid excessive table use for element positioning)

2) Can Dreamweaver handle having an editable region in an optional region? (Weird question, I know ;))
 
1. Don't know. I'm trying to avoid using CSS styles because I'm trying to write for as many browsers as possible. I'm therefore using tables for positioning.

2. I don't know this one either. Since I started programming in PHP, I found that Templates were more of a pain than a bonus.

Sorry!
 
Originally posted by GilesGuthrie
1. Don't know. I'm trying to avoid using CSS styles because I'm trying to write for as many browsers as possible. I'm therefore using tables for positioning.

2. I don't know this one either. Since I started programming in PHP, I found that Templates were more of a pain than a bonus.

Sorry!
Ah, that's very much okay, Giles! ;)

I do have one more question though (I know, i know...)

Is there a way to use Dreamweaver's design interface to assign divisions, spans, classes, and id's, or must that be done manually?
 
How do you mean "assign"? I think there's a preference setting somewhere to do with whether it uses <div> tags or <centre> et al tags.
 
By assign, I mean that I would be able to just select say a big chunk of text, do something, then I'd get a dialog box that would allow me to "name" it....

For example, say I had the following text that I wanted to assign as <div class="bodytext">:
____

This is the body text.

____

Now, I'd highlight the text (in design view), the right-click or do some menu command, and a pop-up dialog box would come up, asking me what class I'd want it called, I'd type that in, and then it would magically surround that text with the appropriate div (or for inline text, span) tags, and maybe even add that element automatically to my attached CSS sheet.

Or is that all just a dream? :D

(I know that it's actually not much work at all to do it manually, but I take heart to the rule "If the software can do it for you, let it" :))
 
OK, you're using MX, right? All you need to do is configure it to show the CSS Styles palette (I have mine in the Design group.

To use a style, you can select the text you want formatted, then click the style, as long as the CSS Styles palette is in "Apply" mode. Dreamweaver will deduce the most appropriate way of applying the style, be it a <p class="">, <div class=""> or <span style="">, depending on whether it's a paragraph style, and on what you have selected.

Does that make sense?

I think that once you have the CSS Palette visible then you will be laughing.
 
Well, I wouldn't use the <div> tag at all. Instead, assign the class you want to a specific column or row in a table that contains this text, or the entire table if it is applicable in your situation. You can do this by simply highlighting what you want, and then click on the specific style's name that you want to apply to it in the Design panel's CSS Styles tab. Of course, if this text isn't in a table, the <div> tag would probably be your best option, but you can still apply the style using the Design panel as I just mentioned.
 
Jesus Christ.....you guys are nerds! - I can make sites but can't code them! - Good ol' WYSIWYG Dreameaver MX! You just have to love it!
 
Sorry for the belated reply...

Anyway, do I have to be in "Apply Styles" view to do that? Normally, my CSS panel is in "Edit Styles" view... however, for some reason, when I switch to "Apply Styles" view, not only does it say that I don't have a style sheet attached, but it also won't show anything when I re-attach my style sheet. :boggled:
 
Yes, you need to have the CSS Styles panel in "Apply" mode.

You may find that it's a problem with the program. Sometimes I get strange errors and the pulldown menus stop working, but a re-install fixes that. Failing that, it's off to the web site for a patch/bug report!
 
Back